feat: publicize doc implemetation
This commit is contained in:
65
one/docs/demo/alert-box/title.vue
Normal file
65
one/docs/demo/alert-box/title.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-button @click="open1 = true">
|
||||
title prop
|
||||
</veui-button>
|
||||
<veui-button @click="open2 = true">
|
||||
title slot
|
||||
</veui-button>
|
||||
|
||||
<veui-alert-box
|
||||
type="success"
|
||||
:open.sync="open1"
|
||||
title="Success"
|
||||
@ok="ok"
|
||||
>
|
||||
<p>Saved successfully!</p>
|
||||
</veui-alert-box>
|
||||
|
||||
<veui-alert-box
|
||||
type="success"
|
||||
:open.sync="open2"
|
||||
@ok="ok"
|
||||
>
|
||||
<template #title>
|
||||
Success
|
||||
<veui-icon name="info-circle"/>
|
||||
</template>
|
||||
<p>Saved successfully!</p>
|
||||
</veui-alert-box>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { AlertBox, Button, Icon } from 'veui'
|
||||
import 'veui-theme-dls-icons/info-circle'
|
||||
import toast from 'veui/managers/toast'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-alert-box': AlertBox,
|
||||
'veui-button': Button,
|
||||
'veui-icon': Icon
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
open1: false,
|
||||
open2: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
ok () {
|
||||
toast.info('Confirmed')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
.veui-button {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.icon {
|
||||
vertical-align: -2px;
|
||||
}
|
||||
</style>
|
67
one/docs/demo/alert-box/type.vue
Normal file
67
one/docs/demo/alert-box/type.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-button @click="successOpen = true">
|
||||
Success
|
||||
</veui-button>
|
||||
<veui-button @click="errorOpen = true">
|
||||
Error
|
||||
</veui-button>
|
||||
<veui-button @click="infoOpen = true">
|
||||
Info
|
||||
</veui-button>
|
||||
|
||||
<veui-alert-box
|
||||
type="success"
|
||||
:open.sync="successOpen"
|
||||
>
|
||||
<template #title>
|
||||
Success
|
||||
</template>
|
||||
<div>Saved successfully!</div>
|
||||
</veui-alert-box>
|
||||
|
||||
<veui-alert-box
|
||||
type="error"
|
||||
:open.sync="errorOpen"
|
||||
>
|
||||
<template #title>
|
||||
Error
|
||||
</template>
|
||||
<div>Not enough disk space!</div>
|
||||
</veui-alert-box>
|
||||
|
||||
<veui-alert-box
|
||||
type="info"
|
||||
:open.sync="infoOpen"
|
||||
>
|
||||
<template #title>
|
||||
Sytstem
|
||||
</template>
|
||||
<div>The total available storage is 5MB.</div>
|
||||
</veui-alert-box>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { AlertBox, Button } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-alert-box': AlertBox,
|
||||
'veui-button': Button
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
successOpen: false,
|
||||
errorOpen: false,
|
||||
infoOpen: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
.veui-button {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user