mirror of
https://github.com/youzan/vant.git
synced 2026-05-02 01:01:43 +08:00
[new feature] add i18n support (#310)
* fix: Tabbar icon line-height * [new feature] progress add showPivot prop * [new feature] TabItem support vue-router * [new feature] update document header style * [Doc] add toast english ducoment * [new feature] add i18n support * feat: Extract demos from markdown * feat: Base components demos * [new feature] complete demo extract & translate * [fix] text cases * fix: add deepAssign test cases * fix: changelog detail * [new feature] AddressEdit support i18n
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
<van-cell-group>
|
||||
<van-cell v-for="(item, index) in list" :key="item.id">
|
||||
<van-radio :name="item.id" @click="$emit('select', item, index)">
|
||||
<p class="van-contact-list__text">联系人:{{ item.name }}</p>
|
||||
<p class="van-contact-list__text">联系电话:{{ item.tel }}</p>
|
||||
<p class="van-contact-list__text">{{ $t('name') }}:{{ item.name }}</p>
|
||||
<p class="van-contact-list__text">{{ $t('tel') }}:{{ item.tel }}</p>
|
||||
</van-radio>
|
||||
<van-icon name="edit" class="van-contact-list__edit" @click="$emit('edit', item, index)" />
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
<van-cell icon="add" class="van-contact-list__add van-hairline--top" @click="$emit('add')" :title="addText" isLink />
|
||||
<van-cell icon="add" class="van-contact-list__add van-hairline--top" @click="$emit('add')" :title="addText || $t('addText')" isLink />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -21,10 +21,13 @@ import Cell from '../cell';
|
||||
import Radio from '../radio';
|
||||
import CellGroup from '../cell-group';
|
||||
import RadioGroup from '../radio-group';
|
||||
import { i18n } from '../locale';
|
||||
|
||||
export default {
|
||||
name: 'van-contact-list',
|
||||
|
||||
mixins: [i18n],
|
||||
|
||||
components: {
|
||||
[Icon.name]: Icon,
|
||||
[Cell.name]: Cell,
|
||||
@@ -35,10 +38,7 @@ export default {
|
||||
|
||||
props: {
|
||||
value: {},
|
||||
addText: {
|
||||
type: String,
|
||||
default: '新建联系人'
|
||||
},
|
||||
addText: String,
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
|
||||
Reference in New Issue
Block a user