This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

1
node_modules/vant/es/action-sheet/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-action-sheet{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;max-height:80%;overflow:hidden;color:#323233}.van-action-sheet__content{-webkit-box-flex:1;-webkit-flex:1 auto;flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-action-sheet__cancel,.van-action-sheet__item{display:block;width:100%;padding:14px 16px;font-size:16px;background-color:#fff;border:none;cursor:pointer}.van-action-sheet__cancel:active,.van-action-sheet__item:active{background-color:#f2f3f5}.van-action-sheet__item{line-height:22px}.van-action-sheet__item--disabled,.van-action-sheet__item--loading{color:#c8c9cc}.van-action-sheet__item--disabled:active,.van-action-sheet__item--loading:active{background-color:#fff}.van-action-sheet__item--disabled{cursor:not-allowed}.van-action-sheet__item--loading{cursor:default}.van-action-sheet__cancel{-webkit-flex-shrink:0;flex-shrink:0;box-sizing:border-box;color:#646566}.van-action-sheet__subname{margin-top:8px;color:#969799;font-size:12px;line-height:18px}.van-action-sheet__gap{display:block;height:8px;background-color:#f7f8fa}.van-action-sheet__header{-webkit-flex-shrink:0;flex-shrink:0;font-weight:500;font-size:16px;line-height:48px;text-align:center}.van-action-sheet__description{position:relative;-webkit-flex-shrink:0;flex-shrink:0;padding:20px 16px;color:#969799;font-size:14px;line-height:20px;text-align:center}.van-action-sheet__description::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-action-sheet__loading-icon .van-loading__spinner{width:22px;height:22px}.van-action-sheet__close{position:absolute;top:0;right:0;z-index:1;padding:0 16px;color:#c8c9cc;font-size:22px;line-height:inherit}.van-action-sheet__close:active{color:#969799}

180
node_modules/vant/es/action-sheet/index.js generated vendored Normal file
View File

@ -0,0 +1,180 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
import Vue from 'vue'; // Utils
import { createNamespace } from '../utils';
import { emit, inherit } from '../utils/functional'; // Mixins
import { popupMixinProps } from '../mixins/popup'; // Components
import Icon from '../icon';
import Popup from '../popup';
import Loading from '../loading'; // Types
var _createNamespace = createNamespace('action-sheet'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
function ActionSheet(h, props, slots, ctx) {
var title = props.title,
cancelText = props.cancelText,
closeable = props.closeable;
function onCancel() {
emit(ctx, 'input', false);
emit(ctx, 'cancel');
}
function Header() {
if (title) {
return h("div", {
"class": bem('header')
}, [title, closeable && h(Icon, {
"attrs": {
"name": props.closeIcon
},
"class": bem('close'),
"on": {
"click": onCancel
}
})]);
}
}
function Option(item, index) {
var disabled = item.disabled,
loading = item.loading,
callback = item.callback;
function onClickOption(event) {
event.stopPropagation();
if (disabled || loading) {
return;
}
if (callback) {
callback(item);
}
if (props.closeOnClickAction) {
emit(ctx, 'input', false);
}
Vue.nextTick(function () {
emit(ctx, 'select', item, index);
});
}
function OptionContent() {
if (loading) {
return h(Loading, {
"class": bem('loading-icon')
});
}
return [h("span", {
"class": bem('name')
}, [item.name]), item.subname && h("div", {
"class": bem('subname')
}, [item.subname])];
}
return h("button", {
"attrs": {
"type": "button"
},
"class": [bem('item', {
disabled: disabled,
loading: loading
}), item.className],
"style": {
color: item.color
},
"on": {
"click": onClickOption
}
}, [OptionContent()]);
}
function CancelText() {
if (cancelText) {
return [h("div", {
"class": bem('gap')
}), h("button", {
"attrs": {
"type": "button"
},
"class": bem('cancel'),
"on": {
"click": onCancel
}
}, [cancelText])];
}
}
function Description() {
var description = (slots.description == null ? void 0 : slots.description()) || props.description;
if (description) {
return h("div", {
"class": bem('description')
}, [description]);
}
}
return h(Popup, _mergeJSXProps([{
"class": bem(),
"attrs": {
"position": "bottom",
"round": props.round,
"value": props.value,
"overlay": props.overlay,
"duration": props.duration,
"lazyRender": props.lazyRender,
"lockScroll": props.lockScroll,
"getContainer": props.getContainer,
"closeOnPopstate": props.closeOnPopstate,
"closeOnClickOverlay": props.closeOnClickOverlay,
"safeAreaInsetBottom": props.safeAreaInsetBottom
}
}, inherit(ctx, true)]), [Header(), Description(), h("div", {
"class": bem('content')
}, [props.actions && props.actions.map(Option), slots.default == null ? void 0 : slots.default()]), CancelText()]);
}
ActionSheet.props = _extends({}, popupMixinProps, {
title: String,
actions: Array,
duration: [Number, String],
cancelText: String,
description: String,
getContainer: [String, Function],
closeOnPopstate: Boolean,
closeOnClickAction: Boolean,
round: {
type: Boolean,
default: true
},
closeable: {
type: Boolean,
default: true
},
closeIcon: {
type: String,
default: 'cross'
},
safeAreaInsetBottom: {
type: Boolean,
default: true
},
overlay: {
type: Boolean,
default: true
},
closeOnClickOverlay: {
type: Boolean,
default: true
}
});
export default createComponent(ActionSheet);

113
node_modules/vant/es/action-sheet/index.less generated vendored Normal file
View File

@ -0,0 +1,113 @@
@import '../style/var';
@import '../style/mixins/hairline';
.van-action-sheet {
display: flex;
flex-direction: column;
max-height: @action-sheet-max-height;
overflow: hidden;
color: @action-sheet-item-text-color;
&__content {
flex: 1 auto;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
&__item,
&__cancel {
display: block;
width: 100%;
padding: 14px @padding-md;
font-size: @action-sheet-item-font-size;
background-color: @action-sheet-item-background;
border: none;
cursor: pointer;
&:active {
background-color: @active-color;
}
}
&__item {
line-height: @action-sheet-item-line-height;
&--loading,
&--disabled {
color: @action-sheet-item-disabled-text-color;
&:active {
background-color: @action-sheet-item-background;
}
}
&--disabled {
cursor: not-allowed;
}
&--loading {
cursor: default;
}
}
&__cancel {
flex-shrink: 0;
box-sizing: border-box;
color: @action-sheet-cancel-text-color;
}
&__subname {
margin-top: @padding-xs;
color: @action-sheet-subname-color;
font-size: @action-sheet-subname-font-size;
line-height: @action-sheet-subname-line-height;
}
&__gap {
display: block;
height: @action-sheet-cancel-padding-top;
background-color: @action-sheet-cancel-padding-color;
}
&__header {
flex-shrink: 0;
font-weight: @font-weight-bold;
font-size: @action-sheet-header-font-size;
line-height: @action-sheet-header-height;
text-align: center;
}
&__description {
position: relative;
flex-shrink: 0;
padding: 20px @padding-md;
color: @action-sheet-description-color;
font-size: @action-sheet-description-font-size;
line-height: @action-sheet-description-line-height;
text-align: center;
&::after {
.hairline-bottom(@cell-border-color, @padding-md, @padding-md);
}
}
&__loading-icon .van-loading__spinner {
width: @action-sheet-loading-icon-size;
height: @action-sheet-loading-icon-size;
}
&__close {
position: absolute;
top: 0;
right: 0;
z-index: 1;
padding: @action-sheet-close-icon-padding;
color: @action-sheet-close-icon-color;
font-size: @action-sheet-close-icon-size;
line-height: inherit;
&:active {
color: @action-sheet-close-icon-active-color;
}
}
}

7
node_modules/vant/es/action-sheet/style/index.js generated vendored Normal file
View File

@ -0,0 +1,7 @@
import '../../style/base.css';
import '../../overlay/index.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../../popup/index.css';
import '../../loading/index.css';
import '../index.css';

7
node_modules/vant/es/action-sheet/style/less.js generated vendored Normal file
View File

@ -0,0 +1,7 @@
import '../../style/base.less';
import '../../overlay/index.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../popup/index.less';
import '../../loading/index.less';
import '../index.less';

116
node_modules/vant/es/address-edit/Detail.js generated vendored Normal file
View File

@ -0,0 +1,116 @@
import _extends from "@babel/runtime/helpers/esm/extends";
// Utils
import { createNamespace } from '../utils';
import { isAndroid } from '../utils/validate/system'; // Components
import Cell from '../cell';
import Field from '../field';
var _createNamespace = createNamespace('address-edit-detail'),
createComponent = _createNamespace[0],
bem = _createNamespace[1],
t = _createNamespace[2];
var android = isAndroid();
export default createComponent({
props: {
value: String,
errorMessage: String,
focused: Boolean,
detailRows: [Number, String],
searchResult: Array,
detailMaxlength: [Number, String],
showSearchResult: Boolean
},
computed: {
shouldShowSearchResult: function shouldShowSearchResult() {
return this.focused && this.searchResult && this.showSearchResult;
}
},
methods: {
onSelect: function onSelect(express) {
this.$emit('select-search', express);
this.$emit('input', ((express.address || '') + " " + (express.name || '')).trim());
},
onFinish: function onFinish() {
this.$refs.field.blur();
},
genFinish: function genFinish() {
var h = this.$createElement;
var show = this.value && this.focused && android;
if (show) {
return h("div", {
"class": bem('finish'),
"on": {
"click": this.onFinish
}
}, [t('complete')]);
}
},
genSearchResult: function genSearchResult() {
var _this = this;
var h = this.$createElement;
var value = this.value,
shouldShowSearchResult = this.shouldShowSearchResult,
searchResult = this.searchResult;
if (shouldShowSearchResult) {
return searchResult.map(function (express) {
return h(Cell, {
"key": express.name + express.address,
"attrs": {
"clickable": true,
"border": false,
"icon": "location-o",
"label": express.address
},
"class": bem('search-item'),
"on": {
"click": function click() {
_this.onSelect(express);
}
},
"scopedSlots": {
title: function title() {
if (express.name) {
var text = express.name.replace(value, "<span class=" + bem('keyword') + ">" + value + "</span>");
return h("div", {
"domProps": {
"innerHTML": text
}
});
}
}
}
});
});
}
}
},
render: function render() {
var h = arguments[0];
return h(Cell, {
"class": bem()
}, [h(Field, {
"attrs": {
"autosize": true,
"rows": this.detailRows,
"clearable": !android,
"type": "textarea",
"value": this.value,
"errorMessage": this.errorMessage,
"border": !this.shouldShowSearchResult,
"label": t('label'),
"maxlength": this.detailMaxlength,
"placeholder": t('placeholder')
},
"ref": "field",
"scopedSlots": {
icon: this.genFinish
},
"on": _extends({}, this.$listeners)
}), this.genSearchResult()]);
}
});

1
node_modules/vant/es/address-edit/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-address-edit{padding:12px}.van-address-edit__fields{overflow:hidden;border-radius:8px}.van-address-edit__fields .van-field__label{width:4.1em}.van-address-edit__default{margin-top:12px;overflow:hidden;border-radius:8px}.van-address-edit__buttons{padding:32px 4px}.van-address-edit__buttons .van-button{margin-bottom:12px}.van-address-edit-detail{padding:0}.van-address-edit-detail__search-item{background-color:#f2f3f5}.van-address-edit-detail__keyword{color:#ee0a24}.van-address-edit-detail__finish{color:#1989fa;font-size:12px}

495
node_modules/vant/es/address-edit/index.js generated vendored Normal file
View File

@ -0,0 +1,495 @@
import _extends from "@babel/runtime/helpers/esm/extends";
// Utils
import { createNamespace, isObject } from '../utils';
import { isMobile } from '../utils/validate/mobile'; // Components
import Area from '../area';
import Cell from '../cell';
import Field from '../field';
import Popup from '../popup';
import Toast from '../toast';
import Button from '../button';
import Dialog from '../dialog';
import Detail from './Detail';
import Switch from '../switch';
var _createNamespace = createNamespace('address-edit'),
createComponent = _createNamespace[0],
bem = _createNamespace[1],
t = _createNamespace[2];
var defaultData = {
name: '',
tel: '',
country: '',
province: '',
city: '',
county: '',
areaCode: '',
postalCode: '',
addressDetail: '',
isDefault: false
};
function isPostal(value) {
return /^\d{6}$/.test(value);
}
export default createComponent({
props: {
areaList: Object,
isSaving: Boolean,
isDeleting: Boolean,
validator: Function,
showDelete: Boolean,
showPostal: Boolean,
searchResult: Array,
telMaxlength: [Number, String],
showSetDefault: Boolean,
saveButtonText: String,
areaPlaceholder: String,
deleteButtonText: String,
showSearchResult: Boolean,
showArea: {
type: Boolean,
default: true
},
showDetail: {
type: Boolean,
default: true
},
disableArea: Boolean,
detailRows: {
type: [Number, String],
default: 1
},
detailMaxlength: {
type: [Number, String],
default: 200
},
addressInfo: {
type: Object,
default: function _default() {
return _extends({}, defaultData);
}
},
telValidator: {
type: Function,
default: isMobile
},
postalValidator: {
type: Function,
default: isPostal
},
areaColumnsPlaceholder: {
type: Array,
default: function _default() {
return [];
}
}
},
data: function data() {
return {
data: {},
showAreaPopup: false,
detailFocused: false,
errorInfo: {
tel: '',
name: '',
areaCode: '',
postalCode: '',
addressDetail: ''
}
};
},
computed: {
areaListLoaded: function areaListLoaded() {
return isObject(this.areaList) && Object.keys(this.areaList).length;
},
areaText: function areaText() {
var _this$data = this.data,
country = _this$data.country,
province = _this$data.province,
city = _this$data.city,
county = _this$data.county,
areaCode = _this$data.areaCode;
if (areaCode) {
var arr = [country, province, city, county];
if (province && province === city) {
arr.splice(1, 1);
}
return arr.filter(function (text) {
return text;
}).join('/');
}
return '';
},
// hide bottom field when use search && detail get focused
hideBottomFields: function hideBottomFields() {
var searchResult = this.searchResult;
return searchResult && searchResult.length && this.detailFocused;
}
},
watch: {
addressInfo: {
handler: function handler(val) {
this.data = _extends({}, defaultData, val);
this.setAreaCode(val.areaCode);
},
deep: true,
immediate: true
},
areaList: function areaList() {
this.setAreaCode(this.data.areaCode);
}
},
methods: {
onFocus: function onFocus(key) {
this.errorInfo[key] = '';
this.detailFocused = key === 'addressDetail';
this.$emit('focus', key);
},
onChangeDetail: function onChangeDetail(val) {
this.data.addressDetail = val;
this.$emit('change-detail', val);
},
onAreaConfirm: function onAreaConfirm(values) {
values = values.filter(function (value) {
return !!value;
});
if (values.some(function (value) {
return !value.code;
})) {
Toast(t('areaEmpty'));
return;
}
this.showAreaPopup = false;
this.assignAreaValues();
this.$emit('change-area', values);
},
assignAreaValues: function assignAreaValues() {
var area = this.$refs.area;
if (area) {
var detail = area.getArea();
detail.areaCode = detail.code;
delete detail.code;
_extends(this.data, detail);
}
},
onSave: function onSave() {
var _this = this;
var items = ['name', 'tel'];
if (this.showArea) {
items.push('areaCode');
}
if (this.showDetail) {
items.push('addressDetail');
}
if (this.showPostal) {
items.push('postalCode');
}
var isValid = items.every(function (item) {
var msg = _this.getErrorMessage(item);
if (msg) {
_this.errorInfo[item] = msg;
}
return !msg;
});
if (isValid && !this.isSaving) {
this.$emit('save', this.data);
}
},
getErrorMessage: function getErrorMessage(key) {
var value = String(this.data[key] || '').trim();
if (this.validator) {
var message = this.validator(key, value);
if (message) {
return message;
}
}
switch (key) {
case 'name':
return value ? '' : t('nameEmpty');
case 'tel':
return this.telValidator(value) ? '' : t('telInvalid');
case 'areaCode':
return value ? '' : t('areaEmpty');
case 'addressDetail':
return value ? '' : t('addressEmpty');
case 'postalCode':
return value && !this.postalValidator(value) ? t('postalEmpty') : '';
}
},
onDelete: function onDelete() {
var _this2 = this;
Dialog.confirm({
title: t('confirmDelete')
}).then(function () {
_this2.$emit('delete', _this2.data);
}).catch(function () {
_this2.$emit('cancel-delete', _this2.data);
});
},
// get values of area component
getArea: function getArea() {
return this.$refs.area ? this.$refs.area.getValues() : [];
},
// set area code to area component
setAreaCode: function setAreaCode(code) {
this.data.areaCode = code || '';
if (code) {
this.$nextTick(this.assignAreaValues);
}
},
// @exposed-api
setAddressDetail: function setAddressDetail(value) {
this.data.addressDetail = value;
},
onDetailBlur: function onDetailBlur() {
var _this3 = this;
// await for click search event
setTimeout(function () {
_this3.detailFocused = false;
});
},
genSetDefaultCell: function genSetDefaultCell(h) {
var _this4 = this;
if (this.showSetDefault) {
var slots = {
'right-icon': function rightIcon() {
return h(Switch, {
"attrs": {
"size": "24"
},
"on": {
"change": function change(event) {
_this4.$emit('change-default', event);
}
},
"model": {
value: _this4.data.isDefault,
callback: function callback($$v) {
_this4.$set(_this4.data, "isDefault", $$v);
}
}
});
}
};
return h(Cell, {
"directives": [{
name: "show",
value: !this.hideBottomFields
}],
"attrs": {
"center": true,
"title": t('defaultAddress')
},
"class": bem('default'),
"scopedSlots": slots
});
}
return h();
}
},
render: function render(h) {
var _this5 = this;
var data = this.data,
errorInfo = this.errorInfo,
disableArea = this.disableArea,
hideBottomFields = this.hideBottomFields;
var onFocus = function onFocus(name) {
return function () {
return _this5.onFocus(name);
};
};
return h("div", {
"class": bem()
}, [h("div", {
"class": bem('fields')
}, [h(Field, {
"attrs": {
"clearable": true,
"label": t('name'),
"placeholder": t('namePlaceholder'),
"errorMessage": errorInfo.name
},
"on": {
"focus": onFocus('name')
},
"model": {
value: data.name,
callback: function callback($$v) {
_this5.$set(data, "name", $$v);
}
}
}), h(Field, {
"attrs": {
"clearable": true,
"type": "tel",
"label": t('tel'),
"maxlength": this.telMaxlength,
"placeholder": t('telPlaceholder'),
"errorMessage": errorInfo.tel
},
"on": {
"focus": onFocus('tel')
},
"model": {
value: data.tel,
callback: function callback($$v) {
_this5.$set(data, "tel", $$v);
}
}
}), h(Field, {
"directives": [{
name: "show",
value: this.showArea
}],
"attrs": {
"readonly": true,
"clickable": !disableArea,
"label": t('area'),
"placeholder": this.areaPlaceholder || t('areaPlaceholder'),
"errorMessage": errorInfo.areaCode,
"rightIcon": !disableArea ? 'arrow' : null,
"value": this.areaText
},
"on": {
"focus": onFocus('areaCode'),
"click": function click() {
_this5.$emit('click-area');
_this5.showAreaPopup = !disableArea;
}
}
}), h(Detail, {
"directives": [{
name: "show",
value: this.showDetail
}],
"attrs": {
"focused": this.detailFocused,
"value": data.addressDetail,
"errorMessage": errorInfo.addressDetail,
"detailRows": this.detailRows,
"detailMaxlength": this.detailMaxlength,
"searchResult": this.searchResult,
"showSearchResult": this.showSearchResult
},
"on": {
"focus": onFocus('addressDetail'),
"blur": this.onDetailBlur,
"input": this.onChangeDetail,
"select-search": function selectSearch(event) {
_this5.$emit('select-search', event);
}
}
}), this.showPostal && h(Field, {
"directives": [{
name: "show",
value: !hideBottomFields
}],
"attrs": {
"type": "tel",
"maxlength": "6",
"label": t('postal'),
"placeholder": t('postal'),
"errorMessage": errorInfo.postalCode
},
"on": {
"focus": onFocus('postalCode')
},
"model": {
value: data.postalCode,
callback: function callback($$v) {
_this5.$set(data, "postalCode", $$v);
}
}
}), this.slots()]), this.genSetDefaultCell(h), h("div", {
"directives": [{
name: "show",
value: !hideBottomFields
}],
"class": bem('buttons')
}, [h(Button, {
"attrs": {
"block": true,
"round": true,
"loading": this.isSaving,
"type": "danger",
"text": this.saveButtonText || t('save')
},
"on": {
"click": this.onSave
}
}), this.showDelete && h(Button, {
"attrs": {
"block": true,
"round": true,
"loading": this.isDeleting,
"text": this.deleteButtonText || t('delete')
},
"on": {
"click": this.onDelete
}
})]), h(Popup, {
"attrs": {
"round": true,
"position": "bottom",
"lazyRender": false,
"getContainer": "body"
},
"model": {
value: _this5.showAreaPopup,
callback: function callback($$v) {
_this5.showAreaPopup = $$v;
}
}
}, [h(Area, {
"ref": "area",
"attrs": {
"value": data.areaCode,
"loading": !this.areaListLoaded,
"areaList": this.areaList,
"columnsPlaceholder": this.areaColumnsPlaceholder
},
"on": {
"confirm": this.onAreaConfirm,
"cancel": function cancel() {
_this5.showAreaPopup = false;
}
}
})])]);
}
});

45
node_modules/vant/es/address-edit/index.less generated vendored Normal file
View File

@ -0,0 +1,45 @@
@import '../style/var';
.van-address-edit {
padding: @address-edit-padding;
&__fields {
overflow: hidden;
border-radius: @padding-xs;
.van-field__label {
width: 4.1em;
}
}
&__default {
margin-top: @padding-sm;
overflow: hidden;
border-radius: @padding-xs;
}
&__buttons {
padding: @address-edit-buttons-padding;
.van-button {
margin-bottom: @address-edit-button-margin-bottom;
}
}
&-detail {
padding: 0;
&__search-item {
background-color: @gray-2;
}
&__keyword {
color: @red;
}
&__finish {
color: @address-edit-detail-finish-color;
font-size: @address-edit-detail-finish-font-size;
}
}
}

16
node_modules/vant/es/address-edit/style/index.js generated vendored Normal file
View File

@ -0,0 +1,16 @@
import '../../style/base.css';
import '../../overlay/index.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../../cell/index.css';
import '../../field/index.css';
import '../../popup/index.css';
import '../../loading/index.css';
import '../../switch/index.css';
import '../../button/index.css';
import '../../goods-action-button/index.css';
import '../../toast/index.css';
import '../../picker/index.css';
import '../../goods-action/index.css';
import '../../dialog/index.css';
import '../index.css';

16
node_modules/vant/es/address-edit/style/less.js generated vendored Normal file
View File

@ -0,0 +1,16 @@
import '../../style/base.less';
import '../../overlay/index.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../cell/index.less';
import '../../field/index.less';
import '../../popup/index.less';
import '../../loading/index.less';
import '../../switch/index.less';
import '../../button/index.less';
import '../../goods-action-button/index.less';
import '../../toast/index.less';
import '../../picker/index.less';
import '../../goods-action/index.less';
import '../../dialog/index.less';
import '../index.less';

107
node_modules/vant/es/address-list/Item.js generated vendored Normal file
View File

@ -0,0 +1,107 @@
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
import _extends from "@babel/runtime/helpers/esm/extends";
// Utils
import { createNamespace } from '../utils';
import { emit, inherit } from '../utils/functional'; // Components
import Tag from '../tag';
import Icon from '../icon';
import Cell from '../cell';
import Radio from '../radio'; // Types
var _createNamespace = createNamespace('address-item'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
function AddressItem(h, props, slots, ctx) {
var disabled = props.disabled,
switchable = props.switchable;
function onClick() {
if (switchable) {
emit(ctx, 'select');
}
emit(ctx, 'click');
}
var genRightIcon = function genRightIcon() {
return h(Icon, {
"attrs": {
"name": "edit"
},
"class": bem('edit'),
"on": {
"click": function click(event) {
event.stopPropagation();
emit(ctx, 'edit');
emit(ctx, 'click');
}
}
});
};
function genTag() {
if (slots.tag) {
return slots.tag(_extends({}, props.data));
}
if (props.data.isDefault && props.defaultTagText) {
return h(Tag, {
"attrs": {
"type": "danger",
"round": true
},
"class": bem('tag')
}, [props.defaultTagText]);
}
}
function genContent() {
var data = props.data;
var Info = [h("div", {
"class": bem('name')
}, [data.name + " " + data.tel, genTag()]), h("div", {
"class": bem('address')
}, [data.address])];
if (switchable && !disabled) {
return h(Radio, {
"attrs": {
"name": data.id,
"iconSize": 18
}
}, [Info]);
}
return Info;
}
return h("div", {
"class": bem({
disabled: disabled
}),
"on": {
"click": onClick
}
}, [h(Cell, _mergeJSXProps([{
"attrs": {
"border": false,
"valueClass": bem('value')
},
"scopedSlots": {
default: genContent,
'right-icon': genRightIcon
}
}, inherit(ctx)])), slots.bottom == null ? void 0 : slots.bottom(_extends({}, props.data, {
disabled: disabled
}))]);
}
AddressItem.props = {
data: Object,
disabled: Boolean,
switchable: Boolean,
defaultTagText: String
};
export default createComponent(AddressItem);

1
node_modules/vant/es/address-list/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-address-list{box-sizing:border-box;height:100%;padding:12px 12px 80px}.van-address-list__bottom{position:fixed;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:0 16px;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom);background-color:#fff}.van-address-list__add{height:40px;margin:5px 0}.van-address-list__disabled-text{padding:20px 0 16px;color:#969799;font-size:14px;line-height:20px}.van-address-item{padding:12px;background-color:#fff;border-radius:8px}.van-address-item:not(:last-child){margin-bottom:12px}.van-address-item__value{padding-right:44px}.van-address-item__name{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin-bottom:8px;font-size:16px;line-height:22px}.van-address-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-address-item__address{color:#323233;font-size:13px;line-height:18px}.van-address-item--disabled .van-address-item__address,.van-address-item--disabled .van-address-item__name{color:#c8c9cc}.van-address-item__edit{position:absolute;top:50%;right:16px;color:#969799;font-size:20px;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}.van-address-item .van-cell{padding:0}.van-address-item .van-radio__label{margin-left:12px}.van-address-item .van-radio__icon--checked .van-icon{background-color:#ee0a24;border-color:#ee0a24}

93
node_modules/vant/es/address-list/index.js generated vendored Normal file
View File

@ -0,0 +1,93 @@
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
// Utils
import { createNamespace } from '../utils';
import { emit, inherit } from '../utils/functional'; // Components
import Button from '../button';
import RadioGroup from '../radio-group';
import AddressItem from './Item'; // Types
var _createNamespace = createNamespace('address-list'),
createComponent = _createNamespace[0],
bem = _createNamespace[1],
t = _createNamespace[2];
function AddressList(h, props, slots, ctx) {
function genList(list, disabled) {
if (!list) {
return;
}
return list.map(function (item, index) {
return h(AddressItem, {
"attrs": {
"data": item,
"disabled": disabled,
"switchable": props.switchable,
"defaultTagText": props.defaultTagText
},
"key": item.id,
"scopedSlots": {
bottom: slots['item-bottom'],
tag: slots.tag
},
"on": {
"select": function select() {
emit(ctx, disabled ? 'select-disabled' : 'select', item, index);
if (!disabled) {
emit(ctx, 'input', item.id);
}
},
"edit": function edit() {
emit(ctx, disabled ? 'edit-disabled' : 'edit', item, index);
},
"click": function click() {
emit(ctx, 'click-item', item, index);
}
}
});
});
}
var List = genList(props.list);
var DisabledList = genList(props.disabledList, true);
return h("div", _mergeJSXProps([{
"class": bem()
}, inherit(ctx)]), [slots.top == null ? void 0 : slots.top(), h(RadioGroup, {
"attrs": {
"value": props.value
}
}, [List]), props.disabledText && h("div", {
"class": bem('disabled-text')
}, [props.disabledText]), DisabledList, slots.default == null ? void 0 : slots.default(), h("div", {
"class": bem('bottom')
}, [h(Button, {
"attrs": {
"round": true,
"block": true,
"type": "danger",
"text": props.addButtonText || t('add')
},
"class": bem('add'),
"on": {
"click": function click() {
emit(ctx, 'add');
}
}
})])]);
}
AddressList.props = {
list: Array,
value: [Number, String],
disabledList: Array,
disabledText: String,
addButtonText: String,
defaultTagText: String,
switchable: {
type: Boolean,
default: true
}
};
export default createComponent(AddressList);

97
node_modules/vant/es/address-list/index.less generated vendored Normal file
View File

@ -0,0 +1,97 @@
@import '../style/var';
.van-address-list {
box-sizing: border-box;
height: 100%;
padding: @address-list-padding;
&__bottom {
position: fixed;
bottom: 0;
left: 0;
z-index: @address-list-add-button-z-index;
box-sizing: border-box;
width: 100%;
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;
}
&__disabled-text {
padding: @address-list-disabled-text-padding;
color: @address-list-disabled-text-color;
font-size: @address-list-disabled-text-font-size;
line-height: @address-list-disabled-text-line-height;
}
}
.van-address-item {
padding: @address-list-item-padding;
background-color: @white;
border-radius: @border-radius-lg;
&:not(:last-child) {
margin-bottom: @padding-sm;
}
&__value {
padding-right: 44px;
}
&__name {
display: flex;
align-items: center;
margin-bottom: @padding-xs;
font-size: @font-size-lg;
line-height: @line-height-lg;
}
&__tag {
flex: none;
margin-left: @padding-xs;
padding-top: 0;
padding-bottom: 0;
line-height: 1.4em;
}
&__address {
color: @address-list-item-text-color;
font-size: @address-list-item-font-size;
line-height: @address-list-item-line-height;
}
&--disabled {
.van-address-item__name,
.van-address-item__address {
color: @address-list-item-disabled-text-color;
}
}
&__edit {
position: absolute;
top: 50%;
right: @padding-md;
color: @gray-6;
font-size: @address-list-edit-icon-size;
transform: translate(0, -50%);
}
.van-cell {
padding: 0;
}
.van-radio__label {
margin-left: @padding-sm;
}
.van-radio__icon--checked .van-icon {
background-color: @address-list-item-radio-icon-color;
border-color: @address-list-item-radio-icon-color;
}
}

10
node_modules/vant/es/address-list/style/index.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
import '../../style/base.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../../radio/index.css';
import '../../tag/index.css';
import '../../cell/index.css';
import '../../loading/index.css';
import '../../button/index.css';
import '../../radio-group/index.css';
import '../index.css';

10
node_modules/vant/es/address-list/style/less.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
import '../../style/base.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../radio/index.less';
import '../../tag/index.less';
import '../../cell/index.less';
import '../../loading/index.less';
import '../../button/index.less';
import '../../radio-group/index.less';
import '../index.less';

321
node_modules/vant/es/area/index.js generated vendored Normal file
View File

@ -0,0 +1,321 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import { createNamespace } from '../utils';
import { pickerProps } from '../picker/shared';
import Picker from '../picker';
var _createNamespace = createNamespace('area'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
var PLACEHOLDER_CODE = '000000';
function isOverseaCode(code) {
return code[0] === '9';
}
function pickSlots(instance, keys) {
var $slots = instance.$slots,
$scopedSlots = instance.$scopedSlots;
var scopedSlots = {};
keys.forEach(function (key) {
if ($scopedSlots[key]) {
scopedSlots[key] = $scopedSlots[key];
} else if ($slots[key]) {
scopedSlots[key] = function () {
return $slots[key];
};
}
});
return scopedSlots;
}
export default createComponent({
props: _extends({}, pickerProps, {
value: String,
areaList: {
type: Object,
default: function _default() {
return {};
}
},
columnsNum: {
type: [Number, String],
default: 3
},
isOverseaCode: {
type: Function,
default: isOverseaCode
},
columnsPlaceholder: {
type: Array,
default: function _default() {
return [];
}
}
}),
data: function data() {
return {
code: this.value,
columns: [{
values: []
}, {
values: []
}, {
values: []
}]
};
},
computed: {
province: function province() {
return this.areaList.province_list || {};
},
city: function city() {
return this.areaList.city_list || {};
},
county: function county() {
return this.areaList.county_list || {};
},
displayColumns: function displayColumns() {
return this.columns.slice(0, +this.columnsNum);
},
placeholderMap: function placeholderMap() {
return {
province: this.columnsPlaceholder[0] || '',
city: this.columnsPlaceholder[1] || '',
county: this.columnsPlaceholder[2] || ''
};
}
},
watch: {
value: function value(val) {
this.code = val;
this.setValues();
},
areaList: {
deep: true,
handler: 'setValues'
},
columnsNum: function columnsNum() {
var _this = this;
this.$nextTick(function () {
_this.setValues();
});
}
},
mounted: function mounted() {
this.setValues();
},
methods: {
// get list by code
getList: function getList(type, code) {
var result = [];
if (type !== 'province' && !code) {
return result;
}
var list = this[type];
result = Object.keys(list).map(function (listCode) {
return {
code: listCode,
name: list[listCode]
};
});
if (code) {
// oversea code
if (this.isOverseaCode(code) && type === 'city') {
code = '9';
}
result = result.filter(function (item) {
return item.code.indexOf(code) === 0;
});
}
if (this.placeholderMap[type] && result.length) {
// set columns placeholder
var codeFill = '';
if (type === 'city') {
codeFill = PLACEHOLDER_CODE.slice(2, 4);
} else if (type === 'county') {
codeFill = PLACEHOLDER_CODE.slice(4, 6);
}
result.unshift({
code: "" + code + codeFill,
name: this.placeholderMap[type]
});
}
return result;
},
// get index by code
getIndex: function getIndex(type, code) {
var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
var list = this.getList(type, code.slice(0, compareNum - 2)); // oversea code
if (this.isOverseaCode(code) && type === 'province') {
compareNum = 1;
}
code = code.slice(0, compareNum);
for (var i = 0; i < list.length; i++) {
if (list[i].code.slice(0, compareNum) === code) {
return i;
}
}
return 0;
},
// parse output columns data
parseOutputValues: function parseOutputValues(values) {
var _this2 = this;
return values.map(function (value, index) {
// save undefined value
if (!value) return value;
value = JSON.parse(JSON.stringify(value));
if (!value.code || value.name === _this2.columnsPlaceholder[index]) {
value.code = '';
value.name = '';
}
return value;
});
},
onChange: function onChange(picker, values, index) {
this.code = values[index].code;
this.setValues();
var parsedValues = this.parseOutputValues(picker.getValues());
this.$emit('change', picker, parsedValues, index);
},
onConfirm: function onConfirm(values, index) {
values = this.parseOutputValues(values);
this.setValues();
this.$emit('confirm', values, index);
},
getDefaultCode: function getDefaultCode() {
if (this.columnsPlaceholder.length) {
return PLACEHOLDER_CODE;
}
var countyCodes = Object.keys(this.county);
if (countyCodes[0]) {
return countyCodes[0];
}
var cityCodes = Object.keys(this.city);
if (cityCodes[0]) {
return cityCodes[0];
}
return '';
},
setValues: function setValues() {
var code = this.code;
if (!code) {
code = this.getDefaultCode();
}
var picker = this.$refs.picker;
var province = this.getList('province');
var city = this.getList('city', code.slice(0, 2));
if (!picker) {
return;
}
picker.setColumnValues(0, province);
picker.setColumnValues(1, city);
if (city.length && code.slice(2, 4) === '00' && !this.isOverseaCode(code)) {
code = city[0].code;
}
picker.setColumnValues(2, this.getList('county', code.slice(0, 4)));
picker.setIndexes([this.getIndex('province', code), this.getIndex('city', code), this.getIndex('county', code)]);
},
getValues: function getValues() {
var picker = this.$refs.picker;
var getValues = picker ? picker.getValues().filter(function (value) {
return !!value;
}) : [];
getValues = this.parseOutputValues(getValues);
return getValues;
},
getArea: function getArea() {
var values = this.getValues();
var area = {
code: '',
country: '',
province: '',
city: '',
county: ''
};
if (!values.length) {
return area;
}
var names = values.map(function (item) {
return item.name;
});
var validValues = values.filter(function (value) {
return !!value.code;
});
area.code = validValues.length ? validValues[validValues.length - 1].code : '';
if (this.isOverseaCode(area.code)) {
area.country = names[1] || '';
area.province = names[2] || '';
} else {
area.province = names[0] || '';
area.city = names[1] || '';
area.county = names[2] || '';
}
return area;
},
// @exposed-api
reset: function reset(code) {
this.code = code || '';
this.setValues();
}
},
render: function render() {
var h = arguments[0];
var on = _extends({}, this.$listeners, {
change: this.onChange,
confirm: this.onConfirm
});
return h(Picker, {
"ref": "picker",
"class": bem(),
"attrs": {
"showToolbar": true,
"valueKey": "name",
"title": this.title,
"columns": this.displayColumns,
"loading": this.loading,
"readonly": this.readonly,
"itemHeight": this.itemHeight,
"swipeDuration": this.swipeDuration,
"visibleItemCount": this.visibleItemCount,
"cancelButtonText": this.cancelButtonText,
"confirmButtonText": this.confirmButtonText
},
"scopedSlots": pickSlots(this, ['title', 'columns-top', 'columns-bottom']),
"on": _extends({}, on)
});
}
});

3
node_modules/vant/es/area/style/index.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
import '../../style/base.css';
import '../../loading/index.css';
import '../../picker/index.css';

3
node_modules/vant/es/area/style/less.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
import '../../style/base.less';
import '../../loading/index.less';
import '../../picker/index.less';

1
node_modules/vant/es/badge/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-badge{display:inline-block;box-sizing:border-box;min-width:16px;padding:0 3px;color:#fff;font-weight:500;font-size:12px;font-family:-apple-system-font,Helvetica Neue,Arial,sans-serif;line-height:1.2;text-align:center;background-color:#ee0a24;border:1px solid #fff;border-radius:999px}.van-badge--fixed{position:absolute;top:0;right:0;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%}.van-badge--dot{width:8px;min-width:0;height:8px;background-color:#ee0a24;border-radius:100%}.van-badge__wrapper{position:relative;display:inline-block}

68
node_modules/vant/es/badge/index.js generated vendored Normal file
View File

@ -0,0 +1,68 @@
import { isDef, createNamespace } from '../utils';
import { isNumeric } from '../utils/validate/number';
var _createNamespace = createNamespace('badge'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
export default createComponent({
props: {
dot: Boolean,
max: [Number, String],
color: String,
content: [Number, String],
tag: {
type: String,
default: 'div'
}
},
methods: {
hasContent: function hasContent() {
return !!(this.$scopedSlots.content || isDef(this.content) && this.content !== '');
},
renderContent: function renderContent() {
var dot = this.dot,
max = this.max,
content = this.content;
if (!dot && this.hasContent()) {
if (this.$scopedSlots.content) {
return this.$scopedSlots.content();
}
if (isDef(max) && isNumeric(content) && +content > max) {
return max + "+";
}
return content;
}
},
renderBadge: function renderBadge() {
var h = this.$createElement;
if (this.hasContent() || this.dot) {
return h("div", {
"class": bem({
dot: this.dot,
fixed: !!this.$scopedSlots.default
}),
"style": {
background: this.color
}
}, [this.renderContent()]);
}
}
},
render: function render() {
var h = arguments[0];
if (this.$scopedSlots.default) {
var tag = this.tag;
return h(tag, {
"class": bem('wrapper')
}, [this.$scopedSlots.default(), this.renderBadge()]);
}
return this.renderBadge();
}
});

38
node_modules/vant/es/badge/index.less generated vendored Normal file
View File

@ -0,0 +1,38 @@
@import '../style/var';
.van-badge {
display: inline-block;
box-sizing: border-box;
min-width: @badge-size;
padding: @badge-padding;
color: @badge-color;
font-weight: @badge-font-weight;
font-size: @badge-font-size;
font-family: @badge-font-family;
line-height: 1.2;
text-align: center;
background-color: @badge-background-color;
border: @badge-border-width solid @white;
border-radius: @border-radius-max;
&--fixed {
position: absolute;
top: 0;
right: 0;
transform: translate(50%, -50%);
transform-origin: 100%;
}
&--dot {
width: @badge-dot-size;
min-width: 0;
height: @badge-dot-size;
background-color: @badge-dot-color;
border-radius: 100%;
}
&__wrapper {
position: relative;
display: inline-block;
}
}

2
node_modules/vant/es/badge/style/index.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.css';
import '../index.css';

2
node_modules/vant/es/badge/style/less.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.less';
import '../index.less';

1
node_modules/vant/es/button/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-button{position:relative;display:inline-block;box-sizing:border-box;height:44px;margin:0;padding:0;font-size:16px;line-height:1.2;text-align:center;border-radius:2px;cursor:pointer;-webkit-transition:opacity .2s;transition:opacity .2s;-webkit-appearance:none}.van-button::before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:' '}.van-button:active::before{opacity:.1}.van-button--disabled::before,.van-button--loading::before{display:none}.van-button--default{color:#323233;background-color:#fff;border:1px solid #ebedf0}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--info{color:#fff;background-color:#1989fa;border:1px solid #1989fa}.van-button--danger{color:#fff;background-color:#ee0a24;border:1px solid #ee0a24}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--info{color:#1989fa}.van-button--plain.van-button--danger{color:#ee0a24}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:32px;padding:0 8px;font-size:12px}.van-button__loading{color:inherit;font-size:inherit}.van-button--mini{height:24px;padding:0 4px;font-size:10px}.van-button--mini+.van-button--mini{margin-left:4px}.van-button--block{display:block;width:100%}.van-button--disabled{cursor:not-allowed;opacity:.5}.van-button--loading{cursor:default}.van-button--round{border-radius:999px}.van-button--square{border-radius:0}.van-button__content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:100%}.van-button__content::before{content:' '}.van-button__icon{font-size:1.2em;line-height:inherit}.van-button__icon+.van-button__text,.van-button__loading+.van-button__text,.van-button__text+.van-button__icon,.van-button__text+.van-button__loading{margin-left:4px}.van-button--hairline{border-width:0}.van-button--hairline::after{border-color:inherit;border-radius:4px}.van-button--hairline.van-button--round::after{border-radius:999px}.van-button--hairline.van-button--square::after{border-radius:0}

181
node_modules/vant/es/button/index.js generated vendored Normal file
View File

@ -0,0 +1,181 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
// Utils
import { createNamespace } from '../utils';
import { emit, inherit } from '../utils/functional';
import { BORDER_SURROUND } from '../utils/constant';
import { routeProps, functionalRoute } from '../utils/router'; // Components
import Icon from '../icon';
import Loading from '../loading'; // Types
var _createNamespace = createNamespace('button'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
function Button(h, props, slots, ctx) {
var _ref;
var tag = props.tag,
icon = props.icon,
type = props.type,
color = props.color,
plain = props.plain,
disabled = props.disabled,
loading = props.loading,
hairline = props.hairline,
loadingText = props.loadingText,
iconPosition = props.iconPosition;
var style = {};
if (color) {
style.color = plain ? color : 'white';
if (!plain) {
// Use background instead of backgroundColor to make linear-gradient work
style.background = color;
} // hide border when color is linear-gradient
if (color.indexOf('gradient') !== -1) {
style.border = 0;
} else {
style.borderColor = color;
}
}
function onClick(event) {
if (props.loading) {
event.preventDefault();
}
if (!loading && !disabled) {
emit(ctx, 'click', event);
functionalRoute(ctx);
}
}
function onTouchstart(event) {
emit(ctx, 'touchstart', event);
}
var classes = [bem([type, props.size, {
plain: plain,
loading: loading,
disabled: disabled,
hairline: hairline,
block: props.block,
round: props.round,
square: props.square
}]), (_ref = {}, _ref[BORDER_SURROUND] = hairline, _ref)];
function renderIcon() {
if (loading) {
return slots.loading ? slots.loading() : h(Loading, {
"class": bem('loading'),
"attrs": {
"size": props.loadingSize,
"type": props.loadingType,
"color": "currentColor"
}
});
}
if (slots.icon) {
return h("div", {
"class": bem('icon')
}, [slots.icon()]);
}
if (icon) {
return h(Icon, {
"attrs": {
"name": icon,
"classPrefix": props.iconPrefix
},
"class": bem('icon')
});
}
}
function renderContent() {
var content = [];
if (iconPosition === 'left') {
content.push(renderIcon());
}
var text;
if (loading) {
text = loadingText;
} else {
text = slots.default ? slots.default() : props.text;
}
if (text) {
content.push(h("span", {
"class": bem('text')
}, [text]));
}
if (iconPosition === 'right') {
content.push(renderIcon());
}
return content;
}
return h(tag, _mergeJSXProps([{
"style": style,
"class": classes,
"attrs": {
"type": props.nativeType,
"disabled": disabled
},
"on": {
"click": onClick,
"touchstart": onTouchstart
}
}, inherit(ctx)]), [h("div", {
"class": bem('content')
}, [renderContent()])]);
}
Button.props = _extends({}, routeProps, {
text: String,
icon: String,
color: String,
block: Boolean,
plain: Boolean,
round: Boolean,
square: Boolean,
loading: Boolean,
hairline: Boolean,
disabled: Boolean,
iconPrefix: String,
nativeType: String,
loadingText: String,
loadingType: String,
tag: {
type: String,
default: 'button'
},
type: {
type: String,
default: 'default'
},
size: {
type: String,
default: 'normal'
},
loadingSize: {
type: String,
default: '20px'
},
iconPosition: {
type: String,
default: 'left'
}
});
export default createComponent(Button);

190
node_modules/vant/es/button/index.less generated vendored Normal file
View File

@ -0,0 +1,190 @@
@import '../style/var';
.van-button {
position: relative;
display: inline-block;
box-sizing: border-box;
height: @button-default-height;
margin: 0;
padding: 0;
font-size: @button-default-font-size;
line-height: @button-default-line-height;
text-align: center;
border-radius: @button-border-radius;
cursor: pointer;
transition: opacity @animation-duration-fast;
-webkit-appearance: none;
&::before {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 100%;
background-color: @black;
border: inherit;
border-color: @black;
border-radius: inherit; /* inherit parent's border radius */
transform: translate(-50%, -50%);
opacity: 0;
content: ' ';
}
&:active::before {
opacity: 0.1;
}
&--loading,
&--disabled {
&::before {
display: none;
}
}
&--default {
color: @button-default-color;
background-color: @button-default-background-color;
border: @button-border-width solid @button-default-border-color;
}
&--primary {
color: @button-primary-color;
background-color: @button-primary-background-color;
border: @button-border-width solid @button-primary-border-color;
}
&--info {
color: @button-info-color;
background-color: @button-info-background-color;
border: @button-border-width solid @button-info-border-color;
}
&--danger {
color: @button-danger-color;
background-color: @button-danger-background-color;
border: @button-border-width solid @button-danger-border-color;
}
&--warning {
color: @button-warning-color;
background-color: @button-warning-background-color;
border: @button-border-width solid @button-warning-border-color;
}
&--plain {
background-color: @button-plain-background-color;
&.van-button--primary {
color: @button-primary-background-color;
}
&.van-button--info {
color: @button-info-background-color;
}
&.van-button--danger {
color: @button-danger-background-color;
}
&.van-button--warning {
color: @button-warning-background-color;
}
}
&--large {
width: 100%;
height: @button-large-height;
}
&--normal {
padding: 0 15px;
font-size: @button-normal-font-size;
}
&--small {
height: @button-small-height;
padding: 0 @padding-xs;
font-size: @button-small-font-size;
}
&__loading {
color: inherit;
font-size: inherit;
}
&--mini {
height: @button-mini-height;
padding: 0 @padding-base;
font-size: @button-mini-font-size;
& + .van-button--mini {
margin-left: @padding-base;
}
}
&--block {
display: block;
width: 100%;
}
&--disabled {
cursor: not-allowed;
opacity: @button-disabled-opacity;
}
&--loading {
cursor: default;
}
&--round {
border-radius: @button-round-border-radius;
}
&--square {
border-radius: 0;
}
// align-items are ignored when flex container is a button in legacy safari
// see: https://bugs.webkit.org/show_bug.cgi?id=169700
&__content {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
// fix icon vertical align
// see: https://github.com/vant-ui/vant/issues/7617
&::before {
content: ' ';
}
}
&__icon {
font-size: 1.2em;
line-height: inherit;
}
&__icon + &__text,
&__loading + &__text,
&__text + &__icon,
&__text + &__loading {
margin-left: @padding-base;
}
&--hairline {
border-width: 0;
&::after {
border-color: inherit;
border-radius: @button-border-radius * 2;
}
&.van-button--round::after {
border-radius: @button-round-border-radius;
}
&.van-button--square::after {
border-radius: 0;
}
}
}

5
node_modules/vant/es/button/style/index.js generated vendored Normal file
View File

@ -0,0 +1,5 @@
import '../../style/base.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../../loading/index.css';
import '../index.css';

5
node_modules/vant/es/button/style/less.js generated vendored Normal file
View File

@ -0,0 +1,5 @@
import '../../style/base.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../loading/index.less';
import '../index.less';

55
node_modules/vant/es/calendar/components/Header.js generated vendored Normal file
View File

@ -0,0 +1,55 @@
import { createNamespace } from '../../utils';
import { t, bem } from '../utils';
var _createNamespace = createNamespace('calendar-header'),
createComponent = _createNamespace[0];
export default createComponent({
props: {
title: String,
subtitle: String,
showTitle: Boolean,
showSubtitle: Boolean,
firstDayOfWeek: Number
},
methods: {
genTitle: function genTitle() {
var h = this.$createElement;
if (this.showTitle) {
var title = this.slots('title') || this.title || t('title');
return h("div", {
"class": bem('header-title')
}, [title]);
}
},
genSubtitle: function genSubtitle() {
var h = this.$createElement;
if (this.showSubtitle) {
return h("div", {
"class": bem('header-subtitle')
}, [this.subtitle]);
}
},
genWeekDays: function genWeekDays() {
var h = this.$createElement;
var weekdays = t('weekdays');
var firstDayOfWeek = this.firstDayOfWeek;
var renderWeekDays = [].concat(weekdays.slice(firstDayOfWeek, 7), weekdays.slice(0, firstDayOfWeek));
return h("div", {
"class": bem('weekdays')
}, [renderWeekDays.map(function (item) {
return h("span", {
"class": bem('weekday')
}, [item]);
})]);
}
},
render: function render() {
var h = arguments[0];
return h("div", {
"class": bem('header')
}, [this.genTitle(), this.genSubtitle(), this.genWeekDays()]);
}
});

333
node_modules/vant/es/calendar/components/Month.js generated vendored Normal file
View File

@ -0,0 +1,333 @@
import { createNamespace, addUnit } from '../../utils';
import { setScrollTop } from '../../utils/dom/scroll';
import { t, bem, compareDay, getPrevDay, getNextDay, formatMonthTitle } from '../utils';
import { getMonthEndDay } from '../../datetime-picker/utils';
var _createNamespace = createNamespace('calendar-month'),
createComponent = _createNamespace[0];
export default createComponent({
props: {
date: Date,
type: String,
color: String,
minDate: Date,
maxDate: Date,
showMark: Boolean,
rowHeight: [Number, String],
formatter: Function,
lazyRender: Boolean,
currentDate: [Date, Array],
allowSameDay: Boolean,
showSubtitle: Boolean,
showMonthTitle: Boolean,
firstDayOfWeek: Number
},
data: function data() {
return {
visible: false
};
},
computed: {
title: function title() {
return formatMonthTitle(this.date);
},
rowHeightWithUnit: function rowHeightWithUnit() {
return addUnit(this.rowHeight);
},
offset: function offset() {
var firstDayOfWeek = this.firstDayOfWeek;
var realDay = this.date.getDay();
if (!firstDayOfWeek) {
return realDay;
}
return (realDay + 7 - this.firstDayOfWeek) % 7;
},
totalDay: function totalDay() {
return getMonthEndDay(this.date.getFullYear(), this.date.getMonth() + 1);
},
shouldRender: function shouldRender() {
return this.visible || !this.lazyRender;
},
placeholders: function placeholders() {
var rows = [];
var count = Math.ceil((this.totalDay + this.offset) / 7);
for (var day = 1; day <= count; day++) {
rows.push({
type: 'placeholder'
});
}
return rows;
},
days: function days() {
var days = [];
var year = this.date.getFullYear();
var month = this.date.getMonth();
for (var day = 1; day <= this.totalDay; day++) {
var date = new Date(year, month, day);
var type = this.getDayType(date);
var config = {
date: date,
type: type,
text: day,
bottomInfo: this.getBottomInfo(type)
};
if (this.formatter) {
config = this.formatter(config);
}
days.push(config);
}
return days;
}
},
methods: {
getHeight: function getHeight() {
var _this$$el;
return ((_this$$el = this.$el) == null ? void 0 : _this$$el.getBoundingClientRect().height) || 0;
},
scrollIntoView: function scrollIntoView(body) {
var _this$$refs = this.$refs,
days = _this$$refs.days,
month = _this$$refs.month;
var el = this.showSubtitle ? days : month;
var scrollTop = el.getBoundingClientRect().top - body.getBoundingClientRect().top + body.scrollTop;
setScrollTop(body, scrollTop);
},
getMultipleDayType: function getMultipleDayType(day) {
var _this = this;
var isSelected = function isSelected(date) {
return _this.currentDate.some(function (item) {
return compareDay(item, date) === 0;
});
};
if (isSelected(day)) {
var prevDay = getPrevDay(day);
var nextDay = getNextDay(day);
var prevSelected = isSelected(prevDay);
var nextSelected = isSelected(nextDay);
if (prevSelected && nextSelected) {
return 'multiple-middle';
}
if (prevSelected) {
return 'end';
}
return nextSelected ? 'start' : 'multiple-selected';
}
return '';
},
getRangeDayType: function getRangeDayType(day) {
var _this$currentDate = this.currentDate,
startDay = _this$currentDate[0],
endDay = _this$currentDate[1];
if (!startDay) {
return '';
}
var compareToStart = compareDay(day, startDay);
if (!endDay) {
return compareToStart === 0 ? 'start' : '';
}
var compareToEnd = compareDay(day, endDay);
if (compareToStart === 0 && compareToEnd === 0 && this.allowSameDay) {
return 'start-end';
}
if (compareToStart === 0) {
return 'start';
}
if (compareToEnd === 0) {
return 'end';
}
if (compareToStart > 0 && compareToEnd < 0) {
return 'middle';
}
},
getDayType: function getDayType(day) {
var type = this.type,
minDate = this.minDate,
maxDate = this.maxDate,
currentDate = this.currentDate;
if (compareDay(day, minDate) < 0 || compareDay(day, maxDate) > 0) {
return 'disabled';
}
if (currentDate === null) {
return;
}
if (type === 'single') {
return compareDay(day, currentDate) === 0 ? 'selected' : '';
}
if (type === 'multiple') {
return this.getMultipleDayType(day);
}
/* istanbul ignore else */
if (type === 'range') {
return this.getRangeDayType(day);
}
},
getBottomInfo: function getBottomInfo(type) {
if (this.type === 'range') {
if (type === 'start' || type === 'end') {
return t(type);
}
if (type === 'start-end') {
return t('startEnd');
}
}
},
getDayStyle: function getDayStyle(type, index) {
var style = {
height: this.rowHeightWithUnit
};
if (type === 'placeholder') {
style.width = '100%';
return style;
}
if (index === 0) {
style.marginLeft = 100 * this.offset / 7 + "%";
}
if (this.color) {
if (type === 'start' || type === 'end' || type === 'start-end' || type === 'multiple-selected' || type === 'multiple-middle') {
style.background = this.color;
} else if (type === 'middle') {
style.color = this.color;
}
}
return style;
},
genTitle: function genTitle() {
var h = this.$createElement;
if (this.showMonthTitle) {
return h("div", {
"class": bem('month-title')
}, [this.title]);
}
},
genMark: function genMark() {
var h = this.$createElement;
if (this.showMark && this.shouldRender) {
return h("div", {
"class": bem('month-mark')
}, [this.date.getMonth() + 1]);
}
},
genDays: function genDays() {
var h = this.$createElement;
var days = this.shouldRender ? this.days : this.placeholders;
return h("div", {
"ref": "days",
"attrs": {
"role": "grid"
},
"class": bem('days')
}, [this.genMark(), days.map(this.genDay)]);
},
genTopInfo: function genTopInfo(item) {
var h = this.$createElement;
var slot = this.$scopedSlots['top-info'];
if (item.topInfo || slot) {
return h("div", {
"class": bem('top-info')
}, [slot ? slot(item) : item.topInfo]);
}
},
genBottomInfo: function genBottomInfo(item) {
var h = this.$createElement;
var slot = this.$scopedSlots['bottom-info'];
if (item.bottomInfo || slot) {
return h("div", {
"class": bem('bottom-info')
}, [slot ? slot(item) : item.bottomInfo]);
}
},
genDay: function genDay(item, index) {
var _this2 = this;
var h = this.$createElement;
var type = item.type;
var style = this.getDayStyle(type, index);
var disabled = type === 'disabled';
var onClick = function onClick() {
if (!disabled) {
_this2.$emit('click', item);
}
};
if (type === 'selected') {
return h("div", {
"attrs": {
"role": "gridcell",
"tabindex": -1
},
"style": style,
"class": [bem('day'), item.className],
"on": {
"click": onClick
}
}, [h("div", {
"class": bem('selected-day'),
"style": {
width: this.rowHeightWithUnit,
height: this.rowHeightWithUnit,
background: this.color
}
}, [this.genTopInfo(item), item.text, this.genBottomInfo(item)])]);
}
return h("div", {
"attrs": {
"role": "gridcell",
"tabindex": disabled ? null : -1
},
"style": style,
"class": [bem('day', type), item.className],
"on": {
"click": onClick
}
}, [this.genTopInfo(item), item.text, this.genBottomInfo(item)]);
}
},
render: function render() {
var h = arguments[0];
return h("div", {
"class": bem('month'),
"ref": "month"
}, [this.genTitle(), this.genDays()]);
}
});

1
node_modules/vant/es/calendar/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-calendar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;height:100%;background-color:#fff}.van-calendar__popup.van-popup--bottom,.van-calendar__popup.van-popup--top{height:80%}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{-webkit-flex-shrink:0;flex-shrink:0;box-shadow:0 2px 10px rgba(125,126,128,.16)}.van-calendar__header-subtitle,.van-calendar__header-title,.van-calendar__month-title{height:44px;font-weight:500;line-height:44px;text-align:center}.van-calendar__header-title{font-size:16px}.van-calendar__header-subtitle{font-size:14px}.van-calendar__month-title{font-size:14px}.van-calendar__weekdays{display:-webkit-box;display:-webkit-flex;display:flex}.van-calendar__weekday{-webkit-box-flex:1;-webkit-flex:1;flex:1;font-size:12px;line-height:30px;text-align:center}.van-calendar__body{-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:rgba(242,243,245,.8);font-size:160px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:64px;font-size:16px;cursor:pointer}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{color:#fff;background-color:#ee0a24}.van-calendar__day--start{border-radius:4px 0 0 4px}.van-calendar__day--end{border-radius:0 4px 4px 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px}.van-calendar__day--middle{color:#ee0a24}.van-calendar__day--middle::after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:.1;content:''}.van-calendar__day--disabled{color:#c8c9cc;cursor:default}.van-calendar__bottom-info,.van-calendar__top-info{position:absolute;right:0;left:0;font-size:10px;line-height:14px}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:54px;height:54px;color:#fff;background-color:#ee0a24;border-radius:4px}.van-calendar__footer{-webkit-flex-shrink:0;flex-shrink:0;padding:0 16px;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer--unfit{padding-bottom:0}.van-calendar__confirm{height:36px;margin:7px 0}

553
node_modules/vant/es/calendar/index.js generated vendored Normal file
View File

@ -0,0 +1,553 @@
// Utils
import { raf } from '../utils/dom/raf';
import { isDate } from '../utils/validate/date';
import { getScrollTop } from '../utils/dom/scroll';
import { t, bem, copyDate, copyDates, getNextDay, compareDay, calcDateNum, compareMonth, createComponent, getDayByOffset } from './utils'; // Components
import Popup from '../popup';
import Button from '../button';
import Toast from '../toast';
import Month from './components/Month';
import Header from './components/Header';
export default createComponent({
props: {
title: String,
color: String,
value: Boolean,
readonly: Boolean,
formatter: Function,
rowHeight: [Number, String],
confirmText: String,
rangePrompt: String,
defaultDate: [Date, Array],
getContainer: [String, Function],
allowSameDay: Boolean,
confirmDisabledText: String,
type: {
type: String,
default: 'single'
},
round: {
type: Boolean,
default: true
},
position: {
type: String,
default: 'bottom'
},
poppable: {
type: Boolean,
default: true
},
maxRange: {
type: [Number, String],
default: null
},
lazyRender: {
type: Boolean,
default: true
},
showMark: {
type: Boolean,
default: true
},
showTitle: {
type: Boolean,
default: true
},
showConfirm: {
type: Boolean,
default: true
},
showSubtitle: {
type: Boolean,
default: true
},
closeOnPopstate: {
type: Boolean,
default: true
},
closeOnClickOverlay: {
type: Boolean,
default: true
},
safeAreaInsetBottom: {
type: Boolean,
default: true
},
minDate: {
type: Date,
validator: isDate,
default: function _default() {
return new Date();
}
},
maxDate: {
type: Date,
validator: isDate,
default: function _default() {
var now = new Date();
return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate());
}
},
firstDayOfWeek: {
type: [Number, String],
default: 0,
validator: function validator(val) {
return val >= 0 && val <= 6;
}
}
},
inject: {
vanPopup: {
default: null
}
},
data: function data() {
return {
subtitle: '',
currentDate: this.getInitialDate()
};
},
computed: {
months: function months() {
var months = [];
var cursor = new Date(this.minDate);
cursor.setDate(1);
do {
months.push(new Date(cursor));
cursor.setMonth(cursor.getMonth() + 1);
} while (compareMonth(cursor, this.maxDate) !== 1);
return months;
},
buttonDisabled: function buttonDisabled() {
var type = this.type,
currentDate = this.currentDate;
if (currentDate) {
if (type === 'range') {
return !currentDate[0] || !currentDate[1];
}
if (type === 'multiple') {
return !currentDate.length;
}
}
return !currentDate;
},
dayOffset: function dayOffset() {
return this.firstDayOfWeek ? this.firstDayOfWeek % 7 : 0;
}
},
watch: {
value: 'init',
type: function type() {
this.reset();
},
defaultDate: function defaultDate(val) {
this.currentDate = val;
this.scrollIntoView();
}
},
mounted: function mounted() {
this.init(); // https://github.com/vant-ui/vant/issues/9845
if (!this.poppable) {
var _this$vanPopup;
(_this$vanPopup = this.vanPopup) == null ? void 0 : _this$vanPopup.$on('opened', this.onScroll);
}
},
/* istanbul ignore next */
activated: function activated() {
this.init();
},
methods: {
// @exposed-api
reset: function reset(date) {
if (date === void 0) {
date = this.getInitialDate();
}
this.currentDate = date;
this.scrollIntoView();
},
init: function init() {
var _this = this;
if (this.poppable && !this.value) {
return;
}
this.$nextTick(function () {
// add Math.floor to avoid decimal height issues
// https://github.com/vant-ui/vant/issues/5640
_this.bodyHeight = Math.floor(_this.$refs.body.getBoundingClientRect().height);
_this.onScroll();
_this.scrollIntoView();
});
},
// @exposed-api
scrollToDate: function scrollToDate(targetDate) {
var _this2 = this;
raf(function () {
var displayed = _this2.value || !_this2.poppable;
/* istanbul ignore if */
if (!targetDate || !displayed) {
return;
}
_this2.months.some(function (month, index) {
if (compareMonth(month, targetDate) === 0) {
var _this2$$refs = _this2.$refs,
body = _this2$$refs.body,
months = _this2$$refs.months;
months[index].scrollIntoView(body);
return true;
}
return false;
});
_this2.onScroll();
});
},
// scroll to current month
scrollIntoView: function scrollIntoView() {
var currentDate = this.currentDate;
if (currentDate) {
var targetDate = this.type === 'single' ? currentDate : currentDate[0];
this.scrollToDate(targetDate);
}
},
getInitialDate: function getInitialDate() {
var type = this.type,
minDate = this.minDate,
maxDate = this.maxDate,
defaultDate = this.defaultDate;
if (defaultDate === null) {
return defaultDate;
}
var defaultVal = new Date();
if (compareDay(defaultVal, minDate) === -1) {
defaultVal = minDate;
} else if (compareDay(defaultVal, maxDate) === 1) {
defaultVal = maxDate;
}
if (type === 'range') {
var _ref = defaultDate || [],
startDay = _ref[0],
endDay = _ref[1];
return [startDay || defaultVal, endDay || getNextDay(defaultVal)];
}
if (type === 'multiple') {
return defaultDate || [defaultVal];
}
return defaultDate || defaultVal;
},
// calculate the position of the elements
// and find the elements that needs to be rendered
onScroll: function onScroll() {
var _this$$refs = this.$refs,
body = _this$$refs.body,
months = _this$$refs.months;
var top = getScrollTop(body);
var bottom = top + this.bodyHeight;
var heights = months.map(function (item) {
return item.getHeight();
});
var heightSum = heights.reduce(function (a, b) {
return a + b;
}, 0); // iOS scroll bounce may exceed the range
if (bottom > heightSum && top > 0) {
return;
}
var height = 0;
var currentMonth;
var visibleRange = [-1, -1];
for (var i = 0; i < months.length; i++) {
var visible = height <= bottom && height + heights[i] >= top;
if (visible) {
visibleRange[1] = i;
if (!currentMonth) {
currentMonth = months[i];
visibleRange[0] = i;
}
if (!months[i].showed) {
months[i].showed = true;
this.$emit('month-show', {
date: months[i].date,
title: months[i].title
});
}
}
height += heights[i];
}
months.forEach(function (month, index) {
month.visible = index >= visibleRange[0] - 1 && index <= visibleRange[1] + 1;
});
/* istanbul ignore else */
if (currentMonth) {
this.subtitle = currentMonth.title;
}
},
onClickDay: function onClickDay(item) {
if (this.readonly) {
return;
}
var date = item.date;
var type = this.type,
currentDate = this.currentDate;
if (type === 'range') {
if (!currentDate) {
this.select([date, null]);
return;
}
var startDay = currentDate[0],
endDay = currentDate[1];
if (startDay && !endDay) {
var compareToStart = compareDay(date, startDay);
if (compareToStart === 1) {
this.select([startDay, date], true);
} else if (compareToStart === -1) {
this.select([date, null]);
} else if (this.allowSameDay) {
this.select([date, date], true);
}
} else {
this.select([date, null]);
}
} else if (type === 'multiple') {
if (!currentDate) {
this.select([date]);
return;
}
var selectedIndex;
var selected = this.currentDate.some(function (dateItem, index) {
var equal = compareDay(dateItem, date) === 0;
if (equal) {
selectedIndex = index;
}
return equal;
});
if (selected) {
var _currentDate$splice = currentDate.splice(selectedIndex, 1),
unselectedDate = _currentDate$splice[0];
this.$emit('unselect', copyDate(unselectedDate));
} else if (this.maxRange && currentDate.length >= this.maxRange) {
Toast(this.rangePrompt || t('rangePrompt', this.maxRange));
} else {
this.select([].concat(currentDate, [date]));
}
} else {
this.select(date, true);
}
},
togglePopup: function togglePopup(val) {
this.$emit('input', val);
},
select: function select(date, complete) {
var _this3 = this;
var emit = function emit(date) {
_this3.currentDate = date;
_this3.$emit('select', copyDates(_this3.currentDate));
};
if (complete && this.type === 'range') {
var valid = this.checkRange(date);
if (!valid) {
// auto selected to max range if showConfirm
if (this.showConfirm) {
emit([date[0], getDayByOffset(date[0], this.maxRange - 1)]);
} else {
emit(date);
}
return;
}
}
emit(date);
if (complete && !this.showConfirm) {
this.onConfirm();
}
},
checkRange: function checkRange(date) {
var maxRange = this.maxRange,
rangePrompt = this.rangePrompt;
if (maxRange && calcDateNum(date) > maxRange) {
Toast(rangePrompt || t('rangePrompt', maxRange));
return false;
}
return true;
},
onConfirm: function onConfirm() {
this.$emit('confirm', copyDates(this.currentDate));
},
genMonth: function genMonth(date, index) {
var h = this.$createElement;
var showMonthTitle = index !== 0 || !this.showSubtitle;
return h(Month, {
"ref": "months",
"refInFor": true,
"attrs": {
"date": date,
"type": this.type,
"color": this.color,
"minDate": this.minDate,
"maxDate": this.maxDate,
"showMark": this.showMark,
"formatter": this.formatter,
"rowHeight": this.rowHeight,
"lazyRender": this.lazyRender,
"currentDate": this.currentDate,
"showSubtitle": this.showSubtitle,
"allowSameDay": this.allowSameDay,
"showMonthTitle": showMonthTitle,
"firstDayOfWeek": this.dayOffset
},
"scopedSlots": {
'top-info': this.$scopedSlots['top-info'],
'bottom-info': this.$scopedSlots['bottom-info']
},
"on": {
"click": this.onClickDay
}
});
},
genFooterContent: function genFooterContent() {
var h = this.$createElement;
var slot = this.slots('footer');
if (slot) {
return slot;
}
if (this.showConfirm) {
var text = this.buttonDisabled ? this.confirmDisabledText : this.confirmText;
return h(Button, {
"attrs": {
"round": true,
"block": true,
"type": "danger",
"color": this.color,
"disabled": this.buttonDisabled,
"nativeType": "button"
},
"class": bem('confirm'),
"on": {
"click": this.onConfirm
}
}, [text || t('confirm')]);
}
},
genFooter: function genFooter() {
var h = this.$createElement;
return h("div", {
"class": bem('footer', {
unfit: !this.safeAreaInsetBottom
})
}, [this.genFooterContent()]);
},
genCalendar: function genCalendar() {
var _this4 = this;
var h = this.$createElement;
return h("div", {
"class": bem()
}, [h(Header, {
"attrs": {
"title": this.title,
"showTitle": this.showTitle,
"subtitle": this.subtitle,
"showSubtitle": this.showSubtitle,
"firstDayOfWeek": this.dayOffset
},
"scopedSlots": {
title: function title() {
return _this4.slots('title');
}
}
}), h("div", {
"ref": "body",
"class": bem('body'),
"on": {
"scroll": this.onScroll
}
}, [this.months.map(this.genMonth)]), this.genFooter()]);
}
},
render: function render() {
var _this5 = this;
var h = arguments[0];
if (this.poppable) {
var _attrs;
var createListener = function createListener(name) {
return function () {
return _this5.$emit(name);
};
};
return h(Popup, {
"attrs": (_attrs = {
"round": true,
"value": this.value
}, _attrs["round"] = this.round, _attrs["position"] = this.position, _attrs["closeable"] = this.showTitle || this.showSubtitle, _attrs["getContainer"] = this.getContainer, _attrs["closeOnPopstate"] = this.closeOnPopstate, _attrs["closeOnClickOverlay"] = this.closeOnClickOverlay, _attrs),
"class": bem('popup'),
"on": {
"input": this.togglePopup,
"open": createListener('open'),
"opened": createListener('opened'),
"close": createListener('close'),
"closed": createListener('closed')
}
}, [this.genCalendar()]);
}
return this.genCalendar();
}
});

188
node_modules/vant/es/calendar/index.less generated vendored Normal file
View File

@ -0,0 +1,188 @@
@import '../style/var';
.van-calendar {
display: flex;
flex-direction: column;
height: 100%;
background-color: @calendar-background-color;
&__popup {
&.van-popup--top,
&.van-popup--bottom {
height: @calendar-popup-height;
}
&.van-popup--left,
&.van-popup--right {
height: 100%;
}
.van-popup__close-icon {
top: 11px;
}
}
&__header {
flex-shrink: 0;
box-shadow: @calendar-header-box-shadow;
}
&__month-title,
&__header-title,
&__header-subtitle {
height: @calendar-header-title-height;
font-weight: @font-weight-bold;
line-height: @calendar-header-title-height;
text-align: center;
}
&__header-title {
font-size: @calendar-header-title-font-size;
}
&__header-subtitle {
font-size: @calendar-header-subtitle-font-size;
}
&__month-title {
font-size: @calendar-month-title-font-size;
}
&__weekdays {
display: flex;
}
&__weekday {
flex: 1;
font-size: @calendar-weekdays-font-size;
line-height: @calendar-weekdays-height;
text-align: center;
}
&__body {
flex: 1;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
&__days {
position: relative;
display: flex;
flex-wrap: wrap;
user-select: none;
}
&__month-mark {
position: absolute;
top: 50%;
left: 50%;
z-index: 0;
color: @calendar-month-mark-color;
font-size: @calendar-month-mark-font-size;
transform: translate(-50%, -50%);
pointer-events: none;
}
&__day,
&__selected-day {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
&__day {
position: relative;
width: 14.285%;
height: @calendar-day-height;
font-size: @calendar-day-font-size;
cursor: pointer;
&--end,
&--start,
&--start-end,
&--multiple-middle,
&--multiple-selected {
color: @calendar-range-edge-color;
background-color: @calendar-range-edge-background-color;
}
&--start {
border-radius: @border-radius-md 0 0 @border-radius-md;
}
&--end {
border-radius: 0 @border-radius-md @border-radius-md 0;
}
&--start-end,
&--multiple-selected {
border-radius: @border-radius-md;
}
&--middle {
color: @calendar-range-middle-color;
&::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: currentColor;
opacity: @calendar-range-middle-background-opacity;
content: '';
}
}
&--disabled {
color: @calendar-day-disabled-color;
cursor: default;
}
}
&__top-info,
&__bottom-info {
position: absolute;
right: 0;
left: 0;
font-size: @calendar-info-font-size;
line-height: @calendar-info-line-height;
@media (max-width: 350px) {
font-size: 9px;
}
}
&__top-info {
top: 6px;
}
&__bottom-info {
bottom: 6px;
}
&__selected-day {
width: @calendar-selected-day-size;
height: @calendar-selected-day-size;
color: @calendar-selected-day-color;
background-color: @calendar-selected-day-background-color;
border-radius: @border-radius-md;
}
&__footer {
flex-shrink: 0;
padding: 0 @padding-md;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
&--unfit {
padding-bottom: 0;
}
}
&__confirm {
height: @calendar-confirm-button-height;
margin: @calendar-confirm-button-margin;
}
}

9
node_modules/vant/es/calendar/style/index.js generated vendored Normal file
View File

@ -0,0 +1,9 @@
import '../../style/base.css';
import '../../overlay/index.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../../popup/index.css';
import '../../loading/index.css';
import '../../button/index.css';
import '../../toast/index.css';
import '../index.css';

9
node_modules/vant/es/calendar/style/less.js generated vendored Normal file
View File

@ -0,0 +1,9 @@
import '../../style/base.less';
import '../../overlay/index.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../popup/index.less';
import '../../loading/index.less';
import '../../button/index.less';
import '../../toast/index.less';
import '../index.less';

66
node_modules/vant/es/calendar/utils.js generated vendored Normal file
View File

@ -0,0 +1,66 @@
import { createNamespace } from '../utils';
var _createNamespace = createNamespace('calendar'),
createComponent = _createNamespace[0],
bem = _createNamespace[1],
t = _createNamespace[2];
export { createComponent, bem, t };
export function formatMonthTitle(date) {
return t('monthTitle', date.getFullYear(), date.getMonth() + 1);
}
export function compareMonth(date1, date2) {
var year1 = date1.getFullYear();
var year2 = date2.getFullYear();
var month1 = date1.getMonth();
var month2 = date2.getMonth();
if (year1 === year2) {
return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
}
return year1 > year2 ? 1 : -1;
}
export function compareDay(day1, day2) {
var compareMonthResult = compareMonth(day1, day2);
if (compareMonthResult === 0) {
var date1 = day1.getDate();
var date2 = day2.getDate();
return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;
}
return compareMonthResult;
}
export function getDayByOffset(date, offset) {
date = new Date(date);
date.setDate(date.getDate() + offset);
return date;
}
export function getPrevDay(date) {
return getDayByOffset(date, -1);
}
export function getNextDay(date) {
return getDayByOffset(date, 1);
}
export function calcDateNum(date) {
var day1 = date[0].getTime();
var day2 = date[1].getTime();
return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;
}
export function copyDate(dates) {
return new Date(dates);
}
export function copyDates(dates) {
if (Array.isArray(dates)) {
return dates.map(function (date) {
if (date === null) {
return date;
}
return copyDate(date);
});
}
return copyDate(dates);
}

1
node_modules/vant/es/card/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-card{position:relative;box-sizing:border-box;padding:8px 16px;color:#323233;font-size:12px;background-color:#fafafa}.van-card:not(:first-child){margin-top:8px}.van-card__header{display:-webkit-box;display:-webkit-flex;display:flex}.van-card__thumb{position:relative;-webkit-box-flex:0;-webkit-flex:none;flex:none;width:88px;height:88px;margin-right:8px}.van-card__thumb img{border-radius:8px}.van-card__content{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;min-width:0;min-height:88px}.van-card__content--centered{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{max-height:32px;font-weight:500;line-height:16px}.van-card__desc{max-height:20px;color:#646566;line-height:20px}.van-card__bottom{line-height:20px}.van-card__price{display:inline-block;color:#323233;font-weight:500;font-size:12px}.van-card__price-integer{font-size:16px;font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif}.van-card__price-decimal{font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif}.van-card__origin-price{display:inline-block;margin-left:5px;color:#969799;font-size:10px;text-decoration:line-through}.van-card__num{float:right;color:#969799}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{-webkit-box-flex:0;-webkit-flex:none;flex:none;text-align:right}.van-card__footer .van-button{margin-left:5px}

158
node_modules/vant/es/card/index.js generated vendored Normal file
View File

@ -0,0 +1,158 @@
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
// Utils
import { createNamespace, isDef } from '../utils';
import { emit, inherit } from '../utils/functional'; // Components
import Tag from '../tag';
import Image from '../image'; // Types
var _createNamespace = createNamespace('card'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
function Card(h, props, slots, ctx) {
var _slots$priceTop;
var thumb = props.thumb;
var showNum = slots.num || isDef(props.num);
var showPrice = slots.price || isDef(props.price);
var showOriginPrice = slots['origin-price'] || isDef(props.originPrice);
var showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
function onThumbClick(event) {
emit(ctx, 'click-thumb', event);
}
function ThumbTag() {
if (slots.tag || props.tag) {
return h("div", {
"class": bem('tag')
}, [slots.tag ? slots.tag() : h(Tag, {
"attrs": {
"mark": true,
"type": "danger"
}
}, [props.tag])]);
}
}
function Thumb() {
if (slots.thumb || thumb) {
return h("a", {
"attrs": {
"href": props.thumbLink
},
"class": bem('thumb'),
"on": {
"click": onThumbClick
}
}, [slots.thumb ? slots.thumb() : h(Image, {
"attrs": {
"src": thumb,
"width": "100%",
"height": "100%",
"fit": "cover",
"lazy-load": props.lazyLoad
}
}), ThumbTag()]);
}
}
function Title() {
if (slots.title) {
return slots.title();
}
if (props.title) {
return h("div", {
"class": [bem('title'), 'van-multi-ellipsis--l2']
}, [props.title]);
}
}
function Desc() {
if (slots.desc) {
return slots.desc();
}
if (props.desc) {
return h("div", {
"class": [bem('desc'), 'van-ellipsis']
}, [props.desc]);
}
}
function PriceContent() {
var priceArr = props.price.toString().split('.');
return h("div", [h("span", {
"class": bem('price-currency')
}, [props.currency]), h("span", {
"class": bem('price-integer')
}, [priceArr[0]]), ".", h("span", {
"class": bem('price-decimal')
}, [priceArr[1]])]);
}
function Price() {
if (showPrice) {
return h("div", {
"class": bem('price')
}, [slots.price ? slots.price() : PriceContent()]);
}
}
function OriginPrice() {
if (showOriginPrice) {
var slot = slots['origin-price'];
return h("div", {
"class": bem('origin-price')
}, [slot ? slot() : props.currency + " " + props.originPrice]);
}
}
function Num() {
if (showNum) {
return h("div", {
"class": bem('num')
}, [slots.num ? slots.num() : "x" + props.num]);
}
}
function Footer() {
if (slots.footer) {
return h("div", {
"class": bem('footer')
}, [slots.footer()]);
}
}
return h("div", _mergeJSXProps([{
"class": bem()
}, inherit(ctx, true)]), [h("div", {
"class": bem('header')
}, [Thumb(), h("div", {
"class": bem('content', {
centered: props.centered
})
}, [h("div", [Title(), Desc(), slots.tags == null ? void 0 : slots.tags()]), showBottom && h("div", {
"class": "van-card__bottom"
}, [(_slots$priceTop = slots['price-top']) == null ? void 0 : _slots$priceTop.call(slots), Price(), OriginPrice(), Num(), slots.bottom == null ? void 0 : slots.bottom()])])]), Footer()]);
}
Card.props = {
tag: String,
desc: String,
thumb: String,
title: String,
centered: Boolean,
lazyLoad: Boolean,
thumbLink: String,
num: [Number, String],
price: [Number, String],
originPrice: [Number, String],
currency: {
type: String,
default: '¥'
}
};
export default createComponent(Card);

109
node_modules/vant/es/card/index.less generated vendored Normal file
View File

@ -0,0 +1,109 @@
@import '../style/var';
.van-card {
position: relative;
box-sizing: border-box;
padding: @card-padding;
color: @card-text-color;
font-size: @card-font-size;
background-color: @card-background-color;
&:not(:first-child) {
margin-top: @padding-xs;
}
&__header {
display: flex;
}
&__thumb {
position: relative;
flex: none;
width: @card-thumb-size;
height: @card-thumb-size;
margin-right: @padding-xs;
img {
border-radius: @card-thumb-border-radius;
}
}
&__content {
position: relative;
display: flex;
flex: 1;
flex-direction: column;
justify-content: space-between;
min-width: 0; /* hack for flex box ellipsis */
min-height: @card-thumb-size;
&--centered {
justify-content: center;
}
}
&__title,
&__desc {
word-wrap: break-word;
}
&__title {
max-height: 32px;
font-weight: @font-weight-bold;
line-height: @card-title-line-height;
}
&__desc {
max-height: @card-desc-line-height;
color: @card-desc-color;
line-height: @card-desc-line-height;
}
&__bottom {
line-height: @line-height-md;
}
&__price {
display: inline-block;
color: @card-price-color;
font-weight: @font-weight-bold;
font-size: @card-price-font-size;
}
&__price-integer {
font-size: @card-price-integer-font-size;
font-family: @card-price-font-family;
}
&__price-decimal {
font-family: @card-price-font-family;
}
&__origin-price {
display: inline-block;
margin-left: 5px;
color: @card-origin-price-color;
font-size: @card-origin-price-font-size;
text-decoration: line-through;
}
&__num {
float: right;
color: @card-num-color;
}
&__tag {
position: absolute;
top: 2px;
left: 0;
}
&__footer {
flex: none;
text-align: right;
.van-button {
margin-left: 5px;
}
}
}

6
node_modules/vant/es/card/style/index.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
import '../../style/base.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../../image/index.css';
import '../../tag/index.css';
import '../index.css';

6
node_modules/vant/es/card/style/less.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
import '../../style/base.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../image/index.less';
import '../../tag/index.less';
import '../index.less';

1
node_modules/vant/es/cascader/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-cascader__header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;height:48px;padding:0 16px}.van-cascader__title{font-weight:500;font-size:16px;line-height:20px}.van-cascader__close-icon{color:#c8c9cc;font-size:22px}.van-cascader__close-icon:active{color:#969799}.van-cascader__tabs .van-tab{-webkit-box-flex:0;-webkit-flex:none;flex:none;padding:0 10px}.van-cascader__tabs.van-tabs--line .van-tabs__wrap{height:48px}.van-cascader__tabs .van-tabs__nav--complete{padding-right:6px;padding-left:6px}.van-cascader__tab{color:#323233;font-weight:500}.van-cascader__tab--unselected{color:#969799;font-weight:400}.van-cascader__option{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;padding:10px 16px;font-size:14px;line-height:20px}.van-cascader__option:active{background-color:#f2f3f5}.van-cascader__option--selected{color:#ee0a24;font-weight:500}.van-cascader__selected-icon{font-size:18px}.van-cascader__options{box-sizing:border-box;height:384px;padding-top:6px;overflow-y:auto;-webkit-overflow-scrolling:touch}

284
node_modules/vant/es/cascader/index.js generated vendored Normal file
View File

@ -0,0 +1,284 @@
import { createNamespace } from '../utils';
import Tab from '../tab';
import Tabs from '../tabs';
import Icon from '../icon';
var _createNamespace = createNamespace('cascader'),
createComponent = _createNamespace[0],
bem = _createNamespace[1],
t = _createNamespace[2];
export default createComponent({
props: {
title: String,
value: [Number, String],
fieldNames: Object,
placeholder: String,
activeColor: String,
options: {
type: Array,
default: function _default() {
return [];
}
},
closeable: {
type: Boolean,
default: true
},
showHeader: {
type: Boolean,
default: true
}
},
data: function data() {
return {
tabs: [],
activeTab: 0
};
},
computed: {
textKey: function textKey() {
var _this$fieldNames;
return ((_this$fieldNames = this.fieldNames) == null ? void 0 : _this$fieldNames.text) || 'text';
},
valueKey: function valueKey() {
var _this$fieldNames2;
return ((_this$fieldNames2 = this.fieldNames) == null ? void 0 : _this$fieldNames2.value) || 'value';
},
childrenKey: function childrenKey() {
var _this$fieldNames3;
return ((_this$fieldNames3 = this.fieldNames) == null ? void 0 : _this$fieldNames3.children) || 'children';
}
},
watch: {
options: {
deep: true,
handler: 'updateTabs'
},
value: function value(_value) {
var _this = this;
if (_value || _value === 0) {
var values = this.tabs.map(function (tab) {
var _tab$selectedOption;
return (_tab$selectedOption = tab.selectedOption) == null ? void 0 : _tab$selectedOption[_this.valueKey];
});
if (values.indexOf(_value) !== -1) {
return;
}
}
this.updateTabs();
}
},
created: function created() {
this.updateTabs();
},
methods: {
getSelectedOptionsByValue: function getSelectedOptionsByValue(options, value) {
for (var i = 0; i < options.length; i++) {
var option = options[i];
if (option[this.valueKey] === value) {
return [option];
}
if (option[this.childrenKey]) {
var selectedOptions = this.getSelectedOptionsByValue(option[this.childrenKey], value);
if (selectedOptions) {
return [option].concat(selectedOptions);
}
}
}
},
updateTabs: function updateTabs() {
var _this2 = this;
if (this.value || this.value === 0) {
var selectedOptions = this.getSelectedOptionsByValue(this.options, this.value);
if (selectedOptions) {
var optionsCursor = this.options;
this.tabs = selectedOptions.map(function (option) {
var tab = {
options: optionsCursor,
selectedOption: option
};
var next = optionsCursor.filter(function (item) {
return item[_this2.valueKey] === option[_this2.valueKey];
});
if (next.length) {
optionsCursor = next[0][_this2.childrenKey];
}
return tab;
});
if (optionsCursor) {
this.tabs.push({
options: optionsCursor,
selectedOption: null
});
}
this.$nextTick(function () {
_this2.activeTab = _this2.tabs.length - 1;
});
return;
}
}
this.tabs = [{
options: this.options,
selectedOption: null
}];
},
onSelect: function onSelect(option, tabIndex) {
var _this3 = this;
this.tabs[tabIndex].selectedOption = option;
if (this.tabs.length > tabIndex + 1) {
this.tabs = this.tabs.slice(0, tabIndex + 1);
}
if (option[this.childrenKey]) {
var nextTab = {
options: option[this.childrenKey],
selectedOption: null
};
if (this.tabs[tabIndex + 1]) {
this.$set(this.tabs, tabIndex + 1, nextTab);
} else {
this.tabs.push(nextTab);
}
this.$nextTick(function () {
_this3.activeTab++;
});
}
var selectedOptions = this.tabs.map(function (tab) {
return tab.selectedOption;
}).filter(function (item) {
return !!item;
});
var eventParams = {
value: option[this.valueKey],
tabIndex: tabIndex,
selectedOptions: selectedOptions
};
this.$emit('input', option[this.valueKey]);
this.$emit('change', eventParams);
if (!option[this.childrenKey]) {
this.$emit('finish', eventParams);
}
},
onClose: function onClose() {
this.$emit('close');
},
renderHeader: function renderHeader() {
var h = this.$createElement;
if (this.showHeader) {
return h("div", {
"class": bem('header')
}, [h("h2", {
"class": bem('title')
}, [this.slots('title') || this.title]), this.closeable ? h(Icon, {
"attrs": {
"name": "cross"
},
"class": bem('close-icon'),
"on": {
"click": this.onClose
}
}) : null]);
}
},
renderOptions: function renderOptions(options, selectedOption, tabIndex) {
var _this4 = this;
var h = this.$createElement;
var renderOption = function renderOption(option) {
var isSelected = selectedOption && option[_this4.valueKey] === selectedOption[_this4.valueKey];
var Text = _this4.slots('option', {
option: option,
selected: isSelected
}) || h("span", [option[_this4.textKey]]);
return h("li", {
"class": bem('option', {
selected: isSelected
}),
"style": {
color: isSelected ? _this4.activeColor : null
},
"on": {
"click": function click() {
_this4.onSelect(option, tabIndex);
}
}
}, [Text, isSelected ? h(Icon, {
"attrs": {
"name": "success"
},
"class": bem('selected-icon')
}) : null]);
};
return h("ul", {
"class": bem('options')
}, [options.map(renderOption)]);
},
renderTab: function renderTab(item, tabIndex) {
var h = this.$createElement;
var options = item.options,
selectedOption = item.selectedOption;
var title = selectedOption ? selectedOption[this.textKey] : this.placeholder || t('select');
return h(Tab, {
"attrs": {
"title": title,
"titleClass": bem('tab', {
unselected: !selectedOption
})
}
}, [this.renderOptions(options, selectedOption, tabIndex)]);
},
renderTabs: function renderTabs() {
var _this5 = this;
var h = this.$createElement;
return h(Tabs, {
"attrs": {
"animated": true,
"swipeable": true,
"swipeThreshold": 0,
"color": this.activeColor
},
"class": bem('tabs'),
"model": {
value: _this5.activeTab,
callback: function callback($$v) {
_this5.activeTab = $$v;
}
}
}, [this.tabs.map(this.renderTab)]);
}
},
render: function render() {
var h = arguments[0];
return h("div", {
"class": bem()
}, [this.renderHeader(), this.renderTabs()]);
}
});

82
node_modules/vant/es/cascader/index.less generated vendored Normal file
View File

@ -0,0 +1,82 @@
@import '../style/var';
.van-cascader {
&__header {
display: flex;
align-items: center;
justify-content: space-between;
height: @cascader-header-height;
padding: 0 @padding-md;
}
&__title {
font-weight: @font-weight-bold;
font-size: @cascader-title-font-size;
line-height: @cascader-title-line-height;
}
&__close-icon {
color: @cascader-close-icon-color;
font-size: @cascader-close-icon-size;
&:active {
color: @cascader-close-icon-active-color;
}
}
&__tabs {
.van-tab {
flex: none;
padding: 0 10px;
}
&.van-tabs--line .van-tabs__wrap {
height: @cascader-tabs-height;
}
.van-tabs__nav--complete {
padding-right: 6px;
padding-left: 6px;
}
}
&__tab {
color: @cascader-tab-color;
font-weight: @font-weight-bold;
&--unselected {
color: @cascader-unselected-tab-color;
font-weight: normal;
}
}
&__option {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px @padding-md;
font-size: @font-size-md;
line-height: @line-height-md;
&:active {
background-color: @active-color;
}
&--selected {
color: @cascader-active-color;
font-weight: @font-weight-bold;
}
}
&__selected-icon {
font-size: @cascader-selected-icon-size;
}
&__options {
box-sizing: border-box;
height: @cascader-options-height;
padding-top: 6px;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
}

7
node_modules/vant/es/cascader/style/index.js generated vendored Normal file
View File

@ -0,0 +1,7 @@
import '../../style/base.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../../tab/index.css';
import '../../sticky/index.css';
import '../../tabs/index.css';
import '../index.css';

7
node_modules/vant/es/cascader/style/less.js generated vendored Normal file
View File

@ -0,0 +1,7 @@
import '../../style/base.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../tab/index.less';
import '../../sticky/index.less';
import '../../tabs/index.less';
import '../index.less';

1
node_modules/vant/es/cell-group/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-cell-group{background-color:#fff}.van-cell-group--inset{margin:0 16px;overflow:hidden;border-radius:8px}.van-cell-group__title{padding:16px 16px 8px;color:#969799;font-size:14px;line-height:16px}.van-cell-group__title--inset{padding:16px 16px 8px 32px}

41
node_modules/vant/es/cell-group/index.js generated vendored Normal file
View File

@ -0,0 +1,41 @@
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
// Utils
import { createNamespace } from '../utils';
import { inherit } from '../utils/functional';
import { BORDER_TOP_BOTTOM } from '../utils/constant'; // Types
var _createNamespace = createNamespace('cell-group'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
function CellGroup(h, props, slots, ctx) {
var _ref;
var Group = h("div", _mergeJSXProps([{
"class": [bem({
inset: props.inset
}), (_ref = {}, _ref[BORDER_TOP_BOTTOM] = props.border, _ref)]
}, inherit(ctx, true)]), [slots.default == null ? void 0 : slots.default()]);
if (props.title || slots.title) {
return h("div", {
"key": ctx.data.key
}, [h("div", {
"class": bem('title', {
inset: props.inset
})
}, [slots.title ? slots.title() : props.title]), Group]);
}
return Group;
}
CellGroup.props = {
title: String,
inset: Boolean,
border: {
type: Boolean,
default: true
}
};
export default createComponent(CellGroup);

22
node_modules/vant/es/cell-group/index.less generated vendored Normal file
View File

@ -0,0 +1,22 @@
@import '../style/var';
.van-cell-group {
background-color: @cell-group-background-color;
&--inset {
margin: @cell-group-inset-padding;
overflow: hidden;
border-radius: @cell-group-inset-border-radius;
}
&__title {
padding: @cell-group-title-padding;
color: @cell-group-title-color;
font-size: @cell-group-title-font-size;
line-height: @cell-group-title-line-height;
&--inset {
padding: @cell-group-inset-title-padding;
}
}
}

2
node_modules/vant/es/cell-group/style/index.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.css';
import '../index.css';

2
node_modules/vant/es/cell-group/style/less.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.less';
import '../index.less';

1
node_modules/vant/es/cell/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;overflow:hidden;color:#323233;font-size:14px;line-height:24px;background-color:#fff}.van-cell::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless::after,.van-cell:last-child::after{display:none}.van-cell__label{margin-top:4px;color:#969799;font-size:12px;line-height:18px}.van-cell__title,.van-cell__value{-webkit-box-flex:1;-webkit-flex:1;flex:1}.van-cell__value{position:relative;overflow:hidden;color:#969799;text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__value--alone{color:#323233;text-align:left}.van-cell__left-icon,.van-cell__right-icon{height:24px;font-size:16px;line-height:24px}.van-cell__left-icon{margin-right:4px}.van-cell__right-icon{margin-left:4px;color:#969799}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:#f2f3f5}.van-cell--required{overflow:visible}.van-cell--required::before{position:absolute;left:8px;color:#ee0a24;font-size:14px;content:'*'}.van-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px}.van-cell--large .van-cell__label{font-size:14px}

121
node_modules/vant/es/cell/index.js generated vendored Normal file
View File

@ -0,0 +1,121 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
// Utils
import { createNamespace, isDef } from '../utils';
import { emit, inherit } from '../utils/functional';
import { routeProps, functionalRoute } from '../utils/router';
import { cellProps } from './shared'; // Components
import Icon from '../icon'; // Types
var _createNamespace = createNamespace('cell'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
function Cell(h, props, slots, ctx) {
var _props$clickable;
var icon = props.icon,
size = props.size,
title = props.title,
label = props.label,
value = props.value,
isLink = props.isLink;
var showTitle = slots.title || isDef(title);
function Label() {
var showLabel = slots.label || isDef(label);
if (showLabel) {
return h("div", {
"class": [bem('label'), props.labelClass]
}, [slots.label ? slots.label() : label]);
}
}
function Title() {
if (showTitle) {
return h("div", {
"class": [bem('title'), props.titleClass],
"style": props.titleStyle
}, [slots.title ? slots.title() : h("span", [title]), Label()]);
}
}
function Value() {
var showValue = slots.default || isDef(value);
if (showValue) {
return h("div", {
"class": [bem('value', {
alone: !showTitle
}), props.valueClass]
}, [slots.default ? slots.default() : h("span", [value])]);
}
}
function LeftIcon() {
if (slots.icon) {
return slots.icon();
}
if (icon) {
return h(Icon, {
"class": bem('left-icon'),
"attrs": {
"name": icon,
"classPrefix": props.iconPrefix
}
});
}
}
function RightIcon() {
var rightIconSlot = slots['right-icon'];
if (rightIconSlot) {
return rightIconSlot();
}
if (isLink) {
var arrowDirection = props.arrowDirection;
return h(Icon, {
"class": bem('right-icon'),
"attrs": {
"name": arrowDirection ? "arrow-" + arrowDirection : 'arrow'
}
});
}
}
function onClick(event) {
emit(ctx, 'click', event);
functionalRoute(ctx);
}
var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;
var classes = {
clickable: clickable,
center: props.center,
required: props.required,
borderless: !props.border
};
if (size) {
classes[size] = size;
}
return h("div", _mergeJSXProps([{
"class": bem(classes),
"attrs": {
"role": clickable ? 'button' : null,
"tabindex": clickable ? 0 : null
},
"on": {
"click": onClick
}
}, inherit(ctx)]), [LeftIcon(), Title(), Value(), RightIcon(), slots.extra == null ? void 0 : slots.extra()]);
}
Cell.props = _extends({}, cellProps, routeProps);
export default createComponent(Cell);

103
node_modules/vant/es/cell/index.less generated vendored Normal file
View File

@ -0,0 +1,103 @@
@import '../style/var';
@import '../style/mixins/hairline';
.van-cell {
position: relative;
display: flex;
box-sizing: border-box;
width: 100%;
padding: @cell-vertical-padding @cell-horizontal-padding;
overflow: hidden;
color: @cell-text-color;
font-size: @cell-font-size;
line-height: @cell-line-height;
background-color: @cell-background-color;
&::after {
.hairline-bottom(@cell-border-color, @padding-md, @padding-md);
}
&:last-child::after,
&--borderless::after {
display: none;
}
&__label {
margin-top: @cell-label-margin-top;
color: @cell-label-color;
font-size: @cell-label-font-size;
line-height: @cell-label-line-height;
}
&__title,
&__value {
flex: 1;
}
&__value {
position: relative;
overflow: hidden;
color: @cell-value-color;
text-align: right;
vertical-align: middle;
word-wrap: break-word;
&--alone {
color: @text-color;
text-align: left;
}
}
&__left-icon,
&__right-icon {
height: @cell-line-height;
font-size: @cell-icon-size;
line-height: @cell-line-height;
}
&__left-icon {
margin-right: @padding-base;
}
&__right-icon {
margin-left: @padding-base;
color: @cell-right-icon-color;
}
&--clickable {
cursor: pointer;
&:active {
background-color: @cell-active-color;
}
}
&--required {
overflow: visible;
&::before {
position: absolute;
left: @padding-xs;
color: @cell-required-color;
font-size: @cell-font-size;
content: '*';
}
}
&--center {
align-items: center;
}
&--large {
padding-top: @cell-large-vertical-padding;
padding-bottom: @cell-large-vertical-padding;
.van-cell__title {
font-size: @cell-large-title-font-size;
}
.van-cell__label {
font-size: @cell-large-label-font-size;
}
}
}

24
node_modules/vant/es/cell/shared.js generated vendored Normal file
View File

@ -0,0 +1,24 @@
export var cellProps = {
icon: String,
size: String,
center: Boolean,
isLink: Boolean,
required: Boolean,
iconPrefix: String,
titleStyle: null,
titleClass: null,
valueClass: null,
labelClass: null,
title: [Number, String],
value: [Number, String],
label: [Number, String],
arrowDirection: String,
border: {
type: Boolean,
default: true
},
clickable: {
type: Boolean,
default: null
}
};

4
node_modules/vant/es/cell/style/index.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
import '../../style/base.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../index.css';

4
node_modules/vant/es/cell/style/less.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
import '../../style/base.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../index.less';

1
node_modules/vant/es/checkbox-group/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-checkbox-group--horizontal{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}

64
node_modules/vant/es/checkbox-group/index.js generated vendored Normal file
View File

@ -0,0 +1,64 @@
import { createNamespace } from '../utils';
import { FieldMixin } from '../mixins/field';
import { ParentMixin } from '../mixins/relation';
var _createNamespace = createNamespace('checkbox-group'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
export default createComponent({
mixins: [ParentMixin('vanCheckbox'), FieldMixin],
props: {
max: [Number, String],
disabled: Boolean,
direction: String,
iconSize: [Number, String],
checkedColor: String,
value: {
type: Array,
default: function _default() {
return [];
}
}
},
watch: {
value: function value(val) {
this.$emit('change', val);
}
},
methods: {
// @exposed-api
toggleAll: function toggleAll(options) {
if (options === void 0) {
options = {};
}
if (typeof options === 'boolean') {
options = {
checked: options
};
}
var _options = options,
checked = _options.checked,
skipDisabled = _options.skipDisabled;
var children = this.children.filter(function (item) {
if (item.disabled && skipDisabled) {
return item.checked;
}
return checked != null ? checked : !item.checked;
});
var names = children.map(function (item) {
return item.name;
});
this.$emit('input', names);
}
},
render: function render() {
var h = arguments[0];
return h("div", {
"class": bem([this.direction])
}, [this.slots()]);
}
});

8
node_modules/vant/es/checkbox-group/index.less generated vendored Normal file
View File

@ -0,0 +1,8 @@
@import '../style/var';
.van-checkbox-group {
&--horizontal {
display: flex;
flex-wrap: wrap;
}
}

2
node_modules/vant/es/checkbox-group/style/index.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.css';
import '../index.css';

2
node_modules/vant/es/checkbox-group/style/less.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.less';
import '../index.less';

1
node_modules/vant/es/checkbox/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-checkbox{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-checkbox--disabled{cursor:not-allowed}.van-checkbox--label-disabled{cursor:default}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon{-webkit-box-flex:0;-webkit-flex:none;flex:none;height:1em;font-size:20px;line-height:1em;cursor:pointer}.van-checkbox__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid #c8c9cc;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:color,border-color,background-color;transition-property:color,border-color,background-color}.van-checkbox__icon--round .van-icon{border-radius:100%}.van-checkbox__icon--checked .van-icon{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{cursor:not-allowed}.van-checkbox__icon--disabled .van-icon{background-color:#ebedf0;border-color:#c8c9cc}.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon{color:#c8c9cc}.van-checkbox__label{margin-left:8px;color:#323233;line-height:20px}.van-checkbox__label--left{margin:0 8px 0 0}.van-checkbox__label--disabled{color:#c8c9cc}

80
node_modules/vant/es/checkbox/index.js generated vendored Normal file
View File

@ -0,0 +1,80 @@
import { createNamespace } from '../utils';
import { CheckboxMixin } from '../mixins/checkbox';
var _createNamespace = createNamespace('checkbox'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
export default createComponent({
mixins: [CheckboxMixin({
bem: bem,
role: 'checkbox',
parent: 'vanCheckbox'
})],
computed: {
checked: {
get: function get() {
if (this.parent) {
return this.parent.value.indexOf(this.name) !== -1;
}
return this.value;
},
set: function set(val) {
if (this.parent) {
this.setParentValue(val);
} else {
this.$emit('input', val);
}
}
}
},
watch: {
value: function value(val) {
this.$emit('change', val);
}
},
methods: {
// @exposed-api
toggle: function toggle(checked) {
var _this = this;
if (checked === void 0) {
checked = !this.checked;
}
// When toggle method is called multiple times at the same time,
// only the last call is valid.
// This is a hack for usage inside Cell.
clearTimeout(this.toggleTask);
this.toggleTask = setTimeout(function () {
_this.checked = checked;
});
},
setParentValue: function setParentValue(val) {
var parent = this.parent;
var value = parent.value.slice();
if (val) {
if (parent.max && value.length >= parent.max) {
return;
}
/* istanbul ignore else */
if (value.indexOf(this.name) === -1) {
value.push(this.name);
parent.$emit('input', value);
}
} else {
var index = value.indexOf(this.name);
/* istanbul ignore else */
if (index !== -1) {
value.splice(index, 1);
parent.$emit('input', value);
}
}
}
}
});

86
node_modules/vant/es/checkbox/index.less generated vendored Normal file
View File

@ -0,0 +1,86 @@
@import '../style/var';
.van-checkbox {
display: flex;
align-items: center;
overflow: hidden;
cursor: pointer;
user-select: none;
&--disabled {
cursor: not-allowed;
}
&--label-disabled {
cursor: default;
}
&--horizontal {
margin-right: @padding-sm;
}
&__icon {
flex: none;
height: 1em;
font-size: @checkbox-size;
line-height: 1em;
cursor: pointer;
.van-icon {
display: block;
box-sizing: border-box;
width: 1.25em;
height: 1.25em;
color: transparent;
font-size: 0.8em;
line-height: 1.25;
text-align: center;
border: 1px solid @checkbox-border-color;
transition-duration: @checkbox-transition-duration;
transition-property: color, border-color, background-color;
}
&--round {
.van-icon {
border-radius: 100%;
}
}
&--checked {
.van-icon {
color: @white;
background-color: @checkbox-checked-icon-color;
border-color: @checkbox-checked-icon-color;
}
}
&--disabled {
cursor: not-allowed;
.van-icon {
background-color: @checkbox-disabled-background-color;
border-color: @checkbox-disabled-icon-color;
}
}
&--disabled&--checked {
.van-icon {
color: @checkbox-disabled-icon-color;
}
}
}
&__label {
margin-left: @checkbox-label-margin;
color: @checkbox-label-color;
line-height: @checkbox-size;
&--left {
margin: 0 @checkbox-label-margin 0 0;
}
&--disabled {
color: @checkbox-disabled-label-color;
}
}
}

4
node_modules/vant/es/checkbox/style/index.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
import '../../style/base.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../index.css';

4
node_modules/vant/es/checkbox/style/less.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
import '../../style/base.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../index.less';

1
node_modules/vant/es/circle/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-circle{position:relative;display:inline-block;width:100px;height:100px;text-align:center}.van-circle svg{position:absolute;top:0;left:0;width:100%;height:100%}.van-circle__layer{stroke:#fff}.van-circle__hover{fill:none;stroke:#1989fa;stroke-linecap:round}.van-circle__text{position:absolute;top:50%;left:0;box-sizing:border-box;width:100%;padding:0 4px;color:#323233;font-weight:500;font-size:14px;line-height:20px;-webkit-transform:translateY(-50%);transform:translateY(-50%)}

175
node_modules/vant/es/circle/index.js generated vendored Normal file
View File

@ -0,0 +1,175 @@
import { createNamespace, isObject, addUnit } from '../utils';
import { raf, cancelRaf } from '../utils/dom/raf';
var _createNamespace = createNamespace('circle'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
var PERIMETER = 3140;
var uid = 0;
function format(rate) {
return Math.min(Math.max(rate, 0), 100);
}
function getPath(clockwise, viewBoxSize) {
var sweepFlag = clockwise ? 1 : 0;
return "M " + viewBoxSize / 2 + " " + viewBoxSize / 2 + " m 0, -500 a 500, 500 0 1, " + sweepFlag + " 0, 1000 a 500, 500 0 1, " + sweepFlag + " 0, -1000";
}
export default createComponent({
props: {
text: String,
size: [Number, String],
color: [String, Object],
layerColor: String,
strokeLinecap: String,
value: {
type: Number,
default: 0
},
speed: {
type: [Number, String],
default: 0
},
fill: {
type: String,
default: 'none'
},
rate: {
type: [Number, String],
default: 100
},
strokeWidth: {
type: [Number, String],
default: 40
},
clockwise: {
type: Boolean,
default: true
}
},
beforeCreate: function beforeCreate() {
this.uid = "van-circle-gradient-" + uid++;
},
computed: {
style: function style() {
var size = addUnit(this.size);
return {
width: size,
height: size
};
},
path: function path() {
return getPath(this.clockwise, this.viewBoxSize);
},
viewBoxSize: function viewBoxSize() {
return +this.strokeWidth + 1000;
},
layerStyle: function layerStyle() {
return {
fill: "" + this.fill,
stroke: "" + this.layerColor,
strokeWidth: this.strokeWidth + "px"
};
},
hoverStyle: function hoverStyle() {
var offset = PERIMETER * this.value / 100;
return {
stroke: "" + (this.gradient ? "url(#" + this.uid + ")" : this.color),
strokeWidth: +this.strokeWidth + 1 + "px",
strokeLinecap: this.strokeLinecap,
strokeDasharray: offset + "px " + PERIMETER + "px"
};
},
gradient: function gradient() {
return isObject(this.color);
},
LinearGradient: function LinearGradient() {
var _this = this;
var h = this.$createElement;
if (!this.gradient) {
return;
}
var Stops = Object.keys(this.color).sort(function (a, b) {
return parseFloat(a) - parseFloat(b);
}).map(function (key, index) {
return h("stop", {
"key": index,
"attrs": {
"offset": key,
"stop-color": _this.color[key]
}
});
});
return h("defs", [h("linearGradient", {
"attrs": {
"id": this.uid,
"x1": "100%",
"y1": "0%",
"x2": "0%",
"y2": "0%"
}
}, [Stops])]);
}
},
watch: {
rate: {
handler: function handler(rate) {
this.startTime = Date.now();
this.startRate = this.value;
this.endRate = format(rate);
this.increase = this.endRate > this.startRate;
this.duration = Math.abs((this.startRate - this.endRate) * 1000 / this.speed);
if (this.speed) {
cancelRaf(this.rafId);
this.rafId = raf(this.animate);
} else {
this.$emit('input', this.endRate);
}
},
immediate: true
}
},
methods: {
animate: function animate() {
var now = Date.now();
var progress = Math.min((now - this.startTime) / this.duration, 1);
var rate = progress * (this.endRate - this.startRate) + this.startRate;
this.$emit('input', format(parseFloat(rate.toFixed(1))));
if (this.increase ? rate < this.endRate : rate > this.endRate) {
this.rafId = raf(this.animate);
}
}
},
render: function render() {
var h = arguments[0];
return h("div", {
"class": bem(),
"style": this.style
}, [h("svg", {
"attrs": {
"viewBox": "0 0 " + this.viewBoxSize + " " + this.viewBoxSize
}
}, [this.LinearGradient, h("path", {
"class": bem('layer'),
"style": this.layerStyle,
"attrs": {
"d": this.path
}
}), h("path", {
"attrs": {
"d": this.path
},
"class": bem('hover'),
"style": this.hoverStyle
})]), this.slots() || this.text && h("div", {
"class": bem('text')
}, [this.text])]);
}
});

41
node_modules/vant/es/circle/index.less generated vendored Normal file
View File

@ -0,0 +1,41 @@
@import '../style/var';
.van-circle {
position: relative;
display: inline-block;
width: @circle-size;
height: @circle-size;
text-align: center;
svg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
&__layer {
stroke: @circle-layer-color;
}
&__hover {
fill: none;
stroke: @circle-color;
stroke-linecap: round;
}
&__text {
position: absolute;
top: 50%;
left: 0;
box-sizing: border-box;
width: 100%;
padding: 0 @padding-base;
color: @circle-text-color;
font-weight: @circle-text-font-weight;
font-size: @circle-text-font-size;
line-height: @circle-text-line-height;
transform: translateY(-50%);
}
}

2
node_modules/vant/es/circle/style/index.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.css';
import '../index.css';

2
node_modules/vant/es/circle/style/less.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.less';
import '../index.less';

1
node_modules/vant/es/col/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-col{float:left;box-sizing:border-box;min-height:1px}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}

55
node_modules/vant/es/col/index.js generated vendored Normal file
View File

@ -0,0 +1,55 @@
import { createNamespace } from '../utils';
import { ChildrenMixin } from '../mixins/relation';
var _createNamespace = createNamespace('col'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
export default createComponent({
mixins: [ChildrenMixin('vanRow')],
props: {
span: [Number, String],
offset: [Number, String],
tag: {
type: String,
default: 'div'
}
},
computed: {
style: function style() {
var index = this.index;
var _ref = this.parent || {},
spaces = _ref.spaces;
if (spaces && spaces[index]) {
var _spaces$index = spaces[index],
left = _spaces$index.left,
right = _spaces$index.right;
return {
paddingLeft: left ? left + "px" : null,
paddingRight: right ? right + "px" : null
};
}
}
},
methods: {
onClick: function onClick(event) {
this.$emit('click', event);
}
},
render: function render() {
var _bem;
var h = arguments[0];
var span = this.span,
offset = this.offset;
return h(this.tag, {
"style": this.style,
"class": bem((_bem = {}, _bem[span] = span, _bem["offset-" + offset] = offset, _bem)),
"on": {
"click": this.onClick
}
}, [this.slots()]);
}
});

20
node_modules/vant/es/col/index.less generated vendored Normal file
View File

@ -0,0 +1,20 @@
@import '../style/var';
.van-col {
float: left;
box-sizing: border-box;
min-height: 1px;
}
.generate-col(24);
.generate-col(@n, @i: 1) when (@i =< @n) {
.van-col--@{i} {
width: (@i * 100% / 24);
}
.van-col--offset-@{i} {
margin-left: (@i * 100% / 24);
}
.generate-col(@n, (@i + 1));
}

2
node_modules/vant/es/col/style/index.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.css';
import '../index.css';

2
node_modules/vant/es/col/style/less.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.less';
import '../index.less';

1
node_modules/vant/es/collapse-item/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-collapse-item{position:relative}.van-collapse-item--border::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:16px;left:16px;border-top:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-collapse-item__title .van-cell__right-icon::before{-webkit-transform:rotate(90deg) translateZ(0);transform:rotate(90deg) translateZ(0);-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.van-collapse-item__title::after{right:16px;display:none}.van-collapse-item__title--expanded .van-cell__right-icon::before{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--expanded::after{display:block}.van-collapse-item__title--borderless::after{display:none}.van-collapse-item__title--disabled{cursor:not-allowed}.van-collapse-item__title--disabled,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c8c9cc}.van-collapse-item__title--disabled:active{background-color:#fff}.van-collapse-item__wrapper{overflow:hidden;-webkit-transition:height .3s ease-in-out;transition:height .3s ease-in-out;will-change:height}.van-collapse-item__content{padding:12px 16px;color:#969799;font-size:14px;line-height:1.5;background-color:#fff}

202
node_modules/vant/es/collapse-item/index.js generated vendored Normal file
View File

@ -0,0 +1,202 @@
import _extends from "@babel/runtime/helpers/esm/extends";
// Utils
import { createNamespace } from '../utils';
import { raf, doubleRaf } from '../utils/dom/raf'; // Mixins
import { ChildrenMixin } from '../mixins/relation'; // Components
import Cell from '../cell';
import { cellProps } from '../cell/shared';
var _createNamespace = createNamespace('collapse-item'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
var CELL_SLOTS = ['title', 'icon', 'right-icon'];
export default createComponent({
mixins: [ChildrenMixin('vanCollapse')],
props: _extends({}, cellProps, {
name: [Number, String],
disabled: Boolean,
lazyRender: {
type: Boolean,
default: true
},
isLink: {
type: Boolean,
default: true
}
}),
data: function data() {
return {
show: null,
inited: null
};
},
computed: {
currentName: function currentName() {
var _this$name;
return (_this$name = this.name) != null ? _this$name : this.index;
},
expanded: function expanded() {
var _this = this;
if (!this.parent) {
return null;
}
var _this$parent = this.parent,
value = _this$parent.value,
accordion = _this$parent.accordion;
if (process.env.NODE_ENV === 'development' && !accordion && !Array.isArray(value)) {
console.error('[Vant] Collapse: type of prop "value" should be Array');
return;
}
return accordion ? value === this.currentName : value.some(function (name) {
return name === _this.currentName;
});
}
},
created: function created() {
this.show = this.expanded;
this.inited = this.expanded;
},
watch: {
expanded: function expanded(_expanded, prev) {
var _this2 = this;
if (prev === null) {
return;
}
if (_expanded) {
this.show = true;
this.inited = true;
} // Use raf: flick when opened in safari
// Use nextTick: closing animation failed when set `user-select: none`
var nextTick = _expanded ? this.$nextTick : raf;
nextTick(function () {
var _this2$$refs = _this2.$refs,
content = _this2$$refs.content,
wrapper = _this2$$refs.wrapper;
if (!content || !wrapper) {
return;
}
var offsetHeight = content.offsetHeight;
if (offsetHeight) {
var contentHeight = offsetHeight + "px";
wrapper.style.height = _expanded ? 0 : contentHeight; // use double raf to ensure animation can start
doubleRaf(function () {
wrapper.style.height = _expanded ? contentHeight : 0;
});
} else {
_this2.onTransitionEnd();
}
});
}
},
methods: {
onClick: function onClick() {
if (!this.disabled) {
this.toggle();
}
},
// @exposed-api
toggle: function toggle(expanded) {
if (expanded === void 0) {
expanded = !this.expanded;
}
var parent = this.parent,
currentName = this.currentName;
var close = parent.accordion && currentName === parent.value;
var name = close ? '' : currentName;
this.parent.switch(name, expanded);
},
onTransitionEnd: function onTransitionEnd() {
if (!this.expanded) {
this.show = false;
} else {
this.$refs.wrapper.style.height = '';
}
},
genTitle: function genTitle() {
var _this3 = this;
var h = this.$createElement;
var border = this.border,
disabled = this.disabled,
expanded = this.expanded;
var titleSlots = CELL_SLOTS.reduce(function (slots, name) {
if (_this3.slots(name)) {
slots[name] = function () {
return _this3.slots(name);
};
}
return slots;
}, {});
if (this.slots('value')) {
titleSlots.default = function () {
return _this3.slots('value');
};
}
return h(Cell, {
"attrs": {
"role": "button",
"tabindex": disabled ? -1 : 0,
"aria-expanded": String(expanded)
},
"class": bem('title', {
disabled: disabled,
expanded: expanded,
borderless: !border
}),
"on": {
"click": this.onClick
},
"scopedSlots": titleSlots,
"props": _extends({}, this.$props)
});
},
genContent: function genContent() {
var h = this.$createElement;
if (this.inited || !this.lazyRender) {
return h("div", {
"directives": [{
name: "show",
value: this.show
}],
"ref": "wrapper",
"class": bem('wrapper'),
"on": {
"transitionend": this.onTransitionEnd
}
}, [h("div", {
"ref": "content",
"class": bem('content')
}, [this.slots()])]);
}
}
},
render: function render() {
var h = arguments[0];
return h("div", {
"class": [bem({
border: this.index && this.border
})]
}, [this.genTitle(), this.genContent()]);
}
});

69
node_modules/vant/es/collapse-item/index.less generated vendored Normal file
View File

@ -0,0 +1,69 @@
@import '../style/var';
@import '../style/mixins/hairline';
.van-collapse-item {
position: relative;
&--border {
&::after {
.hairline-top(@cell-border-color, @padding-md, @padding-md);
}
}
&__title {
.van-cell__right-icon::before {
// using translateZ to fix safari rendering issues
// see: https://github.com/vant-ui/vant/issues/8608
transform: rotate(90deg) translateZ(0);
transition: transform @collapse-item-transition-duration;
}
&::after {
right: @padding-md;
display: none;
}
&--expanded {
.van-cell__right-icon::before {
transform: rotate(-90deg);
}
&::after {
display: block;
}
}
&--borderless {
&::after {
display: none;
}
}
&--disabled {
cursor: not-allowed;
&,
& .van-cell__right-icon {
color: @collapse-item-title-disabled-color;
}
&:active {
background-color: @white;
}
}
}
&__wrapper {
overflow: hidden;
transition: height @collapse-item-transition-duration ease-in-out;
will-change: height;
}
&__content {
padding: @collapse-item-content-padding;
color: @collapse-item-content-text-color;
font-size: @collapse-item-content-font-size;
line-height: @collapse-item-content-line-height;
background-color: @collapse-item-content-background-color;
}
}

5
node_modules/vant/es/collapse-item/style/index.js generated vendored Normal file
View 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/collapse-item/style/less.js generated vendored Normal file
View File

@ -0,0 +1,5 @@
import '../../style/base.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../cell/index.less';
import '../index.less';

39
node_modules/vant/es/collapse/index.js generated vendored Normal file
View File

@ -0,0 +1,39 @@
import { createNamespace } from '../utils';
import { ParentMixin } from '../mixins/relation';
import { BORDER_TOP_BOTTOM } from '../utils/constant';
var _createNamespace = createNamespace('collapse'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
export default createComponent({
mixins: [ParentMixin('vanCollapse')],
props: {
accordion: Boolean,
value: [String, Number, Array],
border: {
type: Boolean,
default: true
}
},
methods: {
switch: function _switch(name, expanded) {
if (!this.accordion) {
name = expanded ? this.value.concat(name) : this.value.filter(function (activeName) {
return activeName !== name;
});
}
this.$emit('change', name);
this.$emit('input', name);
}
},
render: function render() {
var _ref;
var h = arguments[0];
return h("div", {
"class": [bem(), (_ref = {}, _ref[BORDER_TOP_BOTTOM] = this.border, _ref)]
}, [this.slots()]);
}
});

1
node_modules/vant/es/collapse/style/index.js generated vendored Normal file
View File

@ -0,0 +1 @@
import '../../style/base.css';

1
node_modules/vant/es/collapse/style/less.js generated vendored Normal file
View File

@ -0,0 +1 @@
import '../../style/base.less';

1
node_modules/vant/es/contact-card/index.css generated vendored Normal file
View 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
View 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
View 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
View 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
View File

@ -0,0 +1,5 @@
import '../../style/base.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../cell/index.less';
import '../index.less';

1
node_modules/vant/es/contact-edit/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-contact-edit{padding:16px}.van-contact-edit__fields{overflow:hidden;border-radius:4px}.van-contact-edit__fields .van-field__label{width:4.1em}.van-contact-edit__switch-cell{margin-top:10px;padding-top:9px;padding-bottom:9px;border-radius:4px}.van-contact-edit__buttons{padding:32px 0}.van-contact-edit .van-button{margin-bottom:12px;font-size:16px}

193
node_modules/vant/es/contact-edit/index.js generated vendored Normal file
View File

@ -0,0 +1,193 @@
import _extends from "@babel/runtime/helpers/esm/extends";
// Utils
import { createNamespace } from '../utils';
import { isMobile } from '../utils/validate/mobile'; // Components
import Cell from '../cell';
import Field from '../field';
import Button from '../button';
import Dialog from '../dialog';
import Switch from '../switch';
var _createNamespace = createNamespace('contact-edit'),
createComponent = _createNamespace[0],
bem = _createNamespace[1],
t = _createNamespace[2];
var defaultContact = {
tel: '',
name: ''
};
export default createComponent({
props: {
isEdit: Boolean,
isSaving: Boolean,
isDeleting: Boolean,
showSetDefault: Boolean,
setDefaultLabel: String,
contactInfo: {
type: Object,
default: function _default() {
return _extends({}, defaultContact);
}
},
telValidator: {
type: Function,
default: isMobile
}
},
data: function data() {
return {
data: _extends({}, defaultContact, this.contactInfo),
errorInfo: {
name: '',
tel: ''
}
};
},
watch: {
contactInfo: function contactInfo(val) {
this.data = _extends({}, defaultContact, val);
}
},
methods: {
onFocus: function onFocus(key) {
this.errorInfo[key] = '';
},
getErrorMessageByKey: function getErrorMessageByKey(key) {
var value = this.data[key].trim();
switch (key) {
case 'name':
return value ? '' : t('nameInvalid');
case 'tel':
return this.telValidator(value) ? '' : t('telInvalid');
}
},
onSave: function onSave() {
var _this = this;
var isValid = ['name', 'tel'].every(function (item) {
var msg = _this.getErrorMessageByKey(item);
if (msg) {
_this.errorInfo[item] = msg;
}
return !msg;
});
if (isValid && !this.isSaving) {
this.$emit('save', this.data);
}
},
onDelete: function onDelete() {
var _this2 = this;
Dialog.confirm({
title: t('confirmDelete')
}).then(function () {
_this2.$emit('delete', _this2.data);
});
}
},
render: function render() {
var _this3 = this;
var h = arguments[0];
var data = this.data,
errorInfo = this.errorInfo;
var onFocus = function onFocus(name) {
return function () {
return _this3.onFocus(name);
};
};
return h("div", {
"class": bem()
}, [h("div", {
"class": bem('fields')
}, [h(Field, {
"attrs": {
"clearable": true,
"maxlength": "30",
"label": t('name'),
"placeholder": t('nameEmpty'),
"errorMessage": errorInfo.name
},
"on": {
"focus": onFocus('name')
},
"model": {
value: data.name,
callback: function callback($$v) {
_this3.$set(data, "name", $$v);
}
}
}), h(Field, {
"attrs": {
"clearable": true,
"type": "tel",
"label": t('tel'),
"placeholder": t('telEmpty'),
"errorMessage": errorInfo.tel
},
"on": {
"focus": onFocus('tel')
},
"model": {
value: data.tel,
callback: function callback($$v) {
_this3.$set(data, "tel", $$v);
}
}
})]), this.showSetDefault && h(Cell, {
"attrs": {
"title": this.setDefaultLabel,
"border": false
},
"class": bem('switch-cell')
}, [h(Switch, {
"attrs": {
"size": 24
},
"slot": "right-icon",
"on": {
"change": function change(event) {
_this3.$emit('change-default', event);
}
},
"model": {
value: data.isDefault,
callback: function callback($$v) {
_this3.$set(data, "isDefault", $$v);
}
}
})]), h("div", {
"class": bem('buttons')
}, [h(Button, {
"attrs": {
"block": true,
"round": true,
"type": "danger",
"text": t('save'),
"loading": this.isSaving
},
"on": {
"click": this.onSave
}
}), this.isEdit && h(Button, {
"attrs": {
"block": true,
"round": true,
"text": t('delete'),
"loading": this.isDeleting
},
"on": {
"click": this.onDelete
}
})])]);
}
});

30
node_modules/vant/es/contact-edit/index.less generated vendored Normal file
View File

@ -0,0 +1,30 @@
@import '../style/var';
.van-contact-edit {
padding: @contact-edit-padding;
&__fields {
overflow: hidden;
border-radius: @contact-edit-fields-radius;
.van-field__label {
width: @contact-edit-field-label-width;
}
}
&__switch-cell {
margin-top: 10px;
padding-top: 9px;
padding-bottom: 9px;
border-radius: @contact-edit-fields-radius;
}
&__buttons {
padding: @contact-edit-buttons-padding;
}
.van-button {
margin-bottom: @contact-edit-button-margin-bottom;
font-size: @contact-edit-button-font-size;
}
}

14
node_modules/vant/es/contact-edit/style/index.js generated vendored Normal file
View File

@ -0,0 +1,14 @@
import '../../style/base.css';
import '../../overlay/index.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../../cell/index.css';
import '../../field/index.css';
import '../../popup/index.css';
import '../../loading/index.css';
import '../../switch/index.css';
import '../../button/index.css';
import '../../goods-action-button/index.css';
import '../../goods-action/index.css';
import '../../dialog/index.css';
import '../index.css';

14
node_modules/vant/es/contact-edit/style/less.js generated vendored Normal file
View File

@ -0,0 +1,14 @@
import '../../style/base.less';
import '../../overlay/index.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../../cell/index.less';
import '../../field/index.less';
import '../../popup/index.less';
import '../../loading/index.less';
import '../../switch/index.less';
import '../../button/index.less';
import '../../goods-action-button/index.less';
import '../../goods-action/index.less';
import '../../dialog/index.less';
import '../index.less';

1
node_modules/vant/es/contact-list/index.css generated vendored Normal file
View 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}

119
node_modules/vant/es/contact-list/index.js generated vendored Normal file
View File

@ -0,0 +1,119 @@
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
// Utils
import { createNamespace } from '../utils';
import { RED } from '../utils/constant';
import { emit, inherit } from '../utils/functional'; // Components
import Tag from '../tag';
import Icon from '../icon';
import Cell from '../cell';
import Radio from '../radio';
import Button from '../button';
import RadioGroup from '../radio-group'; // Types
var _createNamespace = 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() {
emit(ctx, 'input', item.id);
emit(ctx, 'select', item, index);
}
function RightIcon() {
return h(Radio, {
"attrs": {
"name": item.id,
"iconSize": 16,
"checkedColor": RED
},
"on": {
"click": onClick
}
});
}
function LeftIcon() {
return h(Icon, {
"attrs": {
"name": "edit"
},
"class": bem('edit'),
"on": {
"click": function click(event) {
event.stopPropagation();
emit(ctx, 'edit', item, index);
}
}
});
}
function Content() {
var nodes = [item.name + "\uFF0C" + item.tel];
if (item.isDefault && props.defaultTagText) {
nodes.push(h(Tag, {
"attrs": {
"type": "danger",
"round": true
},
"class": bem('item-tag')
}, [props.defaultTagText]));
}
return nodes;
}
return h(Cell, {
"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", _mergeJSXProps([{
"class": bem()
}, inherit(ctx)]), [h(RadioGroup, {
"attrs": {
"value": props.value
},
"class": bem('group')
}, [List]), h("div", {
"class": bem('bottom')
}, [h(Button, {
"attrs": {
"round": true,
"block": true,
"type": "danger",
"text": props.addText || t('addText')
},
"class": bem('add'),
"on": {
"click": function click() {
emit(ctx, 'add');
}
}
})])]);
}
ContactList.props = {
value: null,
list: Array,
addText: String,
defaultTagText: String
};
export default createComponent(ContactList);

54
node_modules/vant/es/contact-list/index.less generated vendored Normal file
View 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;
}
}

Some files were not shown because too many files have changed in this diff Show More