feat: publicize doc implemetation
This commit is contained in:
69
one/docs/demo/overlay/stack-on-overlay.vue
Normal file
69
one/docs/demo/overlay/stack-on-overlay.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-button
|
||||
ref="parent"
|
||||
@click="parentOpen = !parentOpen"
|
||||
>
|
||||
Toggle
|
||||
</veui-button>
|
||||
<veui-overlay
|
||||
target="parent"
|
||||
position="top-start"
|
||||
:open.sync="parentOpen"
|
||||
overlay-class="relative-overlay"
|
||||
>
|
||||
<veui-button
|
||||
ref="child"
|
||||
@click="childOpen = !childOpen"
|
||||
>
|
||||
Toggle
|
||||
</veui-button>
|
||||
<veui-overlay
|
||||
target="child"
|
||||
position="top-start"
|
||||
:open.sync="childOpen"
|
||||
overlay-class="relative-overlay"
|
||||
>
|
||||
Child Overlay
|
||||
</veui-overlay>
|
||||
</veui-overlay>
|
||||
<veui-button
|
||||
ui="xs"
|
||||
@click="parentOpen = childOpen = false"
|
||||
>
|
||||
Hide all
|
||||
</veui-button>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Overlay, Button } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-overlay': Overlay,
|
||||
'veui-button': Button
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
parentOpen: false,
|
||||
childOpen: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
parentOpen (val) {
|
||||
if (!val) {
|
||||
this.childOpen = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" docs scoped>
|
||||
.veui-button {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less" src="./relative.less" docs></style>
|
||||
Reference in New Issue
Block a user