feat: publicize doc implemetation
This commit is contained in:
64
one/docs/demo/drawer/modal.vue
Normal file
64
one/docs/demo/drawer/modal.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-button @click="modalOpen = true">
|
||||
Modal
|
||||
</veui-button>
|
||||
<veui-button @click="nonModalOpen = true">
|
||||
Non-modal
|
||||
</veui-button>
|
||||
<veui-drawer
|
||||
title="System"
|
||||
:open.sync="modalOpen"
|
||||
@ok="handleModalClose(true)"
|
||||
@cancel="handleModalClose"
|
||||
>
|
||||
Do you want to refresh the page?
|
||||
</veui-drawer>
|
||||
<veui-drawer
|
||||
title="System"
|
||||
:open.sync="nonModalOpen"
|
||||
:modal="false"
|
||||
@ok="handleModalClose(true)"
|
||||
@cancel="handleModalClose"
|
||||
>
|
||||
Do you want to refresh the page?
|
||||
</veui-drawer>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Drawer, Button } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-drawer': Drawer,
|
||||
'veui-button': Button
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
modalOpen: false,
|
||||
nonModalOpen: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleModalClose (ok) {
|
||||
this.modalOpen = false
|
||||
if (ok) {
|
||||
location.reload()
|
||||
}
|
||||
},
|
||||
handleNonModalClose (ok) {
|
||||
this.nonModalOpen = false
|
||||
if (ok) {
|
||||
location.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
.veui-button {
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user