neverland ffa3fddfae
[bugfix] remove unnecessary props (#323)
* 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
2017-11-16 03:12:13 -06:00

44 lines
1.0 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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 || $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>