You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2670 lines
76 KiB
2670 lines
76 KiB
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 305);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var _interopRequireDefault = __webpack_require__(1);
|
|
|
|
exports.__esModule = true;
|
|
exports.noop = noop;
|
|
exports.isDef = isDef;
|
|
exports.isFunction = isFunction;
|
|
exports.isObject = isObject;
|
|
exports.isPromise = isPromise;
|
|
exports.get = get;
|
|
exports.isServer = exports.inBrowser = exports.addUnit = exports.createNamespace = void 0;
|
|
|
|
var _vue = _interopRequireDefault(__webpack_require__(4));
|
|
|
|
var _create = __webpack_require__(24);
|
|
|
|
exports.createNamespace = _create.createNamespace;
|
|
|
|
var _unit = __webpack_require__(20);
|
|
|
|
exports.addUnit = _unit.addUnit;
|
|
var inBrowser = typeof window !== 'undefined';
|
|
exports.inBrowser = inBrowser;
|
|
var isServer = _vue.default.prototype.$isServer; // eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
|
|
exports.isServer = isServer;
|
|
|
|
function noop() {}
|
|
|
|
function isDef(val) {
|
|
return val !== undefined && val !== null;
|
|
}
|
|
|
|
function isFunction(val) {
|
|
return typeof val === 'function';
|
|
}
|
|
|
|
function isObject(val) {
|
|
return val !== null && typeof val === 'object';
|
|
}
|
|
|
|
function isPromise(val) {
|
|
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
}
|
|
|
|
function get(object, path) {
|
|
var keys = path.split('.');
|
|
var result = object;
|
|
keys.forEach(function (key) {
|
|
var _result$key;
|
|
|
|
result = (_result$key = result[key]) != null ? _result$key : '';
|
|
});
|
|
return result;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 1:
|
|
/***/ (function(module, exports) {
|
|
|
|
function _interopRequireDefault(obj) {
|
|
return obj && obj.__esModule ? obj : {
|
|
"default": obj
|
|
};
|
|
}
|
|
|
|
module.exports = _interopRequireDefault;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 11:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var _interopRequireDefault = __webpack_require__(1);
|
|
|
|
exports.__esModule = true;
|
|
exports.default = void 0;
|
|
|
|
var _vue = _interopRequireDefault(__webpack_require__(4));
|
|
|
|
var _deepAssign = __webpack_require__(21);
|
|
|
|
var _zhCN = _interopRequireDefault(__webpack_require__(27));
|
|
|
|
var proto = _vue.default.prototype;
|
|
var defineReactive = _vue.default.util.defineReactive;
|
|
defineReactive(proto, '$vantLang', 'zh-CN');
|
|
defineReactive(proto, '$vantMessages', {
|
|
'zh-CN': _zhCN.default
|
|
});
|
|
var _default = {
|
|
messages: function messages() {
|
|
return proto.$vantMessages[proto.$vantLang];
|
|
},
|
|
use: function use(lang, messages) {
|
|
var _this$add;
|
|
|
|
proto.$vantLang = lang;
|
|
this.add((_this$add = {}, _this$add[lang] = messages, _this$add));
|
|
},
|
|
add: function add(messages) {
|
|
if (messages === void 0) {
|
|
messages = {};
|
|
}
|
|
|
|
(0, _deepAssign.deepAssign)(proto.$vantMessages, messages);
|
|
}
|
|
};
|
|
exports.default = _default;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 12:
|
|
/***/ (function(module, exports) {
|
|
|
|
|
|
/**
|
|
* When source maps are enabled, `style-loader` uses a link element with a data-uri to
|
|
* embed the css on the page. This breaks all relative urls because now they are relative to a
|
|
* bundle instead of the current page.
|
|
*
|
|
* One solution is to only use full urls, but that may be impossible.
|
|
*
|
|
* Instead, this function "fixes" the relative urls to be absolute according to the current page location.
|
|
*
|
|
* A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
|
|
*
|
|
*/
|
|
|
|
module.exports = function (css) {
|
|
// get current location
|
|
var location = typeof window !== "undefined" && window.location;
|
|
|
|
if (!location) {
|
|
throw new Error("fixUrls requires window.location");
|
|
}
|
|
|
|
// blank or null?
|
|
if (!css || typeof css !== "string") {
|
|
return css;
|
|
}
|
|
|
|
var baseUrl = location.protocol + "//" + location.host;
|
|
var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
|
|
|
|
// convert each url(...)
|
|
/*
|
|
This regular expression is just a way to recursively match brackets within
|
|
a string.
|
|
|
|
/url\s*\( = Match on the word "url" with any whitespace after it and then a parens
|
|
( = Start a capturing group
|
|
(?: = Start a non-capturing group
|
|
[^)(] = Match anything that isn't a parentheses
|
|
| = OR
|
|
\( = Match a start parentheses
|
|
(?: = Start another non-capturing groups
|
|
[^)(]+ = Match anything that isn't a parentheses
|
|
| = OR
|
|
\( = Match a start parentheses
|
|
[^)(]* = Match anything that isn't a parentheses
|
|
\) = Match a end parentheses
|
|
) = End Group
|
|
*\) = Match anything and then a close parens
|
|
) = Close non-capturing group
|
|
* = Match anything
|
|
) = Close capturing group
|
|
\) = Match a close parens
|
|
|
|
/gi = Get all matches, not the first. Be case insensitive.
|
|
*/
|
|
var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
|
|
// strip quotes (if they exist)
|
|
var unquotedOrigUrl = origUrl
|
|
.trim()
|
|
.replace(/^"(.*)"$/, function(o, $1){ return $1; })
|
|
.replace(/^'(.*)'$/, function(o, $1){ return $1; });
|
|
|
|
// already a full url? no change
|
|
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
|
|
return fullMatch;
|
|
}
|
|
|
|
// convert the url to a full url
|
|
var newUrl;
|
|
|
|
if (unquotedOrigUrl.indexOf("//") === 0) {
|
|
//TODO: should we add protocol?
|
|
newUrl = unquotedOrigUrl;
|
|
} else if (unquotedOrigUrl.indexOf("/") === 0) {
|
|
// path should be relative to the base url
|
|
newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
|
|
} else {
|
|
// path should be relative to current directory
|
|
newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
|
|
}
|
|
|
|
// send back the fixed url(...)
|
|
return "url(" + JSON.stringify(newUrl) + ")";
|
|
});
|
|
|
|
// send back the fixed css
|
|
return fixedCss;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 125:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.deepClone = deepClone;
|
|
|
|
var _deepAssign = __webpack_require__(21);
|
|
|
|
function deepClone(obj) {
|
|
if (Array.isArray(obj)) {
|
|
return obj.map(function (item) {
|
|
return deepClone(item);
|
|
});
|
|
}
|
|
|
|
if (typeof obj === 'object') {
|
|
return (0, _deepAssign.deepAssign)({}, obj);
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 14:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var _interopRequireDefault = __webpack_require__(1);
|
|
|
|
exports.__esModule = true;
|
|
exports.inherit = inherit;
|
|
exports.emit = emit;
|
|
exports.mount = mount;
|
|
|
|
var _extends2 = _interopRequireDefault(__webpack_require__(18));
|
|
|
|
var _vue = _interopRequireDefault(__webpack_require__(4));
|
|
|
|
var inheritKey = ['ref', 'style', 'class', 'attrs', 'refInFor', 'nativeOn', 'directives', 'staticClass', 'staticStyle'];
|
|
var mapInheritKey = {
|
|
nativeOn: 'on'
|
|
}; // inherit partial context, map nativeOn to on
|
|
|
|
function inherit(context, inheritListeners) {
|
|
var result = inheritKey.reduce(function (obj, key) {
|
|
if (context.data[key]) {
|
|
obj[mapInheritKey[key] || key] = context.data[key];
|
|
}
|
|
|
|
return obj;
|
|
}, {});
|
|
|
|
if (inheritListeners) {
|
|
result.on = result.on || {};
|
|
(0, _extends2.default)(result.on, context.data.on);
|
|
}
|
|
|
|
return result;
|
|
} // emit event
|
|
|
|
|
|
function emit(context, eventName) {
|
|
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
args[_key - 2] = arguments[_key];
|
|
}
|
|
|
|
var listeners = context.listeners[eventName];
|
|
|
|
if (listeners) {
|
|
if (Array.isArray(listeners)) {
|
|
listeners.forEach(function (listener) {
|
|
listener.apply(void 0, args);
|
|
});
|
|
} else {
|
|
listeners.apply(void 0, args);
|
|
}
|
|
}
|
|
} // mount functional component
|
|
|
|
|
|
function mount(Component, data) {
|
|
var instance = new _vue.default({
|
|
el: document.createElement('div'),
|
|
props: Component.props,
|
|
render: function render(h) {
|
|
return h(Component, (0, _extends2.default)({
|
|
props: this.$props
|
|
}, data));
|
|
}
|
|
});
|
|
document.body.appendChild(instance.$el);
|
|
return instance;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 141:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var _interopRequireDefault = __webpack_require__(1);
|
|
|
|
exports.__esModule = true;
|
|
exports.default = void 0;
|
|
|
|
var _extends2 = _interopRequireDefault(__webpack_require__(18));
|
|
|
|
var _utils = __webpack_require__(0);
|
|
|
|
var _event = __webpack_require__(30);
|
|
|
|
var _constant = __webpack_require__(63);
|
|
|
|
var _shared = __webpack_require__(147);
|
|
|
|
var _unit = __webpack_require__(20);
|
|
|
|
var _loading = _interopRequireDefault(__webpack_require__(71));
|
|
|
|
var _PickerColumn = _interopRequireDefault(__webpack_require__(180));
|
|
|
|
// Utils
|
|
// Components
|
|
var _createNamespace = (0, _utils.createNamespace)('picker'),
|
|
createComponent = _createNamespace[0],
|
|
bem = _createNamespace[1],
|
|
t = _createNamespace[2];
|
|
|
|
var _default2 = createComponent({
|
|
props: (0, _extends2.default)({}, _shared.pickerProps, {
|
|
defaultIndex: {
|
|
type: [Number, String],
|
|
default: 0
|
|
},
|
|
columns: {
|
|
type: Array,
|
|
default: function _default() {
|
|
return [];
|
|
}
|
|
},
|
|
toolbarPosition: {
|
|
type: String,
|
|
default: 'top'
|
|
},
|
|
valueKey: {
|
|
type: String,
|
|
default: 'text'
|
|
}
|
|
}),
|
|
data: function data() {
|
|
return {
|
|
children: [],
|
|
formattedColumns: []
|
|
};
|
|
},
|
|
computed: {
|
|
itemPxHeight: function itemPxHeight() {
|
|
return this.itemHeight ? (0, _unit.unitToPx)(this.itemHeight) : _shared.DEFAULT_ITEM_HEIGHT;
|
|
},
|
|
dataType: function dataType() {
|
|
var columns = this.columns;
|
|
var firstColumn = columns[0] || {};
|
|
|
|
if (firstColumn.children) {
|
|
return 'cascade';
|
|
}
|
|
|
|
if (firstColumn.values) {
|
|
return 'object';
|
|
}
|
|
|
|
return 'text';
|
|
}
|
|
},
|
|
watch: {
|
|
columns: {
|
|
handler: 'format',
|
|
immediate: true
|
|
}
|
|
},
|
|
methods: {
|
|
format: function format() {
|
|
var columns = this.columns,
|
|
dataType = this.dataType;
|
|
|
|
if (dataType === 'text') {
|
|
this.formattedColumns = [{
|
|
values: columns
|
|
}];
|
|
} else if (dataType === 'cascade') {
|
|
this.formatCascade();
|
|
} else {
|
|
this.formattedColumns = columns;
|
|
}
|
|
},
|
|
formatCascade: function formatCascade() {
|
|
var formatted = [];
|
|
var cursor = {
|
|
children: this.columns
|
|
};
|
|
|
|
while (cursor && cursor.children) {
|
|
var _cursor$defaultIndex;
|
|
|
|
var _cursor = cursor,
|
|
children = _cursor.children;
|
|
var defaultIndex = (_cursor$defaultIndex = cursor.defaultIndex) != null ? _cursor$defaultIndex : +this.defaultIndex;
|
|
|
|
while (children[defaultIndex] && children[defaultIndex].disabled) {
|
|
if (defaultIndex < children.length - 1) {
|
|
defaultIndex++;
|
|
} else {
|
|
defaultIndex = 0;
|
|
break;
|
|
}
|
|
}
|
|
|
|
formatted.push({
|
|
values: cursor.children,
|
|
className: cursor.className,
|
|
defaultIndex: defaultIndex
|
|
});
|
|
cursor = children[defaultIndex];
|
|
}
|
|
|
|
this.formattedColumns = formatted;
|
|
},
|
|
emit: function emit(event) {
|
|
var _this = this;
|
|
|
|
if (this.dataType === 'text') {
|
|
this.$emit(event, this.getColumnValue(0), this.getColumnIndex(0));
|
|
} else {
|
|
var values = this.getValues(); // compatible with old version of wrong parameters
|
|
// should be removed in next major version
|
|
// see: https://github.com/youzan/vant/issues/5905
|
|
|
|
if (this.dataType === 'cascade') {
|
|
values = values.map(function (item) {
|
|
return item[_this.valueKey];
|
|
});
|
|
}
|
|
|
|
this.$emit(event, values, this.getIndexes());
|
|
}
|
|
},
|
|
onCascadeChange: function onCascadeChange(columnIndex) {
|
|
var cursor = {
|
|
children: this.columns
|
|
};
|
|
var indexes = this.getIndexes();
|
|
|
|
for (var i = 0; i <= columnIndex; i++) {
|
|
cursor = cursor.children[indexes[i]];
|
|
}
|
|
|
|
while (cursor && cursor.children) {
|
|
columnIndex++;
|
|
this.setColumnValues(columnIndex, cursor.children);
|
|
cursor = cursor.children[cursor.defaultIndex || 0];
|
|
}
|
|
},
|
|
onChange: function onChange(columnIndex) {
|
|
var _this2 = this;
|
|
|
|
if (this.dataType === 'cascade') {
|
|
this.onCascadeChange(columnIndex);
|
|
}
|
|
|
|
if (this.dataType === 'text') {
|
|
this.$emit('change', this, this.getColumnValue(0), this.getColumnIndex(0));
|
|
} else {
|
|
var values = this.getValues(); // compatible with old version of wrong parameters
|
|
// should be removed in next major version
|
|
// see: https://github.com/youzan/vant/issues/5905
|
|
|
|
if (this.dataType === 'cascade') {
|
|
values = values.map(function (item) {
|
|
return item[_this2.valueKey];
|
|
});
|
|
}
|
|
|
|
this.$emit('change', this, values, columnIndex);
|
|
}
|
|
},
|
|
// get column instance by index
|
|
getColumn: function getColumn(index) {
|
|
return this.children[index];
|
|
},
|
|
// @exposed-api
|
|
// get column value by index
|
|
getColumnValue: function getColumnValue(index) {
|
|
var column = this.getColumn(index);
|
|
return column && column.getValue();
|
|
},
|
|
// @exposed-api
|
|
// set column value by index
|
|
setColumnValue: function setColumnValue(index, value) {
|
|
var column = this.getColumn(index);
|
|
|
|
if (column) {
|
|
column.setValue(value);
|
|
|
|
if (this.dataType === 'cascade') {
|
|
this.onCascadeChange(index);
|
|
}
|
|
}
|
|
},
|
|
// @exposed-api
|
|
// get column option index by column index
|
|
getColumnIndex: function getColumnIndex(columnIndex) {
|
|
return (this.getColumn(columnIndex) || {}).currentIndex;
|
|
},
|
|
// @exposed-api
|
|
// set column option index by column index
|
|
setColumnIndex: function setColumnIndex(columnIndex, optionIndex) {
|
|
var column = this.getColumn(columnIndex);
|
|
|
|
if (column) {
|
|
column.setIndex(optionIndex);
|
|
|
|
if (this.dataType === 'cascade') {
|
|
this.onCascadeChange(columnIndex);
|
|
}
|
|
}
|
|
},
|
|
// @exposed-api
|
|
// get options of column by index
|
|
getColumnValues: function getColumnValues(index) {
|
|
return (this.children[index] || {}).options;
|
|
},
|
|
// @exposed-api
|
|
// set options of column by index
|
|
setColumnValues: function setColumnValues(index, options) {
|
|
var column = this.children[index];
|
|
|
|
if (column) {
|
|
column.setOptions(options);
|
|
}
|
|
},
|
|
// @exposed-api
|
|
// get values of all columns
|
|
getValues: function getValues() {
|
|
return this.children.map(function (child) {
|
|
return child.getValue();
|
|
});
|
|
},
|
|
// @exposed-api
|
|
// set values of all columns
|
|
setValues: function setValues(values) {
|
|
var _this3 = this;
|
|
|
|
values.forEach(function (value, index) {
|
|
_this3.setColumnValue(index, value);
|
|
});
|
|
},
|
|
// @exposed-api
|
|
// get indexes of all columns
|
|
getIndexes: function getIndexes() {
|
|
return this.children.map(function (child) {
|
|
return child.currentIndex;
|
|
});
|
|
},
|
|
// @exposed-api
|
|
// set indexes of all columns
|
|
setIndexes: function setIndexes(indexes) {
|
|
var _this4 = this;
|
|
|
|
indexes.forEach(function (optionIndex, columnIndex) {
|
|
_this4.setColumnIndex(columnIndex, optionIndex);
|
|
});
|
|
},
|
|
// @exposed-api
|
|
confirm: function confirm() {
|
|
this.children.forEach(function (child) {
|
|
return child.stopMomentum();
|
|
});
|
|
this.emit('confirm');
|
|
},
|
|
cancel: function cancel() {
|
|
this.emit('cancel');
|
|
},
|
|
genTitle: function genTitle() {
|
|
var h = this.$createElement;
|
|
var titleSlot = this.slots('title');
|
|
|
|
if (titleSlot) {
|
|
return titleSlot;
|
|
}
|
|
|
|
if (this.title) {
|
|
return h("div", {
|
|
"class": ['van-ellipsis', bem('title')]
|
|
}, [this.title]);
|
|
}
|
|
},
|
|
genCancel: function genCancel() {
|
|
var h = this.$createElement;
|
|
return h("button", {
|
|
"attrs": {
|
|
"type": "button"
|
|
},
|
|
"class": bem('cancel'),
|
|
"on": {
|
|
"click": this.cancel
|
|
}
|
|
}, [this.slots('cancel') || this.cancelButtonText || t('cancel')]);
|
|
},
|
|
genConfirm: function genConfirm() {
|
|
var h = this.$createElement;
|
|
return h("button", {
|
|
"attrs": {
|
|
"type": "button"
|
|
},
|
|
"class": bem('confirm'),
|
|
"on": {
|
|
"click": this.confirm
|
|
}
|
|
}, [this.slots('confirm') || this.confirmButtonText || t('confirm')]);
|
|
},
|
|
genToolbar: function genToolbar() {
|
|
var h = this.$createElement;
|
|
|
|
if (this.showToolbar) {
|
|
return h("div", {
|
|
"class": bem('toolbar')
|
|
}, [this.slots() || [this.genCancel(), this.genTitle(), this.genConfirm()]]);
|
|
}
|
|
},
|
|
genColumns: function genColumns() {
|
|
var h = this.$createElement;
|
|
var itemPxHeight = this.itemPxHeight;
|
|
var wrapHeight = itemPxHeight * this.visibleItemCount;
|
|
var frameStyle = {
|
|
height: itemPxHeight + "px"
|
|
};
|
|
var columnsStyle = {
|
|
height: wrapHeight + "px"
|
|
};
|
|
var maskStyle = {
|
|
backgroundSize: "100% " + (wrapHeight - itemPxHeight) / 2 + "px"
|
|
};
|
|
return h("div", {
|
|
"class": bem('columns'),
|
|
"style": columnsStyle,
|
|
"on": {
|
|
"touchmove": _event.preventDefault
|
|
}
|
|
}, [this.genColumnItems(), h("div", {
|
|
"class": bem('mask'),
|
|
"style": maskStyle
|
|
}), h("div", {
|
|
"class": [_constant.BORDER_UNSET_TOP_BOTTOM, bem('frame')],
|
|
"style": frameStyle
|
|
})]);
|
|
},
|
|
genColumnItems: function genColumnItems() {
|
|
var _this5 = this;
|
|
|
|
var h = this.$createElement;
|
|
return this.formattedColumns.map(function (item, columnIndex) {
|
|
var _item$defaultIndex;
|
|
|
|
return h(_PickerColumn.default, {
|
|
"attrs": {
|
|
"readonly": _this5.readonly,
|
|
"valueKey": _this5.valueKey,
|
|
"allowHtml": _this5.allowHtml,
|
|
"className": item.className,
|
|
"itemHeight": _this5.itemPxHeight,
|
|
"defaultIndex": (_item$defaultIndex = item.defaultIndex) != null ? _item$defaultIndex : +_this5.defaultIndex,
|
|
"swipeDuration": _this5.swipeDuration,
|
|
"visibleItemCount": _this5.visibleItemCount,
|
|
"initialOptions": item.values
|
|
},
|
|
"scopedSlots": {
|
|
option: _this5.$scopedSlots.option
|
|
},
|
|
"on": {
|
|
"change": function change() {
|
|
_this5.onChange(columnIndex);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
},
|
|
render: function render(h) {
|
|
return h("div", {
|
|
"class": bem()
|
|
}, [this.toolbarPosition === 'top' ? this.genToolbar() : h(), this.loading ? h(_loading.default, {
|
|
"class": bem('loading')
|
|
}) : h(), this.slots('columns-top'), this.genColumns(), this.slots('columns-bottom'), this.toolbarPosition === 'bottom' ? this.genToolbar() : h()]);
|
|
}
|
|
});
|
|
|
|
exports.default = _default2;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 147:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.pickerProps = exports.DEFAULT_ITEM_HEIGHT = void 0;
|
|
var DEFAULT_ITEM_HEIGHT = 44;
|
|
exports.DEFAULT_ITEM_HEIGHT = DEFAULT_ITEM_HEIGHT;
|
|
var pickerProps = {
|
|
title: String,
|
|
loading: Boolean,
|
|
readonly: Boolean,
|
|
itemHeight: [Number, String],
|
|
showToolbar: Boolean,
|
|
cancelButtonText: String,
|
|
confirmButtonText: String,
|
|
allowHtml: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
visibleItemCount: {
|
|
type: [Number, String],
|
|
default: 6
|
|
},
|
|
swipeDuration: {
|
|
type: [Number, String],
|
|
default: 1000
|
|
}
|
|
};
|
|
exports.pickerProps = pickerProps;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 16:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var normalMerge=["attrs","props","domProps"],toArrayMerge=["class","style","directives"],functionalMerge=["on","nativeOn"],mergeJsxProps=function(a){return a.reduce(function(c,a){for(var b in a)if(!c[b])c[b]=a[b];else if(-1!==normalMerge.indexOf(b))c[b]=_extends({},c[b],a[b]);else if(-1!==toArrayMerge.indexOf(b)){var d=c[b]instanceof Array?c[b]:[c[b]],e=a[b]instanceof Array?a[b]:[a[b]];c[b]=d.concat(e)}else if(-1!==functionalMerge.indexOf(b)){for(var f in a[b])if(c[b][f]){var g=c[b][f]instanceof Array?c[b][f]:[c[b][f]],h=a[b][f]instanceof Array?a[b][f]:[a[b][f]];c[b][f]=g.concat(h)}else c[b][f]=a[b][f];}else if("hook"==b)for(var i in a[b])c[b][i]=c[b][i]?mergeFn(c[b][i],a[b][i]):a[b][i];else c[b]=a[b];return c},{})},mergeFn=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments)}};module.exports=mergeJsxProps;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 178:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
var content = __webpack_require__(179);
|
|
|
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
|
|
var transform;
|
|
var insertInto;
|
|
|
|
|
|
|
|
var options = {"hmr":true}
|
|
|
|
options.transform = transform
|
|
options.insertInto = undefined;
|
|
|
|
var update = __webpack_require__(6)(content, options);
|
|
|
|
if(content.locals) module.exports = content.locals;
|
|
|
|
if(false) {}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 179:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
exports = module.exports = __webpack_require__(5)(false);
|
|
// Module
|
|
exports.push([module.i, ".van-picker{position:relative;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{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:44px}.van-picker__cancel,.van-picker__confirm{height:100%;padding:0 16px;font-size:14px;background-color:transparent;border:none;cursor:pointer}.van-picker__cancel:active,.van-picker__confirm:active{opacity:.7}.van-picker__confirm{color:#576b95}.van-picker__cancel{color:#969799}.van-picker__title{max-width:50%;font-weight:500;font-size:16px;line-height:20px;text-align:center}.van-picker__columns{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;cursor:grab}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;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;color:#2cb8b8;background-color:rgba(255,255,255,.9)}.van-picker__frame{position:absolute;top:50%;right:16px;left:16px;z-index:2;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.van-picker__mask{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-image:-webkit-linear-gradient(top,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),-webkit-linear-gradient(bottom,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-image:linear-gradient(180deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),linear-gradient(0deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-repeat:no-repeat;background-position:top,bottom;-webkit-transform:translateZ(0);transform:translateZ(0);pointer-events:none}.van-picker-column{-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:hidden;font-size:16px}.van-picker-column__wrapper{-webkit-transition-timing-function:cubic-bezier(.23,1,.68,1);transition-timing-function:cubic-bezier(.23,1,.68,1)}.van-picker-column__item{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;padding:0 4px;color:#000}.van-picker-column__item--disabled{cursor:not-allowed;opacity:.3}", ""]);
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 18:
|
|
/***/ (function(module, exports) {
|
|
|
|
function _extends() {
|
|
module.exports = _extends = Object.assign || function (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
|
|
for (var key in source) {
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
|
|
return _extends.apply(this, arguments);
|
|
}
|
|
|
|
module.exports = _extends;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 180:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var _interopRequireDefault = __webpack_require__(1);
|
|
|
|
exports.__esModule = true;
|
|
exports.default = void 0;
|
|
|
|
var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
|
|
|
|
var _deepClone = __webpack_require__(125);
|
|
|
|
var _utils = __webpack_require__(0);
|
|
|
|
var _number = __webpack_require__(81);
|
|
|
|
var _event = __webpack_require__(30);
|
|
|
|
var _touch = __webpack_require__(51);
|
|
|
|
var DEFAULT_DURATION = 200; // 惯性滑动思路:
|
|
// 在手指离开屏幕时,如果和上一次 move 时的间隔小于 `MOMENTUM_LIMIT_TIME` 且 move
|
|
// 距离大于 `MOMENTUM_LIMIT_DISTANCE` 时,执行惯性滑动
|
|
|
|
var MOMENTUM_LIMIT_TIME = 300;
|
|
var MOMENTUM_LIMIT_DISTANCE = 15;
|
|
|
|
var _createNamespace = (0, _utils.createNamespace)('picker-column'),
|
|
createComponent = _createNamespace[0],
|
|
bem = _createNamespace[1];
|
|
|
|
function getElementTranslateY(element) {
|
|
var style = window.getComputedStyle(element);
|
|
var transform = style.transform || style.webkitTransform;
|
|
var translateY = transform.slice(7, transform.length - 1).split(', ')[5];
|
|
return Number(translateY);
|
|
}
|
|
|
|
function isOptionDisabled(option) {
|
|
return (0, _utils.isObject)(option) && option.disabled;
|
|
}
|
|
|
|
var _default2 = createComponent({
|
|
mixins: [_touch.TouchMixin],
|
|
props: {
|
|
valueKey: String,
|
|
readonly: Boolean,
|
|
allowHtml: Boolean,
|
|
className: String,
|
|
itemHeight: Number,
|
|
defaultIndex: Number,
|
|
swipeDuration: [Number, String],
|
|
visibleItemCount: [Number, String],
|
|
initialOptions: {
|
|
type: Array,
|
|
default: function _default() {
|
|
return [];
|
|
}
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
offset: 0,
|
|
duration: 0,
|
|
options: (0, _deepClone.deepClone)(this.initialOptions),
|
|
currentIndex: this.defaultIndex
|
|
};
|
|
},
|
|
created: function created() {
|
|
if (this.$parent.children) {
|
|
this.$parent.children.push(this);
|
|
}
|
|
|
|
this.setIndex(this.currentIndex);
|
|
},
|
|
mounted: function mounted() {
|
|
this.bindTouchEvent(this.$el);
|
|
},
|
|
destroyed: function destroyed() {
|
|
var children = this.$parent.children;
|
|
|
|
if (children) {
|
|
children.splice(children.indexOf(this), 1);
|
|
}
|
|
},
|
|
watch: {
|
|
initialOptions: 'setOptions',
|
|
defaultIndex: function defaultIndex(val) {
|
|
this.setIndex(val);
|
|
}
|
|
},
|
|
computed: {
|
|
count: function count() {
|
|
return this.options.length;
|
|
},
|
|
baseOffset: function baseOffset() {
|
|
return this.itemHeight * (this.visibleItemCount - 1) / 2;
|
|
}
|
|
},
|
|
methods: {
|
|
setOptions: function setOptions(options) {
|
|
if (JSON.stringify(options) !== JSON.stringify(this.options)) {
|
|
this.options = (0, _deepClone.deepClone)(options);
|
|
this.setIndex(this.defaultIndex);
|
|
}
|
|
},
|
|
onTouchStart: function onTouchStart(event) {
|
|
if (this.readonly) {
|
|
return;
|
|
}
|
|
|
|
this.touchStart(event);
|
|
|
|
if (this.moving) {
|
|
var translateY = getElementTranslateY(this.$refs.wrapper);
|
|
this.offset = Math.min(0, translateY - this.baseOffset);
|
|
this.startOffset = this.offset;
|
|
} else {
|
|
this.startOffset = this.offset;
|
|
}
|
|
|
|
this.duration = 0;
|
|
this.transitionEndTrigger = null;
|
|
this.touchStartTime = Date.now();
|
|
this.momentumOffset = this.startOffset;
|
|
},
|
|
onTouchMove: function onTouchMove(event) {
|
|
if (this.readonly) {
|
|
return;
|
|
}
|
|
|
|
this.touchMove(event);
|
|
|
|
if (this.direction === 'vertical') {
|
|
this.moving = true;
|
|
(0, _event.preventDefault)(event, true);
|
|
}
|
|
|
|
this.offset = (0, _number.range)(this.startOffset + this.deltaY, -(this.count * this.itemHeight), this.itemHeight);
|
|
var now = Date.now();
|
|
|
|
if (now - this.touchStartTime > MOMENTUM_LIMIT_TIME) {
|
|
this.touchStartTime = now;
|
|
this.momentumOffset = this.offset;
|
|
}
|
|
},
|
|
onTouchEnd: function onTouchEnd() {
|
|
var _this = this;
|
|
|
|
if (this.readonly) {
|
|
return;
|
|
}
|
|
|
|
var distance = this.offset - this.momentumOffset;
|
|
var duration = Date.now() - this.touchStartTime;
|
|
var allowMomentum = duration < MOMENTUM_LIMIT_TIME && Math.abs(distance) > MOMENTUM_LIMIT_DISTANCE;
|
|
|
|
if (allowMomentum) {
|
|
this.momentum(distance, duration);
|
|
return;
|
|
}
|
|
|
|
var index = this.getIndexByOffset(this.offset);
|
|
this.duration = DEFAULT_DURATION;
|
|
this.setIndex(index, true); // compatible with desktop scenario
|
|
// use setTimeout to skip the click event Emitted after touchstart
|
|
|
|
setTimeout(function () {
|
|
_this.moving = false;
|
|
}, 0);
|
|
},
|
|
onTransitionEnd: function onTransitionEnd() {
|
|
this.stopMomentum();
|
|
},
|
|
onClickItem: function onClickItem(index) {
|
|
if (this.moving || this.readonly) {
|
|
return;
|
|
}
|
|
|
|
this.transitionEndTrigger = null;
|
|
this.duration = DEFAULT_DURATION;
|
|
this.setIndex(index, true);
|
|
},
|
|
adjustIndex: function adjustIndex(index) {
|
|
index = (0, _number.range)(index, 0, this.count);
|
|
|
|
for (var i = index; i < this.count; i++) {
|
|
if (!isOptionDisabled(this.options[i])) return i;
|
|
}
|
|
|
|
for (var _i = index - 1; _i >= 0; _i--) {
|
|
if (!isOptionDisabled(this.options[_i])) return _i;
|
|
}
|
|
},
|
|
getOptionText: function getOptionText(option) {
|
|
if ((0, _utils.isObject)(option) && this.valueKey in option) {
|
|
return option[this.valueKey];
|
|
}
|
|
|
|
return option;
|
|
},
|
|
setIndex: function setIndex(index, emitChange) {
|
|
var _this2 = this;
|
|
|
|
index = this.adjustIndex(index) || 0;
|
|
var offset = -index * this.itemHeight;
|
|
|
|
var trigger = function trigger() {
|
|
if (index !== _this2.currentIndex) {
|
|
_this2.currentIndex = index;
|
|
|
|
if (emitChange) {
|
|
_this2.$emit('change', index);
|
|
}
|
|
}
|
|
}; // trigger the change event after transitionend when moving
|
|
|
|
|
|
if (this.moving && offset !== this.offset) {
|
|
this.transitionEndTrigger = trigger;
|
|
} else {
|
|
trigger();
|
|
}
|
|
|
|
this.offset = offset;
|
|
},
|
|
setValue: function setValue(value) {
|
|
var options = this.options;
|
|
|
|
for (var i = 0; i < options.length; i++) {
|
|
if (this.getOptionText(options[i]) === value) {
|
|
return this.setIndex(i);
|
|
}
|
|
}
|
|
},
|
|
getValue: function getValue() {
|
|
return this.options[this.currentIndex];
|
|
},
|
|
getIndexByOffset: function getIndexByOffset(offset) {
|
|
return (0, _number.range)(Math.round(-offset / this.itemHeight), 0, this.count - 1);
|
|
},
|
|
momentum: function momentum(distance, duration) {
|
|
var speed = Math.abs(distance / duration);
|
|
distance = this.offset + speed / 0.003 * (distance < 0 ? -1 : 1);
|
|
var index = this.getIndexByOffset(distance);
|
|
this.duration = +this.swipeDuration;
|
|
this.setIndex(index, true);
|
|
},
|
|
stopMomentum: function stopMomentum() {
|
|
this.moving = false;
|
|
this.duration = 0;
|
|
|
|
if (this.transitionEndTrigger) {
|
|
this.transitionEndTrigger();
|
|
this.transitionEndTrigger = null;
|
|
}
|
|
},
|
|
genOptions: function genOptions() {
|
|
var _this3 = this;
|
|
|
|
var h = this.$createElement;
|
|
var optionStyle = {
|
|
height: this.itemHeight + "px"
|
|
};
|
|
return this.options.map(function (option, index) {
|
|
var _domProps;
|
|
|
|
var text = _this3.getOptionText(option);
|
|
|
|
var disabled = isOptionDisabled(option);
|
|
var data = {
|
|
style: optionStyle,
|
|
attrs: {
|
|
role: 'button',
|
|
tabindex: disabled ? -1 : 0
|
|
},
|
|
class: [bem('item', {
|
|
disabled: disabled,
|
|
selected: index === _this3.currentIndex
|
|
})],
|
|
on: {
|
|
click: function click() {
|
|
_this3.onClickItem(index);
|
|
}
|
|
}
|
|
};
|
|
var childData = {
|
|
class: 'van-ellipsis',
|
|
domProps: (_domProps = {}, _domProps[_this3.allowHtml ? 'innerHTML' : 'textContent'] = text, _domProps)
|
|
};
|
|
return h("li", (0, _babelHelperVueJsxMergeProps.default)([{}, data]), [_this3.slots('option', option) || h("div", (0, _babelHelperVueJsxMergeProps.default)([{}, childData]))]);
|
|
});
|
|
}
|
|
},
|
|
render: function render() {
|
|
var h = arguments[0];
|
|
var wrapperStyle = {
|
|
transform: "translate3d(0, " + (this.offset + this.baseOffset) + "px, 0)",
|
|
transitionDuration: this.duration + "ms",
|
|
transitionProperty: this.duration ? 'all' : 'none'
|
|
};
|
|
return h("div", {
|
|
"class": [bem(), this.className]
|
|
}, [h("ul", {
|
|
"ref": "wrapper",
|
|
"style": wrapperStyle,
|
|
"class": bem('wrapper'),
|
|
"on": {
|
|
"transitionend": this.onTransitionEnd
|
|
}
|
|
}, [this.genOptions()])]);
|
|
}
|
|
});
|
|
|
|
exports.default = _default2;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 19:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.isNumeric = isNumeric;
|
|
exports.isNaN = isNaN;
|
|
|
|
function isNumeric(val) {
|
|
return /^\d+(\.\d+)?$/.test(val);
|
|
}
|
|
|
|
function isNaN(val) {
|
|
if (Number.isNaN) {
|
|
return Number.isNaN(val);
|
|
} // eslint-disable-next-line no-self-compare
|
|
|
|
|
|
return val !== val;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 20:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.addUnit = addUnit;
|
|
exports.unitToPx = unitToPx;
|
|
|
|
var _ = __webpack_require__(0);
|
|
|
|
var _number = __webpack_require__(19);
|
|
|
|
function addUnit(value) {
|
|
if (!(0, _.isDef)(value)) {
|
|
return undefined;
|
|
}
|
|
|
|
value = String(value);
|
|
return (0, _number.isNumeric)(value) ? value + "px" : value;
|
|
} // cache
|
|
|
|
|
|
var rootFontSize;
|
|
|
|
function getRootFontSize() {
|
|
if (!rootFontSize) {
|
|
var doc = document.documentElement;
|
|
var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
|
|
rootFontSize = parseFloat(fontSize);
|
|
}
|
|
|
|
return rootFontSize;
|
|
}
|
|
|
|
function convertRem(value) {
|
|
value = value.replace(/rem/g, '');
|
|
return +value * getRootFontSize();
|
|
}
|
|
|
|
function convertVw(value) {
|
|
value = value.replace(/vw/g, '');
|
|
return +value * window.innerWidth / 100;
|
|
}
|
|
|
|
function convertVh(value) {
|
|
value = value.replace(/vh/g, '');
|
|
return +value * window.innerHeight / 100;
|
|
}
|
|
|
|
function unitToPx(value) {
|
|
if (typeof value === 'number') {
|
|
return value;
|
|
}
|
|
|
|
if (_.inBrowser) {
|
|
if (value.indexOf('rem') !== -1) {
|
|
return convertRem(value);
|
|
}
|
|
|
|
if (value.indexOf('vw') !== -1) {
|
|
return convertVw(value);
|
|
}
|
|
|
|
if (value.indexOf('vh') !== -1) {
|
|
return convertVh(value);
|
|
}
|
|
}
|
|
|
|
return parseFloat(value);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 21:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.deepAssign = deepAssign;
|
|
|
|
var _ = __webpack_require__(0);
|
|
|
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
|
|
function assignKey(to, from, key) {
|
|
var val = from[key];
|
|
|
|
if (!(0, _.isDef)(val)) {
|
|
return;
|
|
}
|
|
|
|
if (!hasOwnProperty.call(to, key) || !(0, _.isObject)(val)) {
|
|
to[key] = val;
|
|
} else {
|
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
to[key] = deepAssign(Object(to[key]), from[key]);
|
|
}
|
|
}
|
|
|
|
function deepAssign(to, from) {
|
|
Object.keys(from).forEach(function (key) {
|
|
assignKey(to, from, key);
|
|
});
|
|
return to;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 22:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
var content = __webpack_require__(23);
|
|
|
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
|
|
var transform;
|
|
var insertInto;
|
|
|
|
|
|
|
|
var options = {"hmr":true}
|
|
|
|
options.transform = transform
|
|
options.insertInto = undefined;
|
|
|
|
var update = __webpack_require__(6)(content, options);
|
|
|
|
if(content.locals) module.exports = content.locals;
|
|
|
|
if(false) {}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 23:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
exports = module.exports = __webpack_require__(5)(false);
|
|
// Module
|
|
exports.push([module.i, "html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue',Helvetica,Segoe UI,Arial,Roboto,'PingFang SC',miui,'Hiragino Sans GB','Microsoft Yahei',sans-serif}a{text-decoration:none}button,input,textarea{color:inherit;font:inherit}[class*=van-]:focus,a:focus,button:focus,input:focus,textarea:focus{outline:0}ol,ul{margin:0;padding:0;list-style:none}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-clearfix::after{display:table;clear:both;content:''}[class*=van-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #ebedf0;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--top::after{border-top-width:1px}.van-hairline--left::after{border-left-width:1px}.van-hairline--right::after{border-right-width:1px}.van-hairline--bottom::after{border-bottom-width:1px}.van-hairline--top-bottom::after,.van-hairline-unset--top-bottom::after{border-width:1px 0}.van-hairline--surround::after{border-width:1px}@-webkit-keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-fade-in{from{opacity:0}to{opacity:1}}@keyframes van-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes van-fade-out{from{opacity:1}to{opacity:0}}@keyframes van-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.van-fade-enter-active{-webkit-animation:.3s van-fade-in both ease-out;animation:.3s van-fade-in both ease-out}.van-fade-leave-active{-webkit-animation:.3s van-fade-out both ease-in;animation:.3s van-fade-out both ease-in}.van-slide-up-enter-active{-webkit-animation:van-slide-up-enter .3s both ease-out;animation:van-slide-up-enter .3s both ease-out}.van-slide-up-leave-active{-webkit-animation:van-slide-up-leave .3s both ease-in;animation:van-slide-up-leave .3s both ease-in}.van-slide-down-enter-active{-webkit-animation:van-slide-down-enter .3s both ease-out;animation:van-slide-down-enter .3s both ease-out}.van-slide-down-leave-active{-webkit-animation:van-slide-down-leave .3s both ease-in;animation:van-slide-down-leave .3s both ease-in}.van-slide-left-enter-active{-webkit-animation:van-slide-left-enter .3s both ease-out;animation:van-slide-left-enter .3s both ease-out}.van-slide-left-leave-active{-webkit-animation:van-slide-left-leave .3s both ease-in;animation:van-slide-left-leave .3s both ease-in}.van-slide-right-enter-active{-webkit-animation:van-slide-right-enter .3s both ease-out;animation:van-slide-right-enter .3s both ease-out}.van-slide-right-leave-active{-webkit-animation:van-slide-right-leave .3s both ease-in;animation:van-slide-right-leave .3s both ease-in}", ""]);
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 24:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.createNamespace = createNamespace;
|
|
|
|
var _bem = __webpack_require__(25);
|
|
|
|
var _component = __webpack_require__(26);
|
|
|
|
var _i18n = __webpack_require__(29);
|
|
|
|
function createNamespace(name) {
|
|
name = 'van-' + name;
|
|
return [(0, _component.createComponent)(name), (0, _bem.createBEM)(name), (0, _i18n.createI18N)(name)];
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 25:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.createBEM = createBEM;
|
|
|
|
/**
|
|
* bem helper
|
|
* b() // 'button'
|
|
* b('text') // 'button__text'
|
|
* b({ disabled }) // 'button button--disabled'
|
|
* b('text', { disabled }) // 'button__text button__text--disabled'
|
|
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
|
|
*/
|
|
function gen(name, mods) {
|
|
if (!mods) {
|
|
return '';
|
|
}
|
|
|
|
if (typeof mods === 'string') {
|
|
return " " + name + "--" + mods;
|
|
}
|
|
|
|
if (Array.isArray(mods)) {
|
|
return mods.reduce(function (ret, item) {
|
|
return ret + gen(name, item);
|
|
}, '');
|
|
}
|
|
|
|
return Object.keys(mods).reduce(function (ret, key) {
|
|
return ret + (mods[key] ? gen(name, key) : '');
|
|
}, '');
|
|
}
|
|
|
|
function createBEM(name) {
|
|
return function (el, mods) {
|
|
if (el && typeof el !== 'string') {
|
|
mods = el;
|
|
el = '';
|
|
}
|
|
|
|
el = el ? name + "__" + el : name;
|
|
return "" + el + gen(el, mods);
|
|
};
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 26:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var _interopRequireDefault = __webpack_require__(1);
|
|
|
|
exports.__esModule = true;
|
|
exports.unifySlots = unifySlots;
|
|
exports.createComponent = createComponent;
|
|
|
|
__webpack_require__(11);
|
|
|
|
var _ = __webpack_require__(0);
|
|
|
|
var _string = __webpack_require__(9);
|
|
|
|
var _slots = __webpack_require__(28);
|
|
|
|
var _vue = _interopRequireDefault(__webpack_require__(4));
|
|
|
|
/**
|
|
* Create a basic component with common options
|
|
*/
|
|
function install(Vue) {
|
|
var name = this.name;
|
|
Vue.component(name, this);
|
|
Vue.component((0, _string.camelize)("-" + name), this);
|
|
} // unify slots & scopedSlots
|
|
|
|
|
|
function unifySlots(context) {
|
|
// use data.scopedSlots in lower Vue version
|
|
var scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
|
|
var slots = context.slots();
|
|
Object.keys(slots).forEach(function (key) {
|
|
if (!scopedSlots[key]) {
|
|
scopedSlots[key] = function () {
|
|
return slots[key];
|
|
};
|
|
}
|
|
});
|
|
return scopedSlots;
|
|
} // should be removed after Vue 3
|
|
|
|
|
|
function transformFunctionComponent(pure) {
|
|
return {
|
|
functional: true,
|
|
props: pure.props,
|
|
model: pure.model,
|
|
render: function render(h, context) {
|
|
return pure(h, context.props, unifySlots(context), context);
|
|
}
|
|
};
|
|
}
|
|
|
|
function createComponent(name) {
|
|
return function (sfc) {
|
|
if ((0, _.isFunction)(sfc)) {
|
|
sfc = transformFunctionComponent(sfc);
|
|
}
|
|
|
|
if (!sfc.functional) {
|
|
sfc.mixins = sfc.mixins || [];
|
|
sfc.mixins.push(_slots.SlotsMixin);
|
|
}
|
|
|
|
sfc.name = name;
|
|
sfc.install = install;
|
|
return sfc;
|
|
};
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 27:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.default = void 0;
|
|
var _default = {
|
|
name: '姓名',
|
|
tel: '电话',
|
|
save: '保存',
|
|
confirm: '确认',
|
|
cancel: '取消',
|
|
delete: '删除',
|
|
complete: '完成',
|
|
loading: '加载中...',
|
|
telEmpty: '请填写电话',
|
|
nameEmpty: '请填写姓名',
|
|
nameInvalid: '请输入正确的姓名',
|
|
confirmDelete: '确定要删除吗',
|
|
telInvalid: '请输入正确的手机号',
|
|
vanCalendar: {
|
|
end: '结束',
|
|
start: '开始',
|
|
title: '日期选择',
|
|
confirm: '确定',
|
|
startEnd: '开始/结束',
|
|
weekdays: ['日', '一', '二', '三', '四', '五', '六'],
|
|
monthTitle: function monthTitle(year, month) {
|
|
return year + "\u5E74" + month + "\u6708";
|
|
},
|
|
rangePrompt: function rangePrompt(maxRange) {
|
|
return "\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 " + maxRange + " \u5929";
|
|
}
|
|
},
|
|
vanCascader: {
|
|
select: '请选择'
|
|
},
|
|
vanContactCard: {
|
|
addText: '添加联系人'
|
|
},
|
|
vanContactList: {
|
|
addText: '新建联系人'
|
|
},
|
|
vanPagination: {
|
|
prev: '上一页',
|
|
next: '下一页'
|
|
},
|
|
vanPullRefresh: {
|
|
pulling: '下拉即可刷新...',
|
|
loosing: '释放即可刷新...'
|
|
},
|
|
vanSubmitBar: {
|
|
label: '合计:'
|
|
},
|
|
vanCoupon: {
|
|
unlimited: '无使用门槛',
|
|
discount: function discount(_discount) {
|
|
return _discount + "\u6298";
|
|
},
|
|
condition: function condition(_condition) {
|
|
return "\u6EE1" + _condition + "\u5143\u53EF\u7528";
|
|
}
|
|
},
|
|
vanCouponCell: {
|
|
title: '优惠券',
|
|
tips: '暂无可用',
|
|
count: function count(_count) {
|
|
return _count + "\u5F20\u53EF\u7528";
|
|
}
|
|
},
|
|
vanCouponList: {
|
|
empty: '暂无优惠券',
|
|
exchange: '兑换',
|
|
close: '不使用优惠券',
|
|
enable: '可用',
|
|
disabled: '不可用',
|
|
placeholder: '请输入优惠码'
|
|
},
|
|
vanAddressEdit: {
|
|
area: '地区',
|
|
postal: '邮政编码',
|
|
areaEmpty: '请选择地区',
|
|
addressEmpty: '请填写详细地址',
|
|
postalEmpty: '邮政编码格式不正确',
|
|
defaultAddress: '设为默认收货地址',
|
|
telPlaceholder: '收货人手机号',
|
|
namePlaceholder: '收货人姓名',
|
|
areaPlaceholder: '选择省 / 市 / 区'
|
|
},
|
|
vanAddressEditDetail: {
|
|
label: '详细地址',
|
|
placeholder: '街道门牌、楼层房间号等信息'
|
|
},
|
|
vanAddressList: {
|
|
add: '新增地址'
|
|
}
|
|
};
|
|
exports.default = _default;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 28:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.SlotsMixin = void 0;
|
|
|
|
/**
|
|
* Use scopedSlots in Vue 2.6+
|
|
* downgrade to slots in lower version
|
|
*/
|
|
var SlotsMixin = {
|
|
methods: {
|
|
slots: function slots(name, props) {
|
|
if (name === void 0) {
|
|
name = 'default';
|
|
}
|
|
|
|
var $slots = this.$slots,
|
|
$scopedSlots = this.$scopedSlots;
|
|
var scopedSlot = $scopedSlots[name];
|
|
|
|
if (scopedSlot) {
|
|
return scopedSlot(props);
|
|
}
|
|
|
|
return $slots[name];
|
|
}
|
|
}
|
|
};
|
|
exports.SlotsMixin = SlotsMixin;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 29:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var _interopRequireDefault = __webpack_require__(1);
|
|
|
|
exports.__esModule = true;
|
|
exports.createI18N = createI18N;
|
|
|
|
var _ = __webpack_require__(0);
|
|
|
|
var _string = __webpack_require__(9);
|
|
|
|
var _locale = _interopRequireDefault(__webpack_require__(11));
|
|
|
|
function createI18N(name) {
|
|
var prefix = (0, _string.camelize)(name) + '.';
|
|
return function (path) {
|
|
var messages = _locale.default.messages();
|
|
|
|
var message = (0, _.get)(messages, prefix + path) || (0, _.get)(messages, path);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
args[_key - 1] = arguments[_key];
|
|
}
|
|
|
|
return (0, _.isFunction)(message) ? message.apply(void 0, args) : message;
|
|
};
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 30:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.on = on;
|
|
exports.off = off;
|
|
exports.stopPropagation = stopPropagation;
|
|
exports.preventDefault = preventDefault;
|
|
exports.supportsPassive = void 0;
|
|
|
|
var _ = __webpack_require__(0);
|
|
|
|
// eslint-disable-next-line import/no-mutable-exports
|
|
var supportsPassive = false;
|
|
exports.supportsPassive = supportsPassive;
|
|
|
|
if (!_.isServer) {
|
|
try {
|
|
var opts = {};
|
|
Object.defineProperty(opts, 'passive', {
|
|
// eslint-disable-next-line getter-return
|
|
get: function get() {
|
|
/* istanbul ignore next */
|
|
exports.supportsPassive = supportsPassive = true;
|
|
}
|
|
});
|
|
window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty
|
|
} catch (e) {}
|
|
}
|
|
|
|
function on(target, event, handler, passive) {
|
|
if (passive === void 0) {
|
|
passive = false;
|
|
}
|
|
|
|
if (!_.isServer) {
|
|
target.addEventListener(event, handler, supportsPassive ? {
|
|
capture: false,
|
|
passive: passive
|
|
} : false);
|
|
}
|
|
}
|
|
|
|
function off(target, event, handler) {
|
|
if (!_.isServer) {
|
|
target.removeEventListener(event, handler);
|
|
}
|
|
}
|
|
|
|
function stopPropagation(event) {
|
|
event.stopPropagation();
|
|
}
|
|
|
|
function preventDefault(event, isStopPropagation) {
|
|
/* istanbul ignore else */
|
|
if (typeof event.cancelable !== 'boolean' || event.cancelable) {
|
|
event.preventDefault();
|
|
}
|
|
|
|
if (isStopPropagation) {
|
|
stopPropagation(event);
|
|
}
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 305:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(141);
|
|
/* harmony import */ var _tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _tisdesign_m_lib_picker_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(306);
|
|
/* harmony import */ var _tisdesign_m_lib_picker_style__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_picker_style__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
|
|
|
|
|
_tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0___default.a.name = 'm-picker';
|
|
|
|
/* harmony default export */ __webpack_exports__["default"] = (_tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 306:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(22);
|
|
__webpack_require__(73);
|
|
__webpack_require__(178);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = require("vue");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 5:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Tobias Koppers @sokra
|
|
*/
|
|
// css base code, injected by the css-loader
|
|
module.exports = function (useSourceMap) {
|
|
var list = []; // return the list of modules as css string
|
|
|
|
list.toString = function toString() {
|
|
return this.map(function (item) {
|
|
var content = cssWithMappingToString(item, useSourceMap);
|
|
|
|
if (item[2]) {
|
|
return '@media ' + item[2] + '{' + content + '}';
|
|
} else {
|
|
return content;
|
|
}
|
|
}).join('');
|
|
}; // import a list of modules into the list
|
|
|
|
|
|
list.i = function (modules, mediaQuery) {
|
|
if (typeof modules === 'string') {
|
|
modules = [[null, modules, '']];
|
|
}
|
|
|
|
var alreadyImportedModules = {};
|
|
|
|
for (var i = 0; i < this.length; i++) {
|
|
var id = this[i][0];
|
|
|
|
if (id != null) {
|
|
alreadyImportedModules[id] = true;
|
|
}
|
|
}
|
|
|
|
for (i = 0; i < modules.length; i++) {
|
|
var item = modules[i]; // skip already imported module
|
|
// this implementation is not 100% perfect for weird media query combinations
|
|
// when a module is imported multiple times with different media queries.
|
|
// I hope this will never occur (Hey this way we have smaller bundles)
|
|
|
|
if (item[0] == null || !alreadyImportedModules[item[0]]) {
|
|
if (mediaQuery && !item[2]) {
|
|
item[2] = mediaQuery;
|
|
} else if (mediaQuery) {
|
|
item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
|
|
}
|
|
|
|
list.push(item);
|
|
}
|
|
}
|
|
};
|
|
|
|
return list;
|
|
};
|
|
|
|
function cssWithMappingToString(item, useSourceMap) {
|
|
var content = item[1] || '';
|
|
var cssMapping = item[3];
|
|
|
|
if (!cssMapping) {
|
|
return content;
|
|
}
|
|
|
|
if (useSourceMap && typeof btoa === 'function') {
|
|
var sourceMapping = toComment(cssMapping);
|
|
var sourceURLs = cssMapping.sources.map(function (source) {
|
|
return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
|
|
});
|
|
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
|
|
}
|
|
|
|
return [content].join('\n');
|
|
} // Adapted from convert-source-map (MIT)
|
|
|
|
|
|
function toComment(sourceMap) {
|
|
// eslint-disable-next-line no-undef
|
|
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
|
|
var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
|
|
return '/*# ' + data + ' */';
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 51:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.TouchMixin = void 0;
|
|
|
|
var _event = __webpack_require__(30);
|
|
|
|
var MIN_DISTANCE = 10;
|
|
|
|
function getDirection(x, y) {
|
|
if (x > y && x > MIN_DISTANCE) {
|
|
return 'horizontal';
|
|
}
|
|
|
|
if (y > x && y > MIN_DISTANCE) {
|
|
return 'vertical';
|
|
}
|
|
|
|
return '';
|
|
}
|
|
|
|
var TouchMixin = {
|
|
data: function data() {
|
|
return {
|
|
direction: ''
|
|
};
|
|
},
|
|
methods: {
|
|
touchStart: function touchStart(event) {
|
|
this.resetTouchStatus();
|
|
this.startX = event.touches[0].clientX;
|
|
this.startY = event.touches[0].clientY;
|
|
},
|
|
touchMove: function touchMove(event) {
|
|
var touch = event.touches[0];
|
|
this.deltaX = touch.clientX - this.startX;
|
|
this.deltaY = touch.clientY - this.startY;
|
|
this.offsetX = Math.abs(this.deltaX);
|
|
this.offsetY = Math.abs(this.deltaY);
|
|
this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
|
|
},
|
|
resetTouchStatus: function resetTouchStatus() {
|
|
this.direction = '';
|
|
this.deltaX = 0;
|
|
this.deltaY = 0;
|
|
this.offsetX = 0;
|
|
this.offsetY = 0;
|
|
},
|
|
// avoid Vue 2.6 event bubble issues by manually binding events
|
|
// https://github.com/youzan/vant/issues/3015
|
|
bindTouchEvent: function bindTouchEvent(el) {
|
|
var onTouchStart = this.onTouchStart,
|
|
onTouchMove = this.onTouchMove,
|
|
onTouchEnd = this.onTouchEnd;
|
|
(0, _event.on)(el, 'touchstart', onTouchStart);
|
|
(0, _event.on)(el, 'touchmove', onTouchMove);
|
|
|
|
if (onTouchEnd) {
|
|
(0, _event.on)(el, 'touchend', onTouchEnd);
|
|
(0, _event.on)(el, 'touchcancel', onTouchEnd);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
exports.TouchMixin = TouchMixin;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 6:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Tobias Koppers @sokra
|
|
*/
|
|
|
|
var stylesInDom = {};
|
|
|
|
var memoize = function (fn) {
|
|
var memo;
|
|
|
|
return function () {
|
|
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
|
|
return memo;
|
|
};
|
|
};
|
|
|
|
var isOldIE = memoize(function () {
|
|
// Test for IE <= 9 as proposed by Browserhacks
|
|
// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
|
|
// Tests for existence of standard globals is to allow style-loader
|
|
// to operate correctly into non-standard environments
|
|
// @see https://github.com/webpack-contrib/style-loader/issues/177
|
|
return window && document && document.all && !window.atob;
|
|
});
|
|
|
|
var getTarget = function (target, parent) {
|
|
if (parent){
|
|
return parent.querySelector(target);
|
|
}
|
|
return document.querySelector(target);
|
|
};
|
|
|
|
var getElement = (function (fn) {
|
|
var memo = {};
|
|
|
|
return function(target, parent) {
|
|
// If passing function in options, then use it for resolve "head" element.
|
|
// Useful for Shadow Root style i.e
|
|
// {
|
|
// insertInto: function () { return document.querySelector("#foo").shadowRoot }
|
|
// }
|
|
if (typeof target === 'function') {
|
|
return target();
|
|
}
|
|
if (typeof memo[target] === "undefined") {
|
|
var styleTarget = getTarget.call(this, target, parent);
|
|
// Special case to return head of iframe instead of iframe itself
|
|
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
|
|
try {
|
|
// This will throw an exception if access to iframe is blocked
|
|
// due to cross-origin restrictions
|
|
styleTarget = styleTarget.contentDocument.head;
|
|
} catch(e) {
|
|
styleTarget = null;
|
|
}
|
|
}
|
|
memo[target] = styleTarget;
|
|
}
|
|
return memo[target]
|
|
};
|
|
})();
|
|
|
|
var singleton = null;
|
|
var singletonCounter = 0;
|
|
var stylesInsertedAtTop = [];
|
|
|
|
var fixUrls = __webpack_require__(12);
|
|
|
|
module.exports = function(list, options) {
|
|
if (typeof DEBUG !== "undefined" && DEBUG) {
|
|
if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
|
|
}
|
|
|
|
options = options || {};
|
|
|
|
options.attrs = typeof options.attrs === "object" ? options.attrs : {};
|
|
|
|
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
|
|
// tags it will allow on a page
|
|
if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
|
|
|
|
// By default, add <style> tags to the <head> element
|
|
if (!options.insertInto) options.insertInto = "head";
|
|
|
|
// By default, add <style> tags to the bottom of the target
|
|
if (!options.insertAt) options.insertAt = "bottom";
|
|
|
|
var styles = listToStyles(list, options);
|
|
|
|
addStylesToDom(styles, options);
|
|
|
|
return function update (newList) {
|
|
var mayRemove = [];
|
|
|
|
for (var i = 0; i < styles.length; i++) {
|
|
var item = styles[i];
|
|
var domStyle = stylesInDom[item.id];
|
|
|
|
domStyle.refs--;
|
|
mayRemove.push(domStyle);
|
|
}
|
|
|
|
if(newList) {
|
|
var newStyles = listToStyles(newList, options);
|
|
addStylesToDom(newStyles, options);
|
|
}
|
|
|
|
for (var i = 0; i < mayRemove.length; i++) {
|
|
var domStyle = mayRemove[i];
|
|
|
|
if(domStyle.refs === 0) {
|
|
for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
|
|
|
|
delete stylesInDom[domStyle.id];
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
function addStylesToDom (styles, options) {
|
|
for (var i = 0; i < styles.length; i++) {
|
|
var item = styles[i];
|
|
var domStyle = stylesInDom[item.id];
|
|
|
|
if(domStyle) {
|
|
domStyle.refs++;
|
|
|
|
for(var j = 0; j < domStyle.parts.length; j++) {
|
|
domStyle.parts[j](item.parts[j]);
|
|
}
|
|
|
|
for(; j < item.parts.length; j++) {
|
|
domStyle.parts.push(addStyle(item.parts[j], options));
|
|
}
|
|
} else {
|
|
var parts = [];
|
|
|
|
for(var j = 0; j < item.parts.length; j++) {
|
|
parts.push(addStyle(item.parts[j], options));
|
|
}
|
|
|
|
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
|
|
}
|
|
}
|
|
}
|
|
|
|
function listToStyles (list, options) {
|
|
var styles = [];
|
|
var newStyles = {};
|
|
|
|
for (var i = 0; i < list.length; i++) {
|
|
var item = list[i];
|
|
var id = options.base ? item[0] + options.base : item[0];
|
|
var css = item[1];
|
|
var media = item[2];
|
|
var sourceMap = item[3];
|
|
var part = {css: css, media: media, sourceMap: sourceMap};
|
|
|
|
if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
|
|
else newStyles[id].parts.push(part);
|
|
}
|
|
|
|
return styles;
|
|
}
|
|
|
|
function insertStyleElement (options, style) {
|
|
var target = getElement(options.insertInto)
|
|
|
|
if (!target) {
|
|
throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
|
|
}
|
|
|
|
var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
|
|
|
|
if (options.insertAt === "top") {
|
|
if (!lastStyleElementInsertedAtTop) {
|
|
target.insertBefore(style, target.firstChild);
|
|
} else if (lastStyleElementInsertedAtTop.nextSibling) {
|
|
target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
|
|
} else {
|
|
target.appendChild(style);
|
|
}
|
|
stylesInsertedAtTop.push(style);
|
|
} else if (options.insertAt === "bottom") {
|
|
target.appendChild(style);
|
|
} else if (typeof options.insertAt === "object" && options.insertAt.before) {
|
|
var nextSibling = getElement(options.insertAt.before, target);
|
|
target.insertBefore(style, nextSibling);
|
|
} else {
|
|
throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
|
|
}
|
|
}
|
|
|
|
function removeStyleElement (style) {
|
|
if (style.parentNode === null) return false;
|
|
style.parentNode.removeChild(style);
|
|
|
|
var idx = stylesInsertedAtTop.indexOf(style);
|
|
if(idx >= 0) {
|
|
stylesInsertedAtTop.splice(idx, 1);
|
|
}
|
|
}
|
|
|
|
function createStyleElement (options) {
|
|
var style = document.createElement("style");
|
|
|
|
if(options.attrs.type === undefined) {
|
|
options.attrs.type = "text/css";
|
|
}
|
|
|
|
if(options.attrs.nonce === undefined) {
|
|
var nonce = getNonce();
|
|
if (nonce) {
|
|
options.attrs.nonce = nonce;
|
|
}
|
|
}
|
|
|
|
addAttrs(style, options.attrs);
|
|
insertStyleElement(options, style);
|
|
|
|
return style;
|
|
}
|
|
|
|
function createLinkElement (options) {
|
|
var link = document.createElement("link");
|
|
|
|
if(options.attrs.type === undefined) {
|
|
options.attrs.type = "text/css";
|
|
}
|
|
options.attrs.rel = "stylesheet";
|
|
|
|
addAttrs(link, options.attrs);
|
|
insertStyleElement(options, link);
|
|
|
|
return link;
|
|
}
|
|
|
|
function addAttrs (el, attrs) {
|
|
Object.keys(attrs).forEach(function (key) {
|
|
el.setAttribute(key, attrs[key]);
|
|
});
|
|
}
|
|
|
|
function getNonce() {
|
|
if (false) {}
|
|
|
|
return __webpack_require__.nc;
|
|
}
|
|
|
|
function addStyle (obj, options) {
|
|
var style, update, remove, result;
|
|
|
|
// If a transform function was defined, run it on the css
|
|
if (options.transform && obj.css) {
|
|
result = typeof options.transform === 'function'
|
|
? options.transform(obj.css)
|
|
: options.transform.default(obj.css);
|
|
|
|
if (result) {
|
|
// If transform returns a value, use that instead of the original css.
|
|
// This allows running runtime transformations on the css.
|
|
obj.css = result;
|
|
} else {
|
|
// If the transform function returns a falsy value, don't add this css.
|
|
// This allows conditional loading of css
|
|
return function() {
|
|
// noop
|
|
};
|
|
}
|
|
}
|
|
|
|
if (options.singleton) {
|
|
var styleIndex = singletonCounter++;
|
|
|
|
style = singleton || (singleton = createStyleElement(options));
|
|
|
|
update = applyToSingletonTag.bind(null, style, styleIndex, false);
|
|
remove = applyToSingletonTag.bind(null, style, styleIndex, true);
|
|
|
|
} else if (
|
|
obj.sourceMap &&
|
|
typeof URL === "function" &&
|
|
typeof URL.createObjectURL === "function" &&
|
|
typeof URL.revokeObjectURL === "function" &&
|
|
typeof Blob === "function" &&
|
|
typeof btoa === "function"
|
|
) {
|
|
style = createLinkElement(options);
|
|
update = updateLink.bind(null, style, options);
|
|
remove = function () {
|
|
removeStyleElement(style);
|
|
|
|
if(style.href) URL.revokeObjectURL(style.href);
|
|
};
|
|
} else {
|
|
style = createStyleElement(options);
|
|
update = applyToTag.bind(null, style);
|
|
remove = function () {
|
|
removeStyleElement(style);
|
|
};
|
|
}
|
|
|
|
update(obj);
|
|
|
|
return function updateStyle (newObj) {
|
|
if (newObj) {
|
|
if (
|
|
newObj.css === obj.css &&
|
|
newObj.media === obj.media &&
|
|
newObj.sourceMap === obj.sourceMap
|
|
) {
|
|
return;
|
|
}
|
|
|
|
update(obj = newObj);
|
|
} else {
|
|
remove();
|
|
}
|
|
};
|
|
}
|
|
|
|
var replaceText = (function () {
|
|
var textStore = [];
|
|
|
|
return function (index, replacement) {
|
|
textStore[index] = replacement;
|
|
|
|
return textStore.filter(Boolean).join('\n');
|
|
};
|
|
})();
|
|
|
|
function applyToSingletonTag (style, index, remove, obj) {
|
|
var css = remove ? "" : obj.css;
|
|
|
|
if (style.styleSheet) {
|
|
style.styleSheet.cssText = replaceText(index, css);
|
|
} else {
|
|
var cssNode = document.createTextNode(css);
|
|
var childNodes = style.childNodes;
|
|
|
|
if (childNodes[index]) style.removeChild(childNodes[index]);
|
|
|
|
if (childNodes.length) {
|
|
style.insertBefore(cssNode, childNodes[index]);
|
|
} else {
|
|
style.appendChild(cssNode);
|
|
}
|
|
}
|
|
}
|
|
|
|
function applyToTag (style, obj) {
|
|
var css = obj.css;
|
|
var media = obj.media;
|
|
|
|
if(media) {
|
|
style.setAttribute("media", media)
|
|
}
|
|
|
|
if(style.styleSheet) {
|
|
style.styleSheet.cssText = css;
|
|
} else {
|
|
while(style.firstChild) {
|
|
style.removeChild(style.firstChild);
|
|
}
|
|
|
|
style.appendChild(document.createTextNode(css));
|
|
}
|
|
}
|
|
|
|
function updateLink (link, options, obj) {
|
|
var css = obj.css;
|
|
var sourceMap = obj.sourceMap;
|
|
|
|
/*
|
|
If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
|
|
and there is no publicPath defined then lets turn convertToAbsoluteUrls
|
|
on by default. Otherwise default to the convertToAbsoluteUrls option
|
|
directly
|
|
*/
|
|
var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
|
|
|
|
if (options.convertToAbsoluteUrls || autoFixUrls) {
|
|
css = fixUrls(css);
|
|
}
|
|
|
|
if (sourceMap) {
|
|
// http://stackoverflow.com/a/26603875
|
|
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
|
|
}
|
|
|
|
var blob = new Blob([css], { type: "text/css" });
|
|
|
|
var oldSrc = link.href;
|
|
|
|
link.href = URL.createObjectURL(blob);
|
|
|
|
if(oldSrc) URL.revokeObjectURL(oldSrc);
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 63:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.BORDER_UNSET_TOP_BOTTOM = exports.BORDER_TOP_BOTTOM = exports.BORDER_SURROUND = exports.BORDER_BOTTOM = exports.BORDER_LEFT = exports.BORDER_TOP = exports.BORDER = exports.RED = void 0;
|
|
// color
|
|
var RED = '#ee0a24'; // border
|
|
|
|
exports.RED = RED;
|
|
var BORDER = 'van-hairline';
|
|
exports.BORDER = BORDER;
|
|
var BORDER_TOP = BORDER + "--top";
|
|
exports.BORDER_TOP = BORDER_TOP;
|
|
var BORDER_LEFT = BORDER + "--left";
|
|
exports.BORDER_LEFT = BORDER_LEFT;
|
|
var BORDER_BOTTOM = BORDER + "--bottom";
|
|
exports.BORDER_BOTTOM = BORDER_BOTTOM;
|
|
var BORDER_SURROUND = BORDER + "--surround";
|
|
exports.BORDER_SURROUND = BORDER_SURROUND;
|
|
var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
|
|
exports.BORDER_TOP_BOTTOM = BORDER_TOP_BOTTOM;
|
|
var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
|
|
exports.BORDER_UNSET_TOP_BOTTOM = BORDER_UNSET_TOP_BOTTOM;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 71:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var _interopRequireDefault = __webpack_require__(1);
|
|
|
|
exports.__esModule = true;
|
|
exports.default = void 0;
|
|
|
|
var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
|
|
|
|
var _utils = __webpack_require__(0);
|
|
|
|
var _functional = __webpack_require__(14);
|
|
|
|
// Utils
|
|
var _createNamespace = (0, _utils.createNamespace)('loading'),
|
|
createComponent = _createNamespace[0],
|
|
bem = _createNamespace[1];
|
|
|
|
function LoadingIcon(h, props) {
|
|
if (props.type === 'spinner') {
|
|
var Spin = [];
|
|
|
|
for (var i = 0; i < 12; i++) {
|
|
Spin.push(h("i"));
|
|
}
|
|
|
|
return Spin;
|
|
}
|
|
|
|
return h("svg", {
|
|
"class": bem('circular'),
|
|
"attrs": {
|
|
"viewBox": "25 25 50 50"
|
|
}
|
|
}, [h("circle", {
|
|
"attrs": {
|
|
"cx": "50",
|
|
"cy": "50",
|
|
"r": "20",
|
|
"fill": "none"
|
|
}
|
|
})]);
|
|
}
|
|
|
|
function LoadingText(h, props, slots) {
|
|
if (slots.default) {
|
|
var _props$textColor;
|
|
|
|
var style = {
|
|
fontSize: (0, _utils.addUnit)(props.textSize),
|
|
color: (_props$textColor = props.textColor) != null ? _props$textColor : props.color
|
|
};
|
|
return h("span", {
|
|
"class": bem('text'),
|
|
"style": style
|
|
}, [slots.default()]);
|
|
}
|
|
}
|
|
|
|
function Loading(h, props, slots, ctx) {
|
|
var color = props.color,
|
|
size = props.size,
|
|
type = props.type;
|
|
var style = {
|
|
color: color
|
|
};
|
|
|
|
if (size) {
|
|
var iconSize = (0, _utils.addUnit)(size);
|
|
style.width = iconSize;
|
|
style.height = iconSize;
|
|
}
|
|
|
|
return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
|
|
"class": bem([type, {
|
|
vertical: props.vertical
|
|
}])
|
|
}, (0, _functional.inherit)(ctx, true)]), [h("span", {
|
|
"class": bem('spinner', type),
|
|
"style": style
|
|
}, [LoadingIcon(h, props)]), LoadingText(h, props, slots)]);
|
|
}
|
|
|
|
Loading.props = {
|
|
color: String,
|
|
size: [Number, String],
|
|
vertical: Boolean,
|
|
textSize: [Number, String],
|
|
textColor: String,
|
|
type: {
|
|
type: String,
|
|
default: 'circular'
|
|
}
|
|
};
|
|
|
|
var _default = createComponent(Loading);
|
|
|
|
exports.default = _default;
|
|
|
|
/***/ }),
|
|
|
|
/***/ 73:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
var content = __webpack_require__(74);
|
|
|
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
|
|
var transform;
|
|
var insertInto;
|
|
|
|
|
|
|
|
var options = {"hmr":true}
|
|
|
|
options.transform = transform
|
|
options.insertInto = undefined;
|
|
|
|
var update = __webpack_require__(6)(content, options);
|
|
|
|
if(content.locals) module.exports = content.locals;
|
|
|
|
if(false) {}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 74:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
exports = module.exports = __webpack_require__(5)(false);
|
|
// Module
|
|
exports.push([module.i, ".van-loading{position:relative;color:#c8c9cc;font-size:0;vertical-align:middle}.van-loading__spinner{position:relative;display:inline-block;width:30px;max-width:100%;height:30px;max-height:100%;vertical-align:middle;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--spinner i{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__spinner--spinner i::before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:' '}.van-loading__spinner--circular{-webkit-animation-duration:2s;animation-duration:2s}.van-loading__circular{display:block;width:100%;height:100%}.van-loading__circular circle{-webkit-animation:van-circular 1.5s ease-in-out infinite;animation:van-circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}.van-loading__text{display:inline-block;margin-left:8px;color:#969799;font-size:14px;vertical-align:middle}.van-loading--vertical{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.van-loading--vertical .van-loading__text{margin:8px 0 0}@-webkit-keyframes van-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}@keyframes van-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}.van-loading__spinner--spinner i:nth-of-type(1){-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__spinner--spinner i:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__spinner--spinner i:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__spinner--spinner i:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__spinner--spinner i:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__spinner--spinner i:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__spinner--spinner i:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__spinner--spinner i:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__spinner--spinner i:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__spinner--spinner i:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__spinner--spinner i:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__spinner--spinner i:nth-of-type(12){-webkit-transform:rotate(360deg);transform:rotate(360deg);opacity:.3125}", ""]);
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 81:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.range = range;
|
|
exports.formatNumber = formatNumber;
|
|
|
|
function range(num, min, max) {
|
|
return Math.min(Math.max(num, min), max);
|
|
}
|
|
|
|
function trimExtraChar(value, _char, regExp) {
|
|
var index = value.indexOf(_char);
|
|
|
|
if (index === -1) {
|
|
return value;
|
|
}
|
|
|
|
if (_char === '-' && index !== 0) {
|
|
return value.slice(0, index);
|
|
}
|
|
|
|
return value.slice(0, index + 1) + value.slice(index).replace(regExp, '');
|
|
}
|
|
|
|
function formatNumber(value, allowDot, allowMinus) {
|
|
if (allowDot === void 0) {
|
|
allowDot = true;
|
|
}
|
|
|
|
if (allowMinus === void 0) {
|
|
allowMinus = true;
|
|
}
|
|
|
|
if (allowDot) {
|
|
value = trimExtraChar(value, '.', /\./g);
|
|
} else {
|
|
value = value.split('.')[0];
|
|
}
|
|
|
|
if (allowMinus) {
|
|
value = trimExtraChar(value, '-', /-/g);
|
|
} else {
|
|
value = value.replace(/-/, '');
|
|
}
|
|
|
|
var regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
return value.replace(regExp, '');
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 9:
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.camelize = camelize;
|
|
exports.padZero = padZero;
|
|
var camelizeRE = /-(\w)/g;
|
|
|
|
function camelize(str) {
|
|
return str.replace(camelizeRE, function (_, c) {
|
|
return c.toUpperCase();
|
|
});
|
|
}
|
|
|
|
function padZero(num, targetLength) {
|
|
if (targetLength === void 0) {
|
|
targetLength = 2;
|
|
}
|
|
|
|
var str = num + '';
|
|
|
|
while (str.length < targetLength) {
|
|
str = '0' + str;
|
|
}
|
|
|
|
return str;
|
|
}
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|