feat(ContactList): refactor style & add new prop defaultTagText (#5089)

This commit is contained in:
rex
2019-11-26 20:44:35 +08:00
committed by neverland
parent c58f8e54ba
commit 592bcafda0
7 changed files with 88 additions and 47 deletions
+7 -3
View File
@@ -16,6 +16,7 @@
<van-contact-list
v-model="chosenContactId"
:list="list"
:default-tag-text="$t('defaultTagText')"
@add="onAdd"
@edit="onEdit"
@select="onSelect"
@@ -54,11 +55,13 @@ export default {
i18n: {
'zh-CN': {
name: '张三',
defaultLabel: '设为默认联系人'
defaultLabel: '设为默认联系人',
defaultTagText: '默认'
},
'en-US': {
name: 'John Snow',
defaultLabel: 'Set as the default contact'
defaultLabel: 'Set as the default contact',
defaultTagText: 'default'
}
},
@@ -78,7 +81,8 @@ export default {
return {
name: this.$t('name'),
tel: '13000000000',
id: 0
id: 0,
isDefault: 1
};
},