mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
* 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 * [bugfix] Search box-sizing wrong * [Doc] update vant-demo respo * [Doc] translate theme & demo pages * [Doc] add Internationalization document * [bugfix] remove unnecessary props * [fix] optimize clickoutside * [new feature] optimize find-parent * [new feature]: change document title accordinng to language * [new feature] Pagination code review * [improvement] adjust icon-font unicode * [improvement] Icon spinner color inherit * [improvement] icon default width * [bugfix] DateTimePicker validate date props * [bugfix] Tab item text ellipsis * [improvement] optimize single line ellipsis * [Improvement] optimzie staticClass
44 lines
1.0 KiB
Vue
44 lines
1.0 KiB
Vue
<template>
|
||
<div class="van-contact-card" :class="`van-contact-card--${type}`" v-on="$listeners">
|
||
<div class="van-contact-card__content">
|
||
<template v-if="type === 'add'">
|
||
<van-icon class="van-contact-card__icon" name="add2" />
|
||
<div class="van-contact-card__text">{{ addText || $t('addText') }}</div>
|
||
</template>
|
||
<template v-else-if="type === 'edit'">
|
||
<van-icon class="van-contact-card__icon" name="contact" />
|
||
<div class="van-contact-card__text">
|
||
<div>{{ $t('name') }}:{{ name }}</div>
|
||
<div>{{ $t('tel') }}:{{ tel }}</div>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
<van-icon class="van-contact-card__arrow" name="arrow" />
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import Icon from '../icon';
|
||
import { i18n } from '../locale';
|
||
|
||
export default {
|
||
name: 'van-contact-card',
|
||
|
||
mixins: [i18n],
|
||
|
||
components: {
|
||
[Icon.name]: Icon
|
||
},
|
||
|
||
props: {
|
||
tel: String,
|
||
name: String,
|
||
addText: String,
|
||
type: {
|
||
type: String,
|
||
default: 'add'
|
||
}
|
||
}
|
||
};
|
||
</script>
|