feat: update docs

This commit is contained in:
Justineo
2020-09-22 11:06:13 +08:00
parent d64014f3b4
commit 468f6995c3
32 changed files with 1032 additions and 548 deletions

View File

@@ -18,6 +18,12 @@
<veui-button>Redo</veui-button>
</veui-button-group>
</section>
<section>
<veui-button-group ui="basic">
<veui-button>Undo</veui-button>
<veui-button>Redo</veui-button>
</veui-button-group>
</section>
</article>
</template>

View File

@@ -12,7 +12,7 @@
<h4>Small size</h4>
<veui-check-button-group
v-model="selected"
ui="small"
ui="s"
:items="licenses"
/>
<p>Checked: {{ readable }}</p>

View File

@@ -0,0 +1,62 @@
<template>
<article>
<section>
<h4>Select size</h4>
<veui-check-button-group
v-model="selected"
:items="licenses"
empty-value="any"
/>
<p>Checked: {{ readable }}</p>
</section>
</article>
</template>
<script>
import { CheckButtonGroup } from 'veui'
export default {
components: {
'veui-check-button-group': CheckButtonGroup
},
data () {
return {
selected: ['any'],
licenses: [
{
label: 'Any',
value: 'any',
exclusive: true
},
{
label: 'Small',
value: 'sm'
},
{
label: 'Medium',
value: 'md'
},
{
label: 'Large',
value: 'lg'
}
]
}
},
computed: {
readable () {
return (this.selected || []).join(', ') || '-'
}
}
}
</script>
<style lang="less" scoped docs>
section {
margin-bottom: 20px;
}
h4 {
margin-top: 0;
}
</style>

View File

@@ -0,0 +1,62 @@
<template>
<article>
<section>
<h4>Select size</h4>
<veui-checkbox-group
v-model="selected"
:items="licenses"
empty-value="any"
/>
<p>Checked: {{ readable }}</p>
</section>
</article>
</template>
<script>
import { CheckboxGroup } from 'veui'
export default {
components: {
'veui-checkbox-group': CheckboxGroup
},
data () {
return {
selected: ['any'],
licenses: [
{
label: 'Any',
value: 'any',
exclusive: true
},
{
label: 'Small',
value: 'sm'
},
{
label: 'Medium',
value: 'md'
},
{
label: 'Large',
value: 'lg'
}
]
}
},
computed: {
readable () {
return (this.selected || []).join(', ') || '-'
}
}
}
</script>
<style lang="less" scoped docs>
section {
margin-bottom: 20px;
}
h4 {
margin-top: 0;
}
</style>

View File

@@ -36,3 +36,9 @@ export default {
}
}
</script>
<style lang="less" scoped docs>
section {
margin-bottom: 20px;
}
</style>

View File

@@ -36,3 +36,9 @@ export default {
}
}
</script>
<style lang="less" scoped docs>
section {
margin-bottom: 20px;
}
</style>

View File

@@ -22,10 +22,7 @@
:rules="ageRule"
label="年龄"
>
<veui-input
v-model="formData.age"
placeholder="错误提示优先出在右侧"
/>
<veui-input v-model="formData.age"/>
</veui-field>
<veui-field
@@ -129,7 +126,7 @@
</veui-button>
<veui-button
:loading="isValidating"
@click="() => this.$refs.form.reset()"
@click="resetForm"
>
重置
</veui-button>
@@ -320,6 +317,9 @@ export default {
},
handleInvalid () {
this.isValidating = false
},
resetForm () {
this.$refs.form.reset()
}
}
}

View File

@@ -8,8 +8,8 @@
@select="handleSelect"
/>
<veui-search-box
ui="strong"
v-model="value1"
ui="strong"
clearable
:suggestions="suggestions1"
replace-on-select
@@ -71,7 +71,7 @@ export default {
}
}
</script>
<style lang="less">
<style lang="less" scoped>
.veui-search-box {
margin-left: 1em;
}