docs(Field): split demo

This commit is contained in:
陈嘉涵
2020-02-03 11:56:57 +08:00
parent 69560f4fce
commit 143bd4297f
13 changed files with 452 additions and 253 deletions
+44
View File
@@ -0,0 +1,44 @@
<template>
<demo-block :title="$t('showIcon')">
<van-cell-group>
<van-field
v-model="icon1"
:label="$t('text')"
left-icon="smile-o"
right-icon="warning-o"
:placeholder="$t('showIcon')"
/>
<van-field
v-model="icon2"
clearable
:label="$t('text')"
left-icon="music-o"
:placeholder="$t('showClearIcon')"
/>
</van-cell-group>
</demo-block>
</template>
<script>
export default {
i18n: {
'zh-CN': {
text: '文本',
showIcon: '显示图标',
showClearIcon: '显示清除图标',
},
'en-US': {
text: 'Text',
showIcon: 'Show Icon',
showClearIcon: 'Show Clear Icon',
},
},
data() {
return {
icon1: '',
icon2: '123',
};
},
};
</script>