add ContactCard component
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<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">
|
||||
<p>联系人:{{ username }}</p>
|
||||
<p>联系电话:{{ tel }}</p>
|
||||
</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'
|
||||
},
|
||||
username: {
|
||||
type: String
|
||||
},
|
||||
tel: {
|
||||
type: String
|
||||
},
|
||||
addText: {
|
||||
type: String,
|
||||
default: '添加订单联系人信息'
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -12,6 +12,7 @@ import CellSwipe from './cell-swipe';
|
||||
import Checkbox from './checkbox';
|
||||
import CheckboxGroup from './checkbox-group';
|
||||
import Col from './col';
|
||||
import ContactCard from './contact-card';
|
||||
import CouponCell from './coupon-cell';
|
||||
import CouponList from './coupon-list';
|
||||
import DatetimePicker from './datetime-picker';
|
||||
@@ -70,6 +71,7 @@ const components = [
|
||||
Checkbox,
|
||||
CheckboxGroup,
|
||||
Col,
|
||||
ContactCard,
|
||||
CouponCell,
|
||||
CouponList,
|
||||
DatetimePicker,
|
||||
@@ -138,6 +140,7 @@ export {
|
||||
Checkbox,
|
||||
CheckboxGroup,
|
||||
Col,
|
||||
ContactCard,
|
||||
CouponCell,
|
||||
CouponList,
|
||||
DatetimePicker,
|
||||
|
||||
@@ -56,3 +56,4 @@
|
||||
@import './goods-action.css';
|
||||
@import './submit-bar.css';
|
||||
@import './sku.css';
|
||||
@import './contact-card.css';
|
||||
|
||||
Reference in New Issue
Block a user