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('insertButton')">
<van-cell-group>
<van-field
v-model="sms"
center
clearable
:label="$t('sms')"
:placeholder="$t('smsPlaceholder')"
>
<template #button>
<van-button size="small" type="primary">
{{ $t('sendSMS') }}
</van-button>
</template>
</van-field>
</van-cell-group>
</demo-block>
</template>
<script>
export default {
i18n: {
'zh-CN': {
sms: '短信验证码',
sendSMS: '发送验证码',
insertButton: '插入按钮',
smsPlaceholder: '请输入短信验证码',
},
'en-US': {
sms: 'SMS',
sendSMS: 'Send SMS',
insertButton: 'Insert Button',
smsPlaceholder: 'SMS',
},
},
data() {
return {
sms: '',
};
},
};
</script>