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,47 @@
<template>
<article>
<veui-radio
v-for="({ value, label }) in flavors"
:key="value"
v-model="flavor"
:value="value"
>
{{ label }}
</veui-radio>
<p>Selected: {{ flavorLabelMap[flavor] || '-' }}</p>
</article>
</template>
<script>
import { Radio } from 'veui'
export default {
components: {
'veui-radio': Radio
},
data () {
return {
flavor: null,
flavors: [
{ value: 'LATTE', label: 'Latte' },
{ value: 'MOCHA', label: 'Mocha' },
{ value: 'AMERICANO', label: 'Americano' }
]
}
},
computed: {
flavorLabelMap () {
return this.flavors.reduce((map, { value, label }) => {
map[value] = label
return map
}, {})
}
}
}
</script>
<style lang="less" scoped docs>
.veui-radio {
margin-right: 20px;
}
</style>

View File

@@ -0,0 +1,47 @@
<template>
<article>
<section>
<veui-radio
v-model="size"
value="m"
:ui="size"
name="size"
>
Normal size
</veui-radio>
<veui-radio
v-model="size"
value="s"
:ui="size"
name="size"
>
Small size
</veui-radio>
</section>
</article>
</template>
<script>
import { Radio } from 'veui'
export default {
components: {
'veui-radio': Radio
},
data () {
return {
size: 'm'
}
}
}
</script>
<style lang="less" scoped docs>
.veui-radio {
margin-right: 20px;
}
section {
margin-bottom: 20px;
}
</style>