first
This commit is contained in:
1
node_modules/vant/es/contact-card/index.css
generated
vendored
Normal file
1
node_modules/vant/es/contact-card/index.css
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
.van-contact-card{padding:16px}.van-contact-card__value{margin-left:5px;line-height:20px}.van-contact-card--add .van-contact-card__value{line-height:40px}.van-contact-card--add .van-cell__left-icon{color:#1989fa;font-size:40px}.van-contact-card::before{position:absolute;right:0;bottom:0;left:0;height:2px;background:-webkit-repeating-linear-gradient(135deg,#ff6c6c 0,#ff6c6c 20%,transparent 0,transparent 25%,#1989fa 0,#1989fa 45%,transparent 0,transparent 50%);background:repeating-linear-gradient(-45deg,#ff6c6c 0,#ff6c6c 20%,transparent 0,transparent 25%,#1989fa 0,#1989fa 45%,transparent 0,transparent 50%);background-size:80px;content:''}
|
59
node_modules/vant/es/contact-card/index.js
generated
vendored
Normal file
59
node_modules/vant/es/contact-card/index.js
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
||||
// Utils
|
||||
import { createNamespace } from '../utils';
|
||||
import { emit, inherit } from '../utils/functional'; // Components
|
||||
|
||||
import Cell from '../cell'; // Types
|
||||
|
||||
var _createNamespace = createNamespace('contact-card'),
|
||||
createComponent = _createNamespace[0],
|
||||
bem = _createNamespace[1],
|
||||
t = _createNamespace[2];
|
||||
|
||||
function ContactCard(h, props, slots, ctx) {
|
||||
var type = props.type,
|
||||
editable = props.editable;
|
||||
|
||||
function onClick(event) {
|
||||
if (editable) {
|
||||
emit(ctx, 'click', event);
|
||||
}
|
||||
}
|
||||
|
||||
function Content() {
|
||||
if (type === 'add') {
|
||||
return props.addText || t('addText');
|
||||
}
|
||||
|
||||
return [h("div", [t('name') + "\uFF1A" + props.name]), h("div", [t('tel') + "\uFF1A" + props.tel])];
|
||||
}
|
||||
|
||||
return h(Cell, _mergeJSXProps([{
|
||||
"attrs": {
|
||||
"center": true,
|
||||
"border": false,
|
||||
"isLink": editable,
|
||||
"valueClass": bem('value'),
|
||||
"icon": type === 'edit' ? 'contact' : 'add-square'
|
||||
},
|
||||
"class": bem([type]),
|
||||
"on": {
|
||||
"click": onClick
|
||||
}
|
||||
}, inherit(ctx)]), [Content()]);
|
||||
}
|
||||
|
||||
ContactCard.props = {
|
||||
tel: String,
|
||||
name: String,
|
||||
addText: String,
|
||||
editable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'add'
|
||||
}
|
||||
};
|
||||
export default createComponent(ContactCard);
|
42
node_modules/vant/es/contact-card/index.less
generated
vendored
Normal file
42
node_modules/vant/es/contact-card/index.less
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-contact-card {
|
||||
padding: @contact-card-padding;
|
||||
|
||||
&__value {
|
||||
margin-left: 5px;
|
||||
line-height: @contact-card-value-line-height;
|
||||
}
|
||||
|
||||
&--add {
|
||||
.van-contact-card__value {
|
||||
line-height: @contact-card-add-icon-size;
|
||||
}
|
||||
|
||||
.van-cell__left-icon {
|
||||
color: @contact-card-add-icon-color;
|
||||
font-size: @contact-card-add-icon-size;
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
background: repeating-linear-gradient(
|
||||
-45deg,
|
||||
#ff6c6c 0,
|
||||
#ff6c6c 20%,
|
||||
transparent 0,
|
||||
transparent 25%,
|
||||
@blue 0,
|
||||
@blue 45%,
|
||||
transparent 0,
|
||||
transparent 50%
|
||||
);
|
||||
background-size: 80px;
|
||||
content: '';
|
||||
}
|
||||
}
|
5
node_modules/vant/es/contact-card/style/index.js
generated
vendored
Normal file
5
node_modules/vant/es/contact-card/style/index.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import '../../style/base.css';
|
||||
import '../../info/index.css';
|
||||
import '../../icon/index.css';
|
||||
import '../../cell/index.css';
|
||||
import '../index.css';
|
5
node_modules/vant/es/contact-card/style/less.js
generated
vendored
Normal file
5
node_modules/vant/es/contact-card/style/less.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import '../../style/base.less';
|
||||
import '../../info/index.less';
|
||||
import '../../icon/index.less';
|
||||
import '../../cell/index.less';
|
||||
import '../index.less';
|
Reference in New Issue
Block a user