feat: publicize doc implemetation
This commit is contained in:
54
one/docs/demo/toast/default.vue
Normal file
54
one/docs/demo/toast/default.vue
Normal file
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<article>
|
||||
<section>
|
||||
<veui-toast
|
||||
type="info"
|
||||
open
|
||||
message="Press any key to continue..."
|
||||
/>
|
||||
</section>
|
||||
<section>
|
||||
<veui-toast
|
||||
type="success"
|
||||
open
|
||||
message="Your profile has been updated."
|
||||
/>
|
||||
</section>
|
||||
<section>
|
||||
<veui-toast
|
||||
type="warning"
|
||||
open
|
||||
>
|
||||
v1 is deprecated. Use v2 instead.
|
||||
</veui-toast>
|
||||
</section>
|
||||
<section>
|
||||
<veui-toast
|
||||
type="error"
|
||||
open
|
||||
message="Uncaught SyntaxError: Unexpected token +"
|
||||
/>
|
||||
</section>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Toast } from 'veui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-toast': Toast
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
.veui-toast {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
section {
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
41
one/docs/demo/toast/plugin.vue
Normal file
41
one/docs/demo/toast/plugin.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-button
|
||||
@click="$toast.info({
|
||||
message: 'Press any key to continue...',
|
||||
duration: 5000
|
||||
})"
|
||||
>
|
||||
Info
|
||||
</veui-button>
|
||||
<veui-button @click="$toast.success('Your profile has been updated.')">
|
||||
Success
|
||||
</veui-button>
|
||||
<veui-button @click="$toast.warn('v1 is deprecated. Use v2 instead.')">
|
||||
Warn
|
||||
</veui-button>
|
||||
<veui-button @click="$toast.error('Uncaught SyntaxError: Unexpected token +')">
|
||||
Error
|
||||
</veui-button>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { Button } from 'veui'
|
||||
import toast from 'veui/plugins/toast'
|
||||
|
||||
Vue.use(toast)
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-button': Button
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped docs>
|
||||
.veui-button {
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user