mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
* [bugfix] Checkbox border render error in weixin browser * [bugfix] TreeSelect dependency path error * [bugfix] Swipe should clear autoplay timer when destroyed * [bugfix] Optimize component dependency analyze when build style entry * merge * update yarn.lock * update README.md * update README.md * update README.md * update README.md * update README.md * [Doc] add more badges in README.md * update README.md * [bugfix] Address & Contact list style * fix: contact test cases
48 lines
1.1 KiB
Vue
48 lines
1.1 KiB
Vue
<template>
|
||
<div :class="['van-contact-card', `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 }}</div>
|
||
</template>
|
||
<template v-else-if="type === 'edit'">
|
||
<van-icon class="van-contact-card__icon" name="contact" />
|
||
<div class="van-contact-card__text">
|
||
<div>联系人:{{ name }}</div>
|
||
<div>联系电话:{{ tel }}</div>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
<van-icon class="van-contact-card__arrow" name="arrow" />
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import Icon from '../icon';
|
||
|
||
export default {
|
||
name: 'van-contact-card',
|
||
|
||
components: {
|
||
[Icon.name]: Icon
|
||
},
|
||
|
||
props: {
|
||
type: {
|
||
type: String,
|
||
default: 'add'
|
||
},
|
||
name: {
|
||
type: String
|
||
},
|
||
tel: {
|
||
type: String
|
||
},
|
||
addText: {
|
||
type: String,
|
||
default: '添加订单联系人信息'
|
||
}
|
||
}
|
||
};
|
||
</script>
|