first
This commit is contained in:
1
node_modules/vant/lib/contact-list/index.css
generated
vendored
Normal file
1
node_modules/vant/lib/contact-list/index.css
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
.van-contact-list{box-sizing:border-box;height:100%;padding-bottom:80px}.van-contact-list__item{padding:16px}.van-contact-list__item-value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding-right:32px;padding-left:8px}.van-contact-list__item-tag{-webkit-box-flex:0;-webkit-flex:none;flex:none;margin-left:8px;padding-top:0;padding-bottom:0;line-height:1.4em}.van-contact-list__group{box-sizing:border-box;height:100%;overflow-y:scroll;-webkit-overflow-scrolling:touch}.van-contact-list__edit{font-size:16px}.van-contact-list__bottom{position:fixed;right:0;bottom:0;left:0;z-index:999;padding:0 16px;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom);background-color:#fff}.van-contact-list__add{height:40px;margin:5px 0}
|
138
node_modules/vant/lib/contact-list/index.js
generated
vendored
Normal file
138
node_modules/vant/lib/contact-list/index.js
generated
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
|
||||
var _babelHelperVueJsxMergeProps = _interopRequireDefault(require("@vue/babel-helper-vue-jsx-merge-props"));
|
||||
|
||||
var _utils = require("../utils");
|
||||
|
||||
var _constant = require("../utils/constant");
|
||||
|
||||
var _functional = require("../utils/functional");
|
||||
|
||||
var _tag = _interopRequireDefault(require("../tag"));
|
||||
|
||||
var _icon = _interopRequireDefault(require("../icon"));
|
||||
|
||||
var _cell = _interopRequireDefault(require("../cell"));
|
||||
|
||||
var _radio = _interopRequireDefault(require("../radio"));
|
||||
|
||||
var _button = _interopRequireDefault(require("../button"));
|
||||
|
||||
var _radioGroup = _interopRequireDefault(require("../radio-group"));
|
||||
|
||||
// Utils
|
||||
// Components
|
||||
var _createNamespace = (0, _utils.createNamespace)('contact-list'),
|
||||
createComponent = _createNamespace[0],
|
||||
bem = _createNamespace[1],
|
||||
t = _createNamespace[2];
|
||||
|
||||
function ContactList(h, props, slots, ctx) {
|
||||
var List = props.list && props.list.map(function (item, index) {
|
||||
function onClick() {
|
||||
(0, _functional.emit)(ctx, 'input', item.id);
|
||||
(0, _functional.emit)(ctx, 'select', item, index);
|
||||
}
|
||||
|
||||
function RightIcon() {
|
||||
return h(_radio.default, {
|
||||
"attrs": {
|
||||
"name": item.id,
|
||||
"iconSize": 16,
|
||||
"checkedColor": _constant.RED
|
||||
},
|
||||
"on": {
|
||||
"click": onClick
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function LeftIcon() {
|
||||
return h(_icon.default, {
|
||||
"attrs": {
|
||||
"name": "edit"
|
||||
},
|
||||
"class": bem('edit'),
|
||||
"on": {
|
||||
"click": function click(event) {
|
||||
event.stopPropagation();
|
||||
(0, _functional.emit)(ctx, 'edit', item, index);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function Content() {
|
||||
var nodes = [item.name + "\uFF0C" + item.tel];
|
||||
|
||||
if (item.isDefault && props.defaultTagText) {
|
||||
nodes.push(h(_tag.default, {
|
||||
"attrs": {
|
||||
"type": "danger",
|
||||
"round": true
|
||||
},
|
||||
"class": bem('item-tag')
|
||||
}, [props.defaultTagText]));
|
||||
}
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
return h(_cell.default, {
|
||||
"key": item.id,
|
||||
"attrs": {
|
||||
"isLink": true,
|
||||
"center": true,
|
||||
"valueClass": bem('item-value')
|
||||
},
|
||||
"class": bem('item'),
|
||||
"scopedSlots": {
|
||||
icon: LeftIcon,
|
||||
default: Content,
|
||||
'right-icon': RightIcon
|
||||
},
|
||||
"on": {
|
||||
"click": onClick
|
||||
}
|
||||
});
|
||||
});
|
||||
return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
|
||||
"class": bem()
|
||||
}, (0, _functional.inherit)(ctx)]), [h(_radioGroup.default, {
|
||||
"attrs": {
|
||||
"value": props.value
|
||||
},
|
||||
"class": bem('group')
|
||||
}, [List]), h("div", {
|
||||
"class": bem('bottom')
|
||||
}, [h(_button.default, {
|
||||
"attrs": {
|
||||
"round": true,
|
||||
"block": true,
|
||||
"type": "danger",
|
||||
"text": props.addText || t('addText')
|
||||
},
|
||||
"class": bem('add'),
|
||||
"on": {
|
||||
"click": function click() {
|
||||
(0, _functional.emit)(ctx, 'add');
|
||||
}
|
||||
}
|
||||
})])]);
|
||||
}
|
||||
|
||||
ContactList.props = {
|
||||
value: null,
|
||||
list: Array,
|
||||
addText: String,
|
||||
defaultTagText: String
|
||||
};
|
||||
|
||||
var _default = createComponent(ContactList);
|
||||
|
||||
exports.default = _default;
|
54
node_modules/vant/lib/contact-list/index.less
generated
vendored
Normal file
54
node_modules/vant/lib/contact-list/index.less
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-contact-list {
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
padding-bottom: 80px;
|
||||
|
||||
&__item {
|
||||
padding: @contact-list-item-padding;
|
||||
}
|
||||
|
||||
&__item-value {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: @padding-xl;
|
||||
padding-left: @padding-xs;
|
||||
}
|
||||
|
||||
&__item-tag {
|
||||
flex: none;
|
||||
margin-left: @padding-xs;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
&__group {
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
&__edit {
|
||||
font-size: @contact-list-edit-icon-size;
|
||||
}
|
||||
|
||||
&__bottom {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: @contact-list-add-button-z-index;
|
||||
padding: 0 @padding-md;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
background-color: @white;
|
||||
}
|
||||
|
||||
&__add {
|
||||
height: 40px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
}
|
10
node_modules/vant/lib/contact-list/style/index.js
generated
vendored
Normal file
10
node_modules/vant/lib/contact-list/style/index.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
require('../../style/base.css');
|
||||
require('../../info/index.css');
|
||||
require('../../icon/index.css');
|
||||
require('../../radio/index.css');
|
||||
require('../../tag/index.css');
|
||||
require('../../cell/index.css');
|
||||
require('../../loading/index.css');
|
||||
require('../../button/index.css');
|
||||
require('../../radio-group/index.css');
|
||||
require('../index.css');
|
10
node_modules/vant/lib/contact-list/style/less.js
generated
vendored
Normal file
10
node_modules/vant/lib/contact-list/style/less.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
require('../../style/base.less');
|
||||
require('../../info/index.less');
|
||||
require('../../icon/index.less');
|
||||
require('../../radio/index.less');
|
||||
require('../../tag/index.less');
|
||||
require('../../cell/index.less');
|
||||
require('../../loading/index.less');
|
||||
require('../../button/index.less');
|
||||
require('../../radio-group/index.less');
|
||||
require('../index.less');
|
Reference in New Issue
Block a user