feat: publicize doc implemetation

This commit is contained in:
Justineo
2020-08-13 11:47:56 +08:00
parent 55b9b044f2
commit 1e5fcff6ad
372 changed files with 50636 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<template>
<article>
<veui-alert
type="info"
close-label="Got it"
closable
:open.sync="open"
:message="messages"
/>
<section v-if="!open">
<veui-button @click="open = true">
Open
</veui-button>
</section>
</article>
</template>
<script>
import { Alert, Button } from 'veui'
export default {
components: {
'veui-alert': Alert,
'veui-button': Button
},
data () {
return {
open: true,
messages: [
'Component data must be a function.',
'Prop definitions should be as detailed as possible.',
'Always use key with v-for.',
'Never use v-if on the same element as v-for.'
]
}
}
}
</script>
<docs>
可以指定 `closable` 属性为 `true` 来允许提示被用户主动关闭还可以通过指定 `close-label` 属性来将关闭按钮以文字形式展现
</docs>
<docs locale="en-US">
Set the `closable` prop to `true` to allow the alert message to be closed by users. You can also use the `close-label` prop to make the close button shown as specified text.
</docs>

View File

@@ -0,0 +1,41 @@
<template>
<article>
<veui-alert type="success">
Your profile has been updated.
</veui-alert>
<veui-alert type="info">
Press any key to continue...
</veui-alert>
<veui-alert type="warning">
<code>scope</code> is deprecated. Use <code>slot-scope</code> instead.
</veui-alert>
<veui-alert
type="error"
message="Uncaught SyntaxError: Unexpected token +"
/>
</article>
</template>
<script>
import { Alert } from 'veui'
export default {
components: {
'veui-alert': Alert
}
}
</script>
<style lang="less" scoped docs>
.veui-alert {
margin-bottom: 20px;
}
</style>
<docs>
可将消息内容写在默认插槽中也可以通过 `message` 属性进行指定
</docs>
<docs locale="en-US">
Messages can either be specified in the default slot, or via the `message` prop.
</docs>