feat: publicize doc implemetation
This commit is contained in:
73
one/docs/demo/drawer/custom.vue
Normal file
73
one/docs/demo/drawer/custom.vue
Normal file
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-button @click="simpleOpen = true">
|
||||
Title & content
|
||||
</veui-button>
|
||||
<veui-drawer
|
||||
:open.sync="simpleOpen"
|
||||
title="Customized Title & Content"
|
||||
@ok="simpleOpen = false"
|
||||
@cancel="simpleOpen = false"
|
||||
>
|
||||
Customized content via <code><slot></code>.
|
||||
</veui-drawer>
|
||||
|
||||
<veui-button @click="titleIconOpen = true">
|
||||
Icon in Title
|
||||
</veui-button>
|
||||
<veui-drawer
|
||||
:open.sync="titleIconOpen"
|
||||
@ok="titleIconOpen = false"
|
||||
@cancel="titleIconOpen = false"
|
||||
>
|
||||
<template #title>
|
||||
Title with Icon <veui-icon name="flag"/>
|
||||
</template>
|
||||
Customized content via <code><slot></code>.
|
||||
</veui-drawer>
|
||||
|
||||
<veui-button @click="footOpen = true">
|
||||
Foot
|
||||
</veui-button>
|
||||
<veui-drawer
|
||||
:open.sync="footOpen"
|
||||
title="Customized Foot"
|
||||
>
|
||||
Customized content via <code><slot></code>.
|
||||
<template #foot="{ close }">
|
||||
<veui-button
|
||||
ui="s primary"
|
||||
@click="close('ok')"
|
||||
>
|
||||
Close
|
||||
</veui-button>
|
||||
</template>
|
||||
</veui-drawer>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Drawer, Button, Icon } from 'veui'
|
||||
import 'veui-theme-dls-icons/flag'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-drawer': Drawer,
|
||||
'veui-button': Button,
|
||||
'veui-icon': Icon
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
simpleOpen: false,
|
||||
titleIconOpen: false,
|
||||
footOpen: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
.veui-button {
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user