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,63 @@
<template>
<article>
<section>
<veui-checkbox
v-model="checked"
:ui="size"
:indeterminate.sync="indeterminate"
>
Checked: {{ checked }}
</veui-checkbox>
</section>
<section>
<veui-checkbox
v-model="small"
ui="s"
>
Small
</veui-checkbox>
<veui-checkbox
v-model="indeterminate"
ui="s"
>
Indeterminate
</veui-checkbox>
</section>
</article>
</template>
<script>
import { Checkbox } from 'veui'
export default {
components: {
'veui-checkbox': Checkbox
},
data () {
return {
checked: false,
indeterminate: false,
small: false
}
},
computed: {
size () {
return this.small ? 's' : ''
}
}
}
</script>
<style lang="stylus" scoped docs>
.veui-checkbox
& + &
margin-left 20px
</style>
<docs>
可以使用 `indeterminate` 属性来设置半选状态
</docs>
<docs locale="en-US">
Use the `indeterminate` prop to put the checkbox in indeterminate state.
</docs>

View File

@@ -0,0 +1,33 @@
<template>
<article>
<veui-checkbox
v-model="status"
true-value="CONFIRMED"
false-value="UNCONFIRMED"
>
I've read the agreement
</veui-checkbox>
<p>State: {{ statusMap[status] }}</p>
</article>
</template>
<script>
import { Checkbox } from 'veui'
const STATUS_MAP = {
CONFIRMED: 'Confirmed',
UNCONFIRMED: 'Not confirmed'
}
export default {
components: {
'veui-checkbox': Checkbox
},
data () {
return {
status: 'UNCONFIRMED',
statusMap: STATUS_MAP
}
}
}
</script>