app模板、应用模板、组件模板、widget模板
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.

2669 lines
76 KiB

4 years ago
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  38. /******/ __webpack_require__.d = function(exports, name, getter) {
  39. /******/ if(!__webpack_require__.o(exports, name)) {
  40. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41. /******/ }
  42. /******/ };
  43. /******/
  44. /******/ // define __esModule on exports
  45. /******/ __webpack_require__.r = function(exports) {
  46. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48. /******/ }
  49. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50. /******/ };
  51. /******/
  52. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  57. /******/ __webpack_require__.t = function(value, mode) {
  58. /******/ if(mode & 1) value = __webpack_require__(value);
  59. /******/ if(mode & 8) return value;
  60. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61. /******/ var ns = Object.create(null);
  62. /******/ __webpack_require__.r(ns);
  63. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65. /******/ return ns;
  66. /******/ };
  67. /******/
  68. /******/ // getDefaultExport function for compatibility with non-harmony modules
  69. /******/ __webpack_require__.n = function(module) {
  70. /******/ var getter = module && module.__esModule ?
  71. /******/ function getDefault() { return module['default']; } :
  72. /******/ function getModuleExports() { return module; };
  73. /******/ __webpack_require__.d(getter, 'a', getter);
  74. /******/ return getter;
  75. /******/ };
  76. /******/
  77. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "/dist/";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = 306);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 0:
  90. /***/ (function(module, exports, __webpack_require__) {
  91. "use strict";
  92. var _interopRequireDefault = __webpack_require__(1);
  93. exports.__esModule = true;
  94. exports.noop = noop;
  95. exports.isDef = isDef;
  96. exports.isFunction = isFunction;
  97. exports.isObject = isObject;
  98. exports.isPromise = isPromise;
  99. exports.get = get;
  100. exports.isServer = exports.inBrowser = exports.addUnit = exports.createNamespace = void 0;
  101. var _vue = _interopRequireDefault(__webpack_require__(4));
  102. var _create = __webpack_require__(24);
  103. exports.createNamespace = _create.createNamespace;
  104. var _unit = __webpack_require__(20);
  105. exports.addUnit = _unit.addUnit;
  106. var inBrowser = typeof window !== 'undefined';
  107. exports.inBrowser = inBrowser;
  108. var isServer = _vue.default.prototype.$isServer; // eslint-disable-next-line @typescript-eslint/no-empty-function
  109. exports.isServer = isServer;
  110. function noop() {}
  111. function isDef(val) {
  112. return val !== undefined && val !== null;
  113. }
  114. function isFunction(val) {
  115. return typeof val === 'function';
  116. }
  117. function isObject(val) {
  118. return val !== null && typeof val === 'object';
  119. }
  120. function isPromise(val) {
  121. return isObject(val) && isFunction(val.then) && isFunction(val.catch);
  122. }
  123. function get(object, path) {
  124. var keys = path.split('.');
  125. var result = object;
  126. keys.forEach(function (key) {
  127. var _result$key;
  128. result = (_result$key = result[key]) != null ? _result$key : '';
  129. });
  130. return result;
  131. }
  132. /***/ }),
  133. /***/ 1:
  134. /***/ (function(module, exports) {
  135. function _interopRequireDefault(obj) {
  136. return obj && obj.__esModule ? obj : {
  137. "default": obj
  138. };
  139. }
  140. module.exports = _interopRequireDefault;
  141. /***/ }),
  142. /***/ 11:
  143. /***/ (function(module, exports, __webpack_require__) {
  144. "use strict";
  145. var _interopRequireDefault = __webpack_require__(1);
  146. exports.__esModule = true;
  147. exports.default = void 0;
  148. var _vue = _interopRequireDefault(__webpack_require__(4));
  149. var _deepAssign = __webpack_require__(21);
  150. var _zhCN = _interopRequireDefault(__webpack_require__(27));
  151. var proto = _vue.default.prototype;
  152. var defineReactive = _vue.default.util.defineReactive;
  153. defineReactive(proto, '$vantLang', 'zh-CN');
  154. defineReactive(proto, '$vantMessages', {
  155. 'zh-CN': _zhCN.default
  156. });
  157. var _default = {
  158. messages: function messages() {
  159. return proto.$vantMessages[proto.$vantLang];
  160. },
  161. use: function use(lang, messages) {
  162. var _this$add;
  163. proto.$vantLang = lang;
  164. this.add((_this$add = {}, _this$add[lang] = messages, _this$add));
  165. },
  166. add: function add(messages) {
  167. if (messages === void 0) {
  168. messages = {};
  169. }
  170. (0, _deepAssign.deepAssign)(proto.$vantMessages, messages);
  171. }
  172. };
  173. exports.default = _default;
  174. /***/ }),
  175. /***/ 12:
  176. /***/ (function(module, exports) {
  177. /**
  178. * When source maps are enabled, `style-loader` uses a link element with a data-uri to
  179. * embed the css on the page. This breaks all relative urls because now they are relative to a
  180. * bundle instead of the current page.
  181. *
  182. * One solution is to only use full urls, but that may be impossible.
  183. *
  184. * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
  185. *
  186. * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
  187. *
  188. */
  189. module.exports = function (css) {
  190. // get current location
  191. var location = typeof window !== "undefined" && window.location;
  192. if (!location) {
  193. throw new Error("fixUrls requires window.location");
  194. }
  195. // blank or null?
  196. if (!css || typeof css !== "string") {
  197. return css;
  198. }
  199. var baseUrl = location.protocol + "//" + location.host;
  200. var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
  201. // convert each url(...)
  202. /*
  203. This regular expression is just a way to recursively match brackets within
  204. a string.
  205. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
  206. ( = Start a capturing group
  207. (?: = Start a non-capturing group
  208. [^)(] = Match anything that isn't a parentheses
  209. | = OR
  210. \( = Match a start parentheses
  211. (?: = Start another non-capturing groups
  212. [^)(]+ = Match anything that isn't a parentheses
  213. | = OR
  214. \( = Match a start parentheses
  215. [^)(]* = Match anything that isn't a parentheses
  216. \) = Match a end parentheses
  217. ) = End Group
  218. *\) = Match anything and then a close parens
  219. ) = Close non-capturing group
  220. * = Match anything
  221. ) = Close capturing group
  222. \) = Match a close parens
  223. /gi = Get all matches, not the first. Be case insensitive.
  224. */
  225. var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
  226. // strip quotes (if they exist)
  227. var unquotedOrigUrl = origUrl
  228. .trim()
  229. .replace(/^"(.*)"$/, function(o, $1){ return $1; })
  230. .replace(/^'(.*)'$/, function(o, $1){ return $1; });
  231. // already a full url? no change
  232. if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
  233. return fullMatch;
  234. }
  235. // convert the url to a full url
  236. var newUrl;
  237. if (unquotedOrigUrl.indexOf("//") === 0) {
  238. //TODO: should we add protocol?
  239. newUrl = unquotedOrigUrl;
  240. } else if (unquotedOrigUrl.indexOf("/") === 0) {
  241. // path should be relative to the base url
  242. newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
  243. } else {
  244. // path should be relative to current directory
  245. newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
  246. }
  247. // send back the fixed url(...)
  248. return "url(" + JSON.stringify(newUrl) + ")";
  249. });
  250. // send back the fixed css
  251. return fixedCss;
  252. };
  253. /***/ }),
  254. /***/ 126:
  255. /***/ (function(module, exports, __webpack_require__) {
  256. "use strict";
  257. exports.__esModule = true;
  258. exports.deepClone = deepClone;
  259. var _deepAssign = __webpack_require__(21);
  260. function deepClone(obj) {
  261. if (Array.isArray(obj)) {
  262. return obj.map(function (item) {
  263. return deepClone(item);
  264. });
  265. }
  266. if (typeof obj === 'object') {
  267. return (0, _deepAssign.deepAssign)({}, obj);
  268. }
  269. return obj;
  270. }
  271. /***/ }),
  272. /***/ 14:
  273. /***/ (function(module, exports, __webpack_require__) {
  274. "use strict";
  275. var _interopRequireDefault = __webpack_require__(1);
  276. exports.__esModule = true;
  277. exports.inherit = inherit;
  278. exports.emit = emit;
  279. exports.mount = mount;
  280. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  281. var _vue = _interopRequireDefault(__webpack_require__(4));
  282. var inheritKey = ['ref', 'style', 'class', 'attrs', 'refInFor', 'nativeOn', 'directives', 'staticClass', 'staticStyle'];
  283. var mapInheritKey = {
  284. nativeOn: 'on'
  285. }; // inherit partial context, map nativeOn to on
  286. function inherit(context, inheritListeners) {
  287. var result = inheritKey.reduce(function (obj, key) {
  288. if (context.data[key]) {
  289. obj[mapInheritKey[key] || key] = context.data[key];
  290. }
  291. return obj;
  292. }, {});
  293. if (inheritListeners) {
  294. result.on = result.on || {};
  295. (0, _extends2.default)(result.on, context.data.on);
  296. }
  297. return result;
  298. } // emit event
  299. function emit(context, eventName) {
  300. for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  301. args[_key - 2] = arguments[_key];
  302. }
  303. var listeners = context.listeners[eventName];
  304. if (listeners) {
  305. if (Array.isArray(listeners)) {
  306. listeners.forEach(function (listener) {
  307. listener.apply(void 0, args);
  308. });
  309. } else {
  310. listeners.apply(void 0, args);
  311. }
  312. }
  313. } // mount functional component
  314. function mount(Component, data) {
  315. var instance = new _vue.default({
  316. el: document.createElement('div'),
  317. props: Component.props,
  318. render: function render(h) {
  319. return h(Component, (0, _extends2.default)({
  320. props: this.$props
  321. }, data));
  322. }
  323. });
  324. document.body.appendChild(instance.$el);
  325. return instance;
  326. }
  327. /***/ }),
  328. /***/ 142:
  329. /***/ (function(module, exports, __webpack_require__) {
  330. "use strict";
  331. var _interopRequireDefault = __webpack_require__(1);
  332. exports.__esModule = true;
  333. exports.default = void 0;
  334. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  335. var _utils = __webpack_require__(0);
  336. var _event = __webpack_require__(30);
  337. var _constant = __webpack_require__(63);
  338. var _shared = __webpack_require__(148);
  339. var _unit = __webpack_require__(20);
  340. var _loading = _interopRequireDefault(__webpack_require__(71));
  341. var _PickerColumn = _interopRequireDefault(__webpack_require__(181));
  342. // Utils
  343. // Components
  344. var _createNamespace = (0, _utils.createNamespace)('picker'),
  345. createComponent = _createNamespace[0],
  346. bem = _createNamespace[1],
  347. t = _createNamespace[2];
  348. var _default2 = createComponent({
  349. props: (0, _extends2.default)({}, _shared.pickerProps, {
  350. defaultIndex: {
  351. type: [Number, String],
  352. default: 0
  353. },
  354. columns: {
  355. type: Array,
  356. default: function _default() {
  357. return [];
  358. }
  359. },
  360. toolbarPosition: {
  361. type: String,
  362. default: 'top'
  363. },
  364. valueKey: {
  365. type: String,
  366. default: 'text'
  367. }
  368. }),
  369. data: function data() {
  370. return {
  371. children: [],
  372. formattedColumns: []
  373. };
  374. },
  375. computed: {
  376. itemPxHeight: function itemPxHeight() {
  377. return this.itemHeight ? (0, _unit.unitToPx)(this.itemHeight) : _shared.DEFAULT_ITEM_HEIGHT;
  378. },
  379. dataType: function dataType() {
  380. var columns = this.columns;
  381. var firstColumn = columns[0] || {};
  382. if (firstColumn.children) {
  383. return 'cascade';
  384. }
  385. if (firstColumn.values) {
  386. return 'object';
  387. }
  388. return 'text';
  389. }
  390. },
  391. watch: {
  392. columns: {
  393. handler: 'format',
  394. immediate: true
  395. }
  396. },
  397. methods: {
  398. format: function format() {
  399. var columns = this.columns,
  400. dataType = this.dataType;
  401. if (dataType === 'text') {
  402. this.formattedColumns = [{
  403. values: columns
  404. }];
  405. } else if (dataType === 'cascade') {
  406. this.formatCascade();
  407. } else {
  408. this.formattedColumns = columns;
  409. }
  410. },
  411. formatCascade: function formatCascade() {
  412. var formatted = [];
  413. var cursor = {
  414. children: this.columns
  415. };
  416. while (cursor && cursor.children) {
  417. var _cursor$defaultIndex;
  418. var _cursor = cursor,
  419. children = _cursor.children;
  420. var defaultIndex = (_cursor$defaultIndex = cursor.defaultIndex) != null ? _cursor$defaultIndex : +this.defaultIndex;
  421. while (children[defaultIndex] && children[defaultIndex].disabled) {
  422. if (defaultIndex < children.length - 1) {
  423. defaultIndex++;
  424. } else {
  425. defaultIndex = 0;
  426. break;
  427. }
  428. }
  429. formatted.push({
  430. values: cursor.children,
  431. className: cursor.className,
  432. defaultIndex: defaultIndex
  433. });
  434. cursor = children[defaultIndex];
  435. }
  436. this.formattedColumns = formatted;
  437. },
  438. emit: function emit(event) {
  439. var _this = this;
  440. if (this.dataType === 'text') {
  441. this.$emit(event, this.getColumnValue(0), this.getColumnIndex(0));
  442. } else {
  443. var values = this.getValues(); // compatible with old version of wrong parameters
  444. // should be removed in next major version
  445. // see: https://github.com/youzan/vant/issues/5905
  446. if (this.dataType === 'cascade') {
  447. values = values.map(function (item) {
  448. return item[_this.valueKey];
  449. });
  450. }
  451. this.$emit(event, values, this.getIndexes());
  452. }
  453. },
  454. onCascadeChange: function onCascadeChange(columnIndex) {
  455. var cursor = {
  456. children: this.columns
  457. };
  458. var indexes = this.getIndexes();
  459. for (var i = 0; i <= columnIndex; i++) {
  460. cursor = cursor.children[indexes[i]];
  461. }
  462. while (cursor && cursor.children) {
  463. columnIndex++;
  464. this.setColumnValues(columnIndex, cursor.children);
  465. cursor = cursor.children[cursor.defaultIndex || 0];
  466. }
  467. },
  468. onChange: function onChange(columnIndex) {
  469. var _this2 = this;
  470. if (this.dataType === 'cascade') {
  471. this.onCascadeChange(columnIndex);
  472. }
  473. if (this.dataType === 'text') {
  474. this.$emit('change', this, this.getColumnValue(0), this.getColumnIndex(0));
  475. } else {
  476. var values = this.getValues(); // compatible with old version of wrong parameters
  477. // should be removed in next major version
  478. // see: https://github.com/youzan/vant/issues/5905
  479. if (this.dataType === 'cascade') {
  480. values = values.map(function (item) {
  481. return item[_this2.valueKey];
  482. });
  483. }
  484. this.$emit('change', this, values, columnIndex);
  485. }
  486. },
  487. // get column instance by index
  488. getColumn: function getColumn(index) {
  489. return this.children[index];
  490. },
  491. // @exposed-api
  492. // get column value by index
  493. getColumnValue: function getColumnValue(index) {
  494. var column = this.getColumn(index);
  495. return column && column.getValue();
  496. },
  497. // @exposed-api
  498. // set column value by index
  499. setColumnValue: function setColumnValue(index, value) {
  500. var column = this.getColumn(index);
  501. if (column) {
  502. column.setValue(value);
  503. if (this.dataType === 'cascade') {
  504. this.onCascadeChange(index);
  505. }
  506. }
  507. },
  508. // @exposed-api
  509. // get column option index by column index
  510. getColumnIndex: function getColumnIndex(columnIndex) {
  511. return (this.getColumn(columnIndex) || {}).currentIndex;
  512. },
  513. // @exposed-api
  514. // set column option index by column index
  515. setColumnIndex: function setColumnIndex(columnIndex, optionIndex) {
  516. var column = this.getColumn(columnIndex);
  517. if (column) {
  518. column.setIndex(optionIndex);
  519. if (this.dataType === 'cascade') {
  520. this.onCascadeChange(columnIndex);
  521. }
  522. }
  523. },
  524. // @exposed-api
  525. // get options of column by index
  526. getColumnValues: function getColumnValues(index) {
  527. return (this.children[index] || {}).options;
  528. },
  529. // @exposed-api
  530. // set options of column by index
  531. setColumnValues: function setColumnValues(index, options) {
  532. var column = this.children[index];
  533. if (column) {
  534. column.setOptions(options);
  535. }
  536. },
  537. // @exposed-api
  538. // get values of all columns
  539. getValues: function getValues() {
  540. return this.children.map(function (child) {
  541. return child.getValue();
  542. });
  543. },
  544. // @exposed-api
  545. // set values of all columns
  546. setValues: function setValues(values) {
  547. var _this3 = this;
  548. values.forEach(function (value, index) {
  549. _this3.setColumnValue(index, value);
  550. });
  551. },
  552. // @exposed-api
  553. // get indexes of all columns
  554. getIndexes: function getIndexes() {
  555. return this.children.map(function (child) {
  556. return child.currentIndex;
  557. });
  558. },
  559. // @exposed-api
  560. // set indexes of all columns
  561. setIndexes: function setIndexes(indexes) {
  562. var _this4 = this;
  563. indexes.forEach(function (optionIndex, columnIndex) {
  564. _this4.setColumnIndex(columnIndex, optionIndex);
  565. });
  566. },
  567. // @exposed-api
  568. confirm: function confirm() {
  569. this.children.forEach(function (child) {
  570. return child.stopMomentum();
  571. });
  572. this.emit('confirm');
  573. },
  574. cancel: function cancel() {
  575. this.emit('cancel');
  576. },
  577. genTitle: function genTitle() {
  578. var h = this.$createElement;
  579. var titleSlot = this.slots('title');
  580. if (titleSlot) {
  581. return titleSlot;
  582. }
  583. if (this.title) {
  584. return h("div", {
  585. "class": ['van-ellipsis', bem('title')]
  586. }, [this.title]);
  587. }
  588. },
  589. genCancel: function genCancel() {
  590. var h = this.$createElement;
  591. return h("button", {
  592. "attrs": {
  593. "type": "button"
  594. },
  595. "class": bem('cancel'),
  596. "on": {
  597. "click": this.cancel
  598. }
  599. }, [this.slots('cancel') || this.cancelButtonText || t('cancel')]);
  600. },
  601. genConfirm: function genConfirm() {
  602. var h = this.$createElement;
  603. return h("button", {
  604. "attrs": {
  605. "type": "button"
  606. },
  607. "class": bem('confirm'),
  608. "on": {
  609. "click": this.confirm
  610. }
  611. }, [this.slots('confirm') || this.confirmButtonText || t('confirm')]);
  612. },
  613. genToolbar: function genToolbar() {
  614. var h = this.$createElement;
  615. if (this.showToolbar) {
  616. return h("div", {
  617. "class": bem('toolbar')
  618. }, [this.slots() || [this.genCancel(), this.genTitle(), this.genConfirm()]]);
  619. }
  620. },
  621. genColumns: function genColumns() {
  622. var h = this.$createElement;
  623. var itemPxHeight = this.itemPxHeight;
  624. var wrapHeight = itemPxHeight * this.visibleItemCount;
  625. var frameStyle = {
  626. height: itemPxHeight + "px"
  627. };
  628. var columnsStyle = {
  629. height: wrapHeight + "px"
  630. };
  631. var maskStyle = {
  632. backgroundSize: "100% " + (wrapHeight - itemPxHeight) / 2 + "px"
  633. };
  634. return h("div", {
  635. "class": bem('columns'),
  636. "style": columnsStyle,
  637. "on": {
  638. "touchmove": _event.preventDefault
  639. }
  640. }, [this.genColumnItems(), h("div", {
  641. "class": bem('mask'),
  642. "style": maskStyle
  643. }), h("div", {
  644. "class": [_constant.BORDER_UNSET_TOP_BOTTOM, bem('frame')],
  645. "style": frameStyle
  646. })]);
  647. },
  648. genColumnItems: function genColumnItems() {
  649. var _this5 = this;
  650. var h = this.$createElement;
  651. return this.formattedColumns.map(function (item, columnIndex) {
  652. var _item$defaultIndex;
  653. return h(_PickerColumn.default, {
  654. "attrs": {
  655. "readonly": _this5.readonly,
  656. "valueKey": _this5.valueKey,
  657. "allowHtml": _this5.allowHtml,
  658. "className": item.className,
  659. "itemHeight": _this5.itemPxHeight,
  660. "defaultIndex": (_item$defaultIndex = item.defaultIndex) != null ? _item$defaultIndex : +_this5.defaultIndex,
  661. "swipeDuration": _this5.swipeDuration,
  662. "visibleItemCount": _this5.visibleItemCount,
  663. "initialOptions": item.values
  664. },
  665. "scopedSlots": {
  666. option: _this5.$scopedSlots.option
  667. },
  668. "on": {
  669. "change": function change() {
  670. _this5.onChange(columnIndex);
  671. }
  672. }
  673. });
  674. });
  675. }
  676. },
  677. render: function render(h) {
  678. return h("div", {
  679. "class": bem()
  680. }, [this.toolbarPosition === 'top' ? this.genToolbar() : h(), this.loading ? h(_loading.default, {
  681. "class": bem('loading')
  682. }) : h(), this.slots('columns-top'), this.genColumns(), this.slots('columns-bottom'), this.toolbarPosition === 'bottom' ? this.genToolbar() : h()]);
  683. }
  684. });
  685. exports.default = _default2;
  686. /***/ }),
  687. /***/ 148:
  688. /***/ (function(module, exports, __webpack_require__) {
  689. "use strict";
  690. exports.__esModule = true;
  691. exports.pickerProps = exports.DEFAULT_ITEM_HEIGHT = void 0;
  692. var DEFAULT_ITEM_HEIGHT = 44;
  693. exports.DEFAULT_ITEM_HEIGHT = DEFAULT_ITEM_HEIGHT;
  694. var pickerProps = {
  695. title: String,
  696. loading: Boolean,
  697. readonly: Boolean,
  698. itemHeight: [Number, String],
  699. showToolbar: Boolean,
  700. cancelButtonText: String,
  701. confirmButtonText: String,
  702. allowHtml: {
  703. type: Boolean,
  704. default: true
  705. },
  706. visibleItemCount: {
  707. type: [Number, String],
  708. default: 6
  709. },
  710. swipeDuration: {
  711. type: [Number, String],
  712. default: 1000
  713. }
  714. };
  715. exports.pickerProps = pickerProps;
  716. /***/ }),
  717. /***/ 16:
  718. /***/ (function(module, exports, __webpack_require__) {
  719. "use strict";
  720. 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;
  721. /***/ }),
  722. /***/ 179:
  723. /***/ (function(module, exports, __webpack_require__) {
  724. var content = __webpack_require__(180);
  725. if(typeof content === 'string') content = [[module.i, content, '']];
  726. var transform;
  727. var insertInto;
  728. var options = {"hmr":true}
  729. options.transform = transform
  730. options.insertInto = undefined;
  731. var update = __webpack_require__(6)(content, options);
  732. if(content.locals) module.exports = content.locals;
  733. if(false) {}
  734. /***/ }),
  735. /***/ 18:
  736. /***/ (function(module, exports) {
  737. function _extends() {
  738. module.exports = _extends = Object.assign || function (target) {
  739. for (var i = 1; i < arguments.length; i++) {
  740. var source = arguments[i];
  741. for (var key in source) {
  742. if (Object.prototype.hasOwnProperty.call(source, key)) {
  743. target[key] = source[key];
  744. }
  745. }
  746. }
  747. return target;
  748. };
  749. return _extends.apply(this, arguments);
  750. }
  751. module.exports = _extends;
  752. /***/ }),
  753. /***/ 180:
  754. /***/ (function(module, exports, __webpack_require__) {
  755. exports = module.exports = __webpack_require__(5)(false);
  756. // Module
  757. 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}", ""]);
  758. /***/ }),
  759. /***/ 181:
  760. /***/ (function(module, exports, __webpack_require__) {
  761. "use strict";
  762. var _interopRequireDefault = __webpack_require__(1);
  763. exports.__esModule = true;
  764. exports.default = void 0;
  765. var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  766. var _deepClone = __webpack_require__(126);
  767. var _utils = __webpack_require__(0);
  768. var _number = __webpack_require__(81);
  769. var _event = __webpack_require__(30);
  770. var _touch = __webpack_require__(51);
  771. var DEFAULT_DURATION = 200; // 惯性滑动思路:
  772. // 在手指离开屏幕时,如果和上一次 move 时的间隔小于 `MOMENTUM_LIMIT_TIME` 且 move
  773. // 距离大于 `MOMENTUM_LIMIT_DISTANCE` 时,执行惯性滑动
  774. var MOMENTUM_LIMIT_TIME = 300;
  775. var MOMENTUM_LIMIT_DISTANCE = 15;
  776. var _createNamespace = (0, _utils.createNamespace)('picker-column'),
  777. createComponent = _createNamespace[0],
  778. bem = _createNamespace[1];
  779. function getElementTranslateY(element) {
  780. var style = window.getComputedStyle(element);
  781. var transform = style.transform || style.webkitTransform;
  782. var translateY = transform.slice(7, transform.length - 1).split(', ')[5];
  783. return Number(translateY);
  784. }
  785. function isOptionDisabled(option) {
  786. return (0, _utils.isObject)(option) && option.disabled;
  787. }
  788. var _default2 = createComponent({
  789. mixins: [_touch.TouchMixin],
  790. props: {
  791. valueKey: String,
  792. readonly: Boolean,
  793. allowHtml: Boolean,
  794. className: String,
  795. itemHeight: Number,
  796. defaultIndex: Number,
  797. swipeDuration: [Number, String],
  798. visibleItemCount: [Number, String],
  799. initialOptions: {
  800. type: Array,
  801. default: function _default() {
  802. return [];
  803. }
  804. }
  805. },
  806. data: function data() {
  807. return {
  808. offset: 0,
  809. duration: 0,
  810. options: (0, _deepClone.deepClone)(this.initialOptions),
  811. currentIndex: this.defaultIndex
  812. };
  813. },
  814. created: function created() {
  815. if (this.$parent.children) {
  816. this.$parent.children.push(this);
  817. }
  818. this.setIndex(this.currentIndex);
  819. },
  820. mounted: function mounted() {
  821. this.bindTouchEvent(this.$el);
  822. },
  823. destroyed: function destroyed() {
  824. var children = this.$parent.children;
  825. if (children) {
  826. children.splice(children.indexOf(this), 1);
  827. }
  828. },
  829. watch: {
  830. initialOptions: 'setOptions',
  831. defaultIndex: function defaultIndex(val) {
  832. this.setIndex(val);
  833. }
  834. },
  835. computed: {
  836. count: function count() {
  837. return this.options.length;
  838. },
  839. baseOffset: function baseOffset() {
  840. return this.itemHeight * (this.visibleItemCount - 1) / 2;
  841. }
  842. },
  843. methods: {
  844. setOptions: function setOptions(options) {
  845. if (JSON.stringify(options) !== JSON.stringify(this.options)) {
  846. this.options = (0, _deepClone.deepClone)(options);
  847. this.setIndex(this.defaultIndex);
  848. }
  849. },
  850. onTouchStart: function onTouchStart(event) {
  851. if (this.readonly) {
  852. return;
  853. }
  854. this.touchStart(event);
  855. if (this.moving) {
  856. var translateY = getElementTranslateY(this.$refs.wrapper);
  857. this.offset = Math.min(0, translateY - this.baseOffset);
  858. this.startOffset = this.offset;
  859. } else {
  860. this.startOffset = this.offset;
  861. }
  862. this.duration = 0;
  863. this.transitionEndTrigger = null;
  864. this.touchStartTime = Date.now();
  865. this.momentumOffset = this.startOffset;
  866. },
  867. onTouchMove: function onTouchMove(event) {
  868. if (this.readonly) {
  869. return;
  870. }
  871. this.touchMove(event);
  872. if (this.direction === 'vertical') {
  873. this.moving = true;
  874. (0, _event.preventDefault)(event, true);
  875. }
  876. this.offset = (0, _number.range)(this.startOffset + this.deltaY, -(this.count * this.itemHeight), this.itemHeight);
  877. var now = Date.now();
  878. if (now - this.touchStartTime > MOMENTUM_LIMIT_TIME) {
  879. this.touchStartTime = now;
  880. this.momentumOffset = this.offset;
  881. }
  882. },
  883. onTouchEnd: function onTouchEnd() {
  884. var _this = this;
  885. if (this.readonly) {
  886. return;
  887. }
  888. var distance = this.offset - this.momentumOffset;
  889. var duration = Date.now() - this.touchStartTime;
  890. var allowMomentum = duration < MOMENTUM_LIMIT_TIME && Math.abs(distance) > MOMENTUM_LIMIT_DISTANCE;
  891. if (allowMomentum) {
  892. this.momentum(distance, duration);
  893. return;
  894. }
  895. var index = this.getIndexByOffset(this.offset);
  896. this.duration = DEFAULT_DURATION;
  897. this.setIndex(index, true); // compatible with desktop scenario
  898. // use setTimeout to skip the click event Emitted after touchstart
  899. setTimeout(function () {
  900. _this.moving = false;
  901. }, 0);
  902. },
  903. onTransitionEnd: function onTransitionEnd() {
  904. this.stopMomentum();
  905. },
  906. onClickItem: function onClickItem(index) {
  907. if (this.moving || this.readonly) {
  908. return;
  909. }
  910. this.transitionEndTrigger = null;
  911. this.duration = DEFAULT_DURATION;
  912. this.setIndex(index, true);
  913. },
  914. adjustIndex: function adjustIndex(index) {
  915. index = (0, _number.range)(index, 0, this.count);
  916. for (var i = index; i < this.count; i++) {
  917. if (!isOptionDisabled(this.options[i])) return i;
  918. }
  919. for (var _i = index - 1; _i >= 0; _i--) {
  920. if (!isOptionDisabled(this.options[_i])) return _i;
  921. }
  922. },
  923. getOptionText: function getOptionText(option) {
  924. if ((0, _utils.isObject)(option) && this.valueKey in option) {
  925. return option[this.valueKey];
  926. }
  927. return option;
  928. },
  929. setIndex: function setIndex(index, emitChange) {
  930. var _this2 = this;
  931. index = this.adjustIndex(index) || 0;
  932. var offset = -index * this.itemHeight;
  933. var trigger = function trigger() {
  934. if (index !== _this2.currentIndex) {
  935. _this2.currentIndex = index;
  936. if (emitChange) {
  937. _this2.$emit('change', index);
  938. }
  939. }
  940. }; // trigger the change event after transitionend when moving
  941. if (this.moving && offset !== this.offset) {
  942. this.transitionEndTrigger = trigger;
  943. } else {
  944. trigger();
  945. }
  946. this.offset = offset;
  947. },
  948. setValue: function setValue(value) {
  949. var options = this.options;
  950. for (var i = 0; i < options.length; i++) {
  951. if (this.getOptionText(options[i]) === value) {
  952. return this.setIndex(i);
  953. }
  954. }
  955. },
  956. getValue: function getValue() {
  957. return this.options[this.currentIndex];
  958. },
  959. getIndexByOffset: function getIndexByOffset(offset) {
  960. return (0, _number.range)(Math.round(-offset / this.itemHeight), 0, this.count - 1);
  961. },
  962. momentum: function momentum(distance, duration) {
  963. var speed = Math.abs(distance / duration);
  964. distance = this.offset + speed / 0.003 * (distance < 0 ? -1 : 1);
  965. var index = this.getIndexByOffset(distance);
  966. this.duration = +this.swipeDuration;
  967. this.setIndex(index, true);
  968. },
  969. stopMomentum: function stopMomentum() {
  970. this.moving = false;
  971. this.duration = 0;
  972. if (this.transitionEndTrigger) {
  973. this.transitionEndTrigger();
  974. this.transitionEndTrigger = null;
  975. }
  976. },
  977. genOptions: function genOptions() {
  978. var _this3 = this;
  979. var h = this.$createElement;
  980. var optionStyle = {
  981. height: this.itemHeight + "px"
  982. };
  983. return this.options.map(function (option, index) {
  984. var _domProps;
  985. var text = _this3.getOptionText(option);
  986. var disabled = isOptionDisabled(option);
  987. var data = {
  988. style: optionStyle,
  989. attrs: {
  990. role: 'button',
  991. tabindex: disabled ? -1 : 0
  992. },
  993. class: [bem('item', {
  994. disabled: disabled,
  995. selected: index === _this3.currentIndex
  996. })],
  997. on: {
  998. click: function click() {
  999. _this3.onClickItem(index);
  1000. }
  1001. }
  1002. };
  1003. var childData = {
  1004. class: 'van-ellipsis',
  1005. domProps: (_domProps = {}, _domProps[_this3.allowHtml ? 'innerHTML' : 'textContent'] = text, _domProps)
  1006. };
  1007. return h("li", (0, _babelHelperVueJsxMergeProps.default)([{}, data]), [_this3.slots('option', option) || h("div", (0, _babelHelperVueJsxMergeProps.default)([{}, childData]))]);
  1008. });
  1009. }
  1010. },
  1011. render: function render() {
  1012. var h = arguments[0];
  1013. var wrapperStyle = {
  1014. transform: "translate3d(0, " + (this.offset + this.baseOffset) + "px, 0)",
  1015. transitionDuration: this.duration + "ms",
  1016. transitionProperty: this.duration ? 'all' : 'none'
  1017. };
  1018. return h("div", {
  1019. "class": [bem(), this.className]
  1020. }, [h("ul", {
  1021. "ref": "wrapper",
  1022. "style": wrapperStyle,
  1023. "class": bem('wrapper'),
  1024. "on": {
  1025. "transitionend": this.onTransitionEnd
  1026. }
  1027. }, [this.genOptions()])]);
  1028. }
  1029. });
  1030. exports.default = _default2;
  1031. /***/ }),
  1032. /***/ 19:
  1033. /***/ (function(module, exports, __webpack_require__) {
  1034. "use strict";
  1035. exports.__esModule = true;
  1036. exports.isNumeric = isNumeric;
  1037. exports.isNaN = isNaN;
  1038. function isNumeric(val) {
  1039. return /^\d+(\.\d+)?$/.test(val);
  1040. }
  1041. function isNaN(val) {
  1042. if (Number.isNaN) {
  1043. return Number.isNaN(val);
  1044. } // eslint-disable-next-line no-self-compare
  1045. return val !== val;
  1046. }
  1047. /***/ }),
  1048. /***/ 20:
  1049. /***/ (function(module, exports, __webpack_require__) {
  1050. "use strict";
  1051. exports.__esModule = true;
  1052. exports.addUnit = addUnit;
  1053. exports.unitToPx = unitToPx;
  1054. var _ = __webpack_require__(0);
  1055. var _number = __webpack_require__(19);
  1056. function addUnit(value) {
  1057. if (!(0, _.isDef)(value)) {
  1058. return undefined;
  1059. }
  1060. value = String(value);
  1061. return (0, _number.isNumeric)(value) ? value + "px" : value;
  1062. } // cache
  1063. var rootFontSize;
  1064. function getRootFontSize() {
  1065. if (!rootFontSize) {
  1066. var doc = document.documentElement;
  1067. var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
  1068. rootFontSize = parseFloat(fontSize);
  1069. }
  1070. return rootFontSize;
  1071. }
  1072. function convertRem(value) {
  1073. value = value.replace(/rem/g, '');
  1074. return +value * getRootFontSize();
  1075. }
  1076. function convertVw(value) {
  1077. value = value.replace(/vw/g, '');
  1078. return +value * window.innerWidth / 100;
  1079. }
  1080. function convertVh(value) {
  1081. value = value.replace(/vh/g, '');
  1082. return +value * window.innerHeight / 100;
  1083. }
  1084. function unitToPx(value) {
  1085. if (typeof value === 'number') {
  1086. return value;
  1087. }
  1088. if (_.inBrowser) {
  1089. if (value.indexOf('rem') !== -1) {
  1090. return convertRem(value);
  1091. }
  1092. if (value.indexOf('vw') !== -1) {
  1093. return convertVw(value);
  1094. }
  1095. if (value.indexOf('vh') !== -1) {
  1096. return convertVh(value);
  1097. }
  1098. }
  1099. return parseFloat(value);
  1100. }
  1101. /***/ }),
  1102. /***/ 21:
  1103. /***/ (function(module, exports, __webpack_require__) {
  1104. "use strict";
  1105. exports.__esModule = true;
  1106. exports.deepAssign = deepAssign;
  1107. var _ = __webpack_require__(0);
  1108. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1109. function assignKey(to, from, key) {
  1110. var val = from[key];
  1111. if (!(0, _.isDef)(val)) {
  1112. return;
  1113. }
  1114. if (!hasOwnProperty.call(to, key) || !(0, _.isObject)(val)) {
  1115. to[key] = val;
  1116. } else {
  1117. // eslint-disable-next-line @typescript-eslint/no-use-before-define
  1118. to[key] = deepAssign(Object(to[key]), from[key]);
  1119. }
  1120. }
  1121. function deepAssign(to, from) {
  1122. Object.keys(from).forEach(function (key) {
  1123. assignKey(to, from, key);
  1124. });
  1125. return to;
  1126. }
  1127. /***/ }),
  1128. /***/ 22:
  1129. /***/ (function(module, exports, __webpack_require__) {
  1130. var content = __webpack_require__(23);
  1131. if(typeof content === 'string') content = [[module.i, content, '']];
  1132. var transform;
  1133. var insertInto;
  1134. var options = {"hmr":true}
  1135. options.transform = transform
  1136. options.insertInto = undefined;
  1137. var update = __webpack_require__(6)(content, options);
  1138. if(content.locals) module.exports = content.locals;
  1139. if(false) {}
  1140. /***/ }),
  1141. /***/ 23:
  1142. /***/ (function(module, exports, __webpack_require__) {
  1143. exports = module.exports = __webpack_require__(5)(false);
  1144. // Module
  1145. 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
  1146. /***/ }),
  1147. /***/ 24:
  1148. /***/ (function(module, exports, __webpack_require__) {
  1149. "use strict";
  1150. exports.__esModule = true;
  1151. exports.createNamespace = createNamespace;
  1152. var _bem = __webpack_require__(25);
  1153. var _component = __webpack_require__(26);
  1154. var _i18n = __webpack_require__(29);
  1155. function createNamespace(name) {
  1156. name = 'van-' + name;
  1157. return [(0, _component.createComponent)(name), (0, _bem.createBEM)(name), (0, _i18n.createI18N)(name)];
  1158. }
  1159. /***/ }),
  1160. /***/ 25:
  1161. /***/ (function(module, exports, __webpack_require__) {
  1162. "use strict";
  1163. exports.__esModule = true;
  1164. exports.createBEM = createBEM;
  1165. /**
  1166. * bem helper
  1167. * b() // 'button'
  1168. * b('text') // 'button__text'
  1169. * b({ disabled }) // 'button button--disabled'
  1170. * b('text', { disabled }) // 'button__text button__text--disabled'
  1171. * b(['disabled', 'primary']) // 'button button--disabled button--primary'
  1172. */
  1173. function gen(name, mods) {
  1174. if (!mods) {
  1175. return '';
  1176. }
  1177. if (typeof mods === 'string') {
  1178. return " " + name + "--" + mods;
  1179. }
  1180. if (Array.isArray(mods)) {
  1181. return mods.reduce(function (ret, item) {
  1182. return ret + gen(name, item);
  1183. }, '');
  1184. }
  1185. return Object.keys(mods).reduce(function (ret, key) {
  1186. return ret + (mods[key] ? gen(name, key) : '');
  1187. }, '');
  1188. }
  1189. function createBEM(name) {
  1190. return function (el, mods) {
  1191. if (el && typeof el !== 'string') {
  1192. mods = el;
  1193. el = '';
  1194. }
  1195. el = el ? name + "__" + el : name;
  1196. return "" + el + gen(el, mods);
  1197. };
  1198. }
  1199. /***/ }),
  1200. /***/ 26:
  1201. /***/ (function(module, exports, __webpack_require__) {
  1202. "use strict";
  1203. var _interopRequireDefault = __webpack_require__(1);
  1204. exports.__esModule = true;
  1205. exports.unifySlots = unifySlots;
  1206. exports.createComponent = createComponent;
  1207. __webpack_require__(11);
  1208. var _ = __webpack_require__(0);
  1209. var _string = __webpack_require__(9);
  1210. var _slots = __webpack_require__(28);
  1211. var _vue = _interopRequireDefault(__webpack_require__(4));
  1212. /**
  1213. * Create a basic component with common options
  1214. */
  1215. function install(Vue) {
  1216. var name = this.name;
  1217. Vue.component(name, this);
  1218. Vue.component((0, _string.camelize)("-" + name), this);
  1219. } // unify slots & scopedSlots
  1220. function unifySlots(context) {
  1221. // use data.scopedSlots in lower Vue version
  1222. var scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
  1223. var slots = context.slots();
  1224. Object.keys(slots).forEach(function (key) {
  1225. if (!scopedSlots[key]) {
  1226. scopedSlots[key] = function () {
  1227. return slots[key];
  1228. };
  1229. }
  1230. });
  1231. return scopedSlots;
  1232. } // should be removed after Vue 3
  1233. function transformFunctionComponent(pure) {
  1234. return {
  1235. functional: true,
  1236. props: pure.props,
  1237. model: pure.model,
  1238. render: function render(h, context) {
  1239. return pure(h, context.props, unifySlots(context), context);
  1240. }
  1241. };
  1242. }
  1243. function createComponent(name) {
  1244. return function (sfc) {
  1245. if ((0, _.isFunction)(sfc)) {
  1246. sfc = transformFunctionComponent(sfc);
  1247. }
  1248. if (!sfc.functional) {
  1249. sfc.mixins = sfc.mixins || [];
  1250. sfc.mixins.push(_slots.SlotsMixin);
  1251. }
  1252. sfc.name = name;
  1253. sfc.install = install;
  1254. return sfc;
  1255. };
  1256. }
  1257. /***/ }),
  1258. /***/ 27:
  1259. /***/ (function(module, exports, __webpack_require__) {
  1260. "use strict";
  1261. exports.__esModule = true;
  1262. exports.default = void 0;
  1263. var _default = {
  1264. name: '姓名',
  1265. tel: '电话',
  1266. save: '保存',
  1267. confirm: '确认',
  1268. cancel: '取消',
  1269. delete: '删除',
  1270. complete: '完成',
  1271. loading: '加载中...',
  1272. telEmpty: '请填写电话',
  1273. nameEmpty: '请填写姓名',
  1274. nameInvalid: '请输入正确的姓名',
  1275. confirmDelete: '确定要删除吗',
  1276. telInvalid: '请输入正确的手机号',
  1277. vanCalendar: {
  1278. end: '结束',
  1279. start: '开始',
  1280. title: '日期选择',
  1281. confirm: '确定',
  1282. startEnd: '开始/结束',
  1283. weekdays: ['日', '一', '二', '三', '四', '五', '六'],
  1284. monthTitle: function monthTitle(year, month) {
  1285. return year + "\u5E74" + month + "\u6708";
  1286. },
  1287. rangePrompt: function rangePrompt(maxRange) {
  1288. return "\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 " + maxRange + " \u5929";
  1289. }
  1290. },
  1291. vanCascader: {
  1292. select: '请选择'
  1293. },
  1294. vanContactCard: {
  1295. addText: '添加联系人'
  1296. },
  1297. vanContactList: {
  1298. addText: '新建联系人'
  1299. },
  1300. vanPagination: {
  1301. prev: '上一页',
  1302. next: '下一页'
  1303. },
  1304. vanPullRefresh: {
  1305. pulling: '下拉即可刷新...',
  1306. loosing: '释放即可刷新...'
  1307. },
  1308. vanSubmitBar: {
  1309. label: '合计:'
  1310. },
  1311. vanCoupon: {
  1312. unlimited: '无使用门槛',
  1313. discount: function discount(_discount) {
  1314. return _discount + "\u6298";
  1315. },
  1316. condition: function condition(_condition) {
  1317. return "\u6EE1" + _condition + "\u5143\u53EF\u7528";
  1318. }
  1319. },
  1320. vanCouponCell: {
  1321. title: '优惠券',
  1322. tips: '暂无可用',
  1323. count: function count(_count) {
  1324. return _count + "\u5F20\u53EF\u7528";
  1325. }
  1326. },
  1327. vanCouponList: {
  1328. empty: '暂无优惠券',
  1329. exchange: '兑换',
  1330. close: '不使用优惠券',
  1331. enable: '可用',
  1332. disabled: '不可用',
  1333. placeholder: '请输入优惠码'
  1334. },
  1335. vanAddressEdit: {
  1336. area: '地区',
  1337. postal: '邮政编码',
  1338. areaEmpty: '请选择地区',
  1339. addressEmpty: '请填写详细地址',
  1340. postalEmpty: '邮政编码格式不正确',
  1341. defaultAddress: '设为默认收货地址',
  1342. telPlaceholder: '收货人手机号',
  1343. namePlaceholder: '收货人姓名',
  1344. areaPlaceholder: '选择省 / 市 / 区'
  1345. },
  1346. vanAddressEditDetail: {
  1347. label: '详细地址',
  1348. placeholder: '街道门牌、楼层房间号等信息'
  1349. },
  1350. vanAddressList: {
  1351. add: '新增地址'
  1352. }
  1353. };
  1354. exports.default = _default;
  1355. /***/ }),
  1356. /***/ 28:
  1357. /***/ (function(module, exports, __webpack_require__) {
  1358. "use strict";
  1359. exports.__esModule = true;
  1360. exports.SlotsMixin = void 0;
  1361. /**
  1362. * Use scopedSlots in Vue 2.6+
  1363. * downgrade to slots in lower version
  1364. */
  1365. var SlotsMixin = {
  1366. methods: {
  1367. slots: function slots(name, props) {
  1368. if (name === void 0) {
  1369. name = 'default';
  1370. }
  1371. var $slots = this.$slots,
  1372. $scopedSlots = this.$scopedSlots;
  1373. var scopedSlot = $scopedSlots[name];
  1374. if (scopedSlot) {
  1375. return scopedSlot(props);
  1376. }
  1377. return $slots[name];
  1378. }
  1379. }
  1380. };
  1381. exports.SlotsMixin = SlotsMixin;
  1382. /***/ }),
  1383. /***/ 29:
  1384. /***/ (function(module, exports, __webpack_require__) {
  1385. "use strict";
  1386. var _interopRequireDefault = __webpack_require__(1);
  1387. exports.__esModule = true;
  1388. exports.createI18N = createI18N;
  1389. var _ = __webpack_require__(0);
  1390. var _string = __webpack_require__(9);
  1391. var _locale = _interopRequireDefault(__webpack_require__(11));
  1392. function createI18N(name) {
  1393. var prefix = (0, _string.camelize)(name) + '.';
  1394. return function (path) {
  1395. var messages = _locale.default.messages();
  1396. var message = (0, _.get)(messages, prefix + path) || (0, _.get)(messages, path);
  1397. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  1398. args[_key - 1] = arguments[_key];
  1399. }
  1400. return (0, _.isFunction)(message) ? message.apply(void 0, args) : message;
  1401. };
  1402. }
  1403. /***/ }),
  1404. /***/ 30:
  1405. /***/ (function(module, exports, __webpack_require__) {
  1406. "use strict";
  1407. exports.__esModule = true;
  1408. exports.on = on;
  1409. exports.off = off;
  1410. exports.stopPropagation = stopPropagation;
  1411. exports.preventDefault = preventDefault;
  1412. exports.supportsPassive = void 0;
  1413. var _ = __webpack_require__(0);
  1414. // eslint-disable-next-line import/no-mutable-exports
  1415. var supportsPassive = false;
  1416. exports.supportsPassive = supportsPassive;
  1417. if (!_.isServer) {
  1418. try {
  1419. var opts = {};
  1420. Object.defineProperty(opts, 'passive', {
  1421. // eslint-disable-next-line getter-return
  1422. get: function get() {
  1423. /* istanbul ignore next */
  1424. exports.supportsPassive = supportsPassive = true;
  1425. }
  1426. });
  1427. window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty
  1428. } catch (e) {}
  1429. }
  1430. function on(target, event, handler, passive) {
  1431. if (passive === void 0) {
  1432. passive = false;
  1433. }
  1434. if (!_.isServer) {
  1435. target.addEventListener(event, handler, supportsPassive ? {
  1436. capture: false,
  1437. passive: passive
  1438. } : false);
  1439. }
  1440. }
  1441. function off(target, event, handler) {
  1442. if (!_.isServer) {
  1443. target.removeEventListener(event, handler);
  1444. }
  1445. }
  1446. function stopPropagation(event) {
  1447. event.stopPropagation();
  1448. }
  1449. function preventDefault(event, isStopPropagation) {
  1450. /* istanbul ignore else */
  1451. if (typeof event.cancelable !== 'boolean' || event.cancelable) {
  1452. event.preventDefault();
  1453. }
  1454. if (isStopPropagation) {
  1455. stopPropagation(event);
  1456. }
  1457. }
  1458. /***/ }),
  1459. /***/ 306:
  1460. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1461. "use strict";
  1462. __webpack_require__.r(__webpack_exports__);
  1463. /* harmony import */ var _tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(142);
  1464. /* harmony import */ var _tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0__);
  1465. /* harmony import */ var _tisdesign_m_lib_picker_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(307);
  1466. /* 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__);
  1467. _tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0___default.a.name = 'm-picker';
  1468. /* harmony default export */ __webpack_exports__["default"] = (_tisdesign_m_lib_picker__WEBPACK_IMPORTED_MODULE_0___default.a);
  1469. /***/ }),
  1470. /***/ 307:
  1471. /***/ (function(module, exports, __webpack_require__) {
  1472. __webpack_require__(22);
  1473. __webpack_require__(73);
  1474. __webpack_require__(179);
  1475. /***/ }),
  1476. /***/ 4:
  1477. /***/ (function(module, exports) {
  1478. module.exports = require("vue");
  1479. /***/ }),
  1480. /***/ 5:
  1481. /***/ (function(module, exports, __webpack_require__) {
  1482. "use strict";
  1483. /*
  1484. MIT License http://www.opensource.org/licenses/mit-license.php
  1485. Author Tobias Koppers @sokra
  1486. */
  1487. // css base code, injected by the css-loader
  1488. module.exports = function (useSourceMap) {
  1489. var list = []; // return the list of modules as css string
  1490. list.toString = function toString() {
  1491. return this.map(function (item) {
  1492. var content = cssWithMappingToString(item, useSourceMap);
  1493. if (item[2]) {
  1494. return '@media ' + item[2] + '{' + content + '}';
  1495. } else {
  1496. return content;
  1497. }
  1498. }).join('');
  1499. }; // import a list of modules into the list
  1500. list.i = function (modules, mediaQuery) {
  1501. if (typeof modules === 'string') {
  1502. modules = [[null, modules, '']];
  1503. }
  1504. var alreadyImportedModules = {};
  1505. for (var i = 0; i < this.length; i++) {
  1506. var id = this[i][0];
  1507. if (id != null) {
  1508. alreadyImportedModules[id] = true;
  1509. }
  1510. }
  1511. for (i = 0; i < modules.length; i++) {
  1512. var item = modules[i]; // skip already imported module
  1513. // this implementation is not 100% perfect for weird media query combinations
  1514. // when a module is imported multiple times with different media queries.
  1515. // I hope this will never occur (Hey this way we have smaller bundles)
  1516. if (item[0] == null || !alreadyImportedModules[item[0]]) {
  1517. if (mediaQuery && !item[2]) {
  1518. item[2] = mediaQuery;
  1519. } else if (mediaQuery) {
  1520. item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
  1521. }
  1522. list.push(item);
  1523. }
  1524. }
  1525. };
  1526. return list;
  1527. };
  1528. function cssWithMappingToString(item, useSourceMap) {
  1529. var content = item[1] || '';
  1530. var cssMapping = item[3];
  1531. if (!cssMapping) {
  1532. return content;
  1533. }
  1534. if (useSourceMap && typeof btoa === 'function') {
  1535. var sourceMapping = toComment(cssMapping);
  1536. var sourceURLs = cssMapping.sources.map(function (source) {
  1537. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
  1538. });
  1539. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  1540. }
  1541. return [content].join('\n');
  1542. } // Adapted from convert-source-map (MIT)
  1543. function toComment(sourceMap) {
  1544. // eslint-disable-next-line no-undef
  1545. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  1546. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  1547. return '/*# ' + data + ' */';
  1548. }
  1549. /***/ }),
  1550. /***/ 51:
  1551. /***/ (function(module, exports, __webpack_require__) {
  1552. "use strict";
  1553. exports.__esModule = true;
  1554. exports.TouchMixin = void 0;
  1555. var _event = __webpack_require__(30);
  1556. var MIN_DISTANCE = 10;
  1557. function getDirection(x, y) {
  1558. if (x > y && x > MIN_DISTANCE) {
  1559. return 'horizontal';
  1560. }
  1561. if (y > x && y > MIN_DISTANCE) {
  1562. return 'vertical';
  1563. }
  1564. return '';
  1565. }
  1566. var TouchMixin = {
  1567. data: function data() {
  1568. return {
  1569. direction: ''
  1570. };
  1571. },
  1572. methods: {
  1573. touchStart: function touchStart(event) {
  1574. this.resetTouchStatus();
  1575. this.startX = event.touches[0].clientX;
  1576. this.startY = event.touches[0].clientY;
  1577. },
  1578. touchMove: function touchMove(event) {
  1579. var touch = event.touches[0];
  1580. this.deltaX = touch.clientX - this.startX;
  1581. this.deltaY = touch.clientY - this.startY;
  1582. this.offsetX = Math.abs(this.deltaX);
  1583. this.offsetY = Math.abs(this.deltaY);
  1584. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  1585. },
  1586. resetTouchStatus: function resetTouchStatus() {
  1587. this.direction = '';
  1588. this.deltaX = 0;
  1589. this.deltaY = 0;
  1590. this.offsetX = 0;
  1591. this.offsetY = 0;
  1592. },
  1593. // avoid Vue 2.6 event bubble issues by manually binding events
  1594. // https://github.com/youzan/vant/issues/3015
  1595. bindTouchEvent: function bindTouchEvent(el) {
  1596. var onTouchStart = this.onTouchStart,
  1597. onTouchMove = this.onTouchMove,
  1598. onTouchEnd = this.onTouchEnd;
  1599. (0, _event.on)(el, 'touchstart', onTouchStart);
  1600. (0, _event.on)(el, 'touchmove', onTouchMove);
  1601. if (onTouchEnd) {
  1602. (0, _event.on)(el, 'touchend', onTouchEnd);
  1603. (0, _event.on)(el, 'touchcancel', onTouchEnd);
  1604. }
  1605. }
  1606. }
  1607. };
  1608. exports.TouchMixin = TouchMixin;
  1609. /***/ }),
  1610. /***/ 6:
  1611. /***/ (function(module, exports, __webpack_require__) {
  1612. /*
  1613. MIT License http://www.opensource.org/licenses/mit-license.php
  1614. Author Tobias Koppers @sokra
  1615. */
  1616. var stylesInDom = {};
  1617. var memoize = function (fn) {
  1618. var memo;
  1619. return function () {
  1620. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  1621. return memo;
  1622. };
  1623. };
  1624. var isOldIE = memoize(function () {
  1625. // Test for IE <= 9 as proposed by Browserhacks
  1626. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  1627. // Tests for existence of standard globals is to allow style-loader
  1628. // to operate correctly into non-standard environments
  1629. // @see https://github.com/webpack-contrib/style-loader/issues/177
  1630. return window && document && document.all && !window.atob;
  1631. });
  1632. var getTarget = function (target, parent) {
  1633. if (parent){
  1634. return parent.querySelector(target);
  1635. }
  1636. return document.querySelector(target);
  1637. };
  1638. var getElement = (function (fn) {
  1639. var memo = {};
  1640. return function(target, parent) {
  1641. // If passing function in options, then use it for resolve "head" element.
  1642. // Useful for Shadow Root style i.e
  1643. // {
  1644. // insertInto: function () { return document.querySelector("#foo").shadowRoot }
  1645. // }
  1646. if (typeof target === 'function') {
  1647. return target();
  1648. }
  1649. if (typeof memo[target] === "undefined") {
  1650. var styleTarget = getTarget.call(this, target, parent);
  1651. // Special case to return head of iframe instead of iframe itself
  1652. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  1653. try {
  1654. // This will throw an exception if access to iframe is blocked
  1655. // due to cross-origin restrictions
  1656. styleTarget = styleTarget.contentDocument.head;
  1657. } catch(e) {
  1658. styleTarget = null;
  1659. }
  1660. }
  1661. memo[target] = styleTarget;
  1662. }
  1663. return memo[target]
  1664. };
  1665. })();
  1666. var singleton = null;
  1667. var singletonCounter = 0;
  1668. var stylesInsertedAtTop = [];
  1669. var fixUrls = __webpack_require__(12);
  1670. module.exports = function(list, options) {
  1671. if (typeof DEBUG !== "undefined" && DEBUG) {
  1672. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  1673. }
  1674. options = options || {};
  1675. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  1676. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  1677. // tags it will allow on a page
  1678. if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
  1679. // By default, add <style> tags to the <head> element
  1680. if (!options.insertInto) options.insertInto = "head";
  1681. // By default, add <style> tags to the bottom of the target
  1682. if (!options.insertAt) options.insertAt = "bottom";
  1683. var styles = listToStyles(list, options);
  1684. addStylesToDom(styles, options);
  1685. return function update (newList) {
  1686. var mayRemove = [];
  1687. for (var i = 0; i < styles.length; i++) {
  1688. var item = styles[i];
  1689. var domStyle = stylesInDom[item.id];
  1690. domStyle.refs--;
  1691. mayRemove.push(domStyle);
  1692. }
  1693. if(newList) {
  1694. var newStyles = listToStyles(newList, options);
  1695. addStylesToDom(newStyles, options);
  1696. }
  1697. for (var i = 0; i < mayRemove.length; i++) {
  1698. var domStyle = mayRemove[i];
  1699. if(domStyle.refs === 0) {
  1700. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  1701. delete stylesInDom[domStyle.id];
  1702. }
  1703. }
  1704. };
  1705. };
  1706. function addStylesToDom (styles, options) {
  1707. for (var i = 0; i < styles.length; i++) {
  1708. var item = styles[i];
  1709. var domStyle = stylesInDom[item.id];
  1710. if(domStyle) {
  1711. domStyle.refs++;
  1712. for(var j = 0; j < domStyle.parts.length; j++) {
  1713. domStyle.parts[j](item.parts[j]);
  1714. }
  1715. for(; j < item.parts.length; j++) {
  1716. domStyle.parts.push(addStyle(item.parts[j], options));
  1717. }
  1718. } else {
  1719. var parts = [];
  1720. for(var j = 0; j < item.parts.length; j++) {
  1721. parts.push(addStyle(item.parts[j], options));
  1722. }
  1723. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  1724. }
  1725. }
  1726. }
  1727. function listToStyles (list, options) {
  1728. var styles = [];
  1729. var newStyles = {};
  1730. for (var i = 0; i < list.length; i++) {
  1731. var item = list[i];
  1732. var id = options.base ? item[0] + options.base : item[0];
  1733. var css = item[1];
  1734. var media = item[2];
  1735. var sourceMap = item[3];
  1736. var part = {css: css, media: media, sourceMap: sourceMap};
  1737. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  1738. else newStyles[id].parts.push(part);
  1739. }
  1740. return styles;
  1741. }
  1742. function insertStyleElement (options, style) {
  1743. var target = getElement(options.insertInto)
  1744. if (!target) {
  1745. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  1746. }
  1747. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  1748. if (options.insertAt === "top") {
  1749. if (!lastStyleElementInsertedAtTop) {
  1750. target.insertBefore(style, target.firstChild);
  1751. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  1752. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  1753. } else {
  1754. target.appendChild(style);
  1755. }
  1756. stylesInsertedAtTop.push(style);
  1757. } else if (options.insertAt === "bottom") {
  1758. target.appendChild(style);
  1759. } else if (typeof options.insertAt === "object" && options.insertAt.before) {
  1760. var nextSibling = getElement(options.insertAt.before, target);
  1761. target.insertBefore(style, nextSibling);
  1762. } else {
  1763. 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");
  1764. }
  1765. }
  1766. function removeStyleElement (style) {
  1767. if (style.parentNode === null) return false;
  1768. style.parentNode.removeChild(style);
  1769. var idx = stylesInsertedAtTop.indexOf(style);
  1770. if(idx >= 0) {
  1771. stylesInsertedAtTop.splice(idx, 1);
  1772. }
  1773. }
  1774. function createStyleElement (options) {
  1775. var style = document.createElement("style");
  1776. if(options.attrs.type === undefined) {
  1777. options.attrs.type = "text/css";
  1778. }
  1779. if(options.attrs.nonce === undefined) {
  1780. var nonce = getNonce();
  1781. if (nonce) {
  1782. options.attrs.nonce = nonce;
  1783. }
  1784. }
  1785. addAttrs(style, options.attrs);
  1786. insertStyleElement(options, style);
  1787. return style;
  1788. }
  1789. function createLinkElement (options) {
  1790. var link = document.createElement("link");
  1791. if(options.attrs.type === undefined) {
  1792. options.attrs.type = "text/css";
  1793. }
  1794. options.attrs.rel = "stylesheet";
  1795. addAttrs(link, options.attrs);
  1796. insertStyleElement(options, link);
  1797. return link;
  1798. }
  1799. function addAttrs (el, attrs) {
  1800. Object.keys(attrs).forEach(function (key) {
  1801. el.setAttribute(key, attrs[key]);
  1802. });
  1803. }
  1804. function getNonce() {
  1805. if (false) {}
  1806. return __webpack_require__.nc;
  1807. }
  1808. function addStyle (obj, options) {
  1809. var style, update, remove, result;
  1810. // If a transform function was defined, run it on the css
  1811. if (options.transform && obj.css) {
  1812. result = typeof options.transform === 'function'
  1813. ? options.transform(obj.css)
  1814. : options.transform.default(obj.css);
  1815. if (result) {
  1816. // If transform returns a value, use that instead of the original css.
  1817. // This allows running runtime transformations on the css.
  1818. obj.css = result;
  1819. } else {
  1820. // If the transform function returns a falsy value, don't add this css.
  1821. // This allows conditional loading of css
  1822. return function() {
  1823. // noop
  1824. };
  1825. }
  1826. }
  1827. if (options.singleton) {
  1828. var styleIndex = singletonCounter++;
  1829. style = singleton || (singleton = createStyleElement(options));
  1830. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  1831. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  1832. } else if (
  1833. obj.sourceMap &&
  1834. typeof URL === "function" &&
  1835. typeof URL.createObjectURL === "function" &&
  1836. typeof URL.revokeObjectURL === "function" &&
  1837. typeof Blob === "function" &&
  1838. typeof btoa === "function"
  1839. ) {
  1840. style = createLinkElement(options);
  1841. update = updateLink.bind(null, style, options);
  1842. remove = function () {
  1843. removeStyleElement(style);
  1844. if(style.href) URL.revokeObjectURL(style.href);
  1845. };
  1846. } else {
  1847. style = createStyleElement(options);
  1848. update = applyToTag.bind(null, style);
  1849. remove = function () {
  1850. removeStyleElement(style);
  1851. };
  1852. }
  1853. update(obj);
  1854. return function updateStyle (newObj) {
  1855. if (newObj) {
  1856. if (
  1857. newObj.css === obj.css &&
  1858. newObj.media === obj.media &&
  1859. newObj.sourceMap === obj.sourceMap
  1860. ) {
  1861. return;
  1862. }
  1863. update(obj = newObj);
  1864. } else {
  1865. remove();
  1866. }
  1867. };
  1868. }
  1869. var replaceText = (function () {
  1870. var textStore = [];
  1871. return function (index, replacement) {
  1872. textStore[index] = replacement;
  1873. return textStore.filter(Boolean).join('\n');
  1874. };
  1875. })();
  1876. function applyToSingletonTag (style, index, remove, obj) {
  1877. var css = remove ? "" : obj.css;
  1878. if (style.styleSheet) {
  1879. style.styleSheet.cssText = replaceText(index, css);
  1880. } else {
  1881. var cssNode = document.createTextNode(css);
  1882. var childNodes = style.childNodes;
  1883. if (childNodes[index]) style.removeChild(childNodes[index]);
  1884. if (childNodes.length) {
  1885. style.insertBefore(cssNode, childNodes[index]);
  1886. } else {
  1887. style.appendChild(cssNode);
  1888. }
  1889. }
  1890. }
  1891. function applyToTag (style, obj) {
  1892. var css = obj.css;
  1893. var media = obj.media;
  1894. if(media) {
  1895. style.setAttribute("media", media)
  1896. }
  1897. if(style.styleSheet) {
  1898. style.styleSheet.cssText = css;
  1899. } else {
  1900. while(style.firstChild) {
  1901. style.removeChild(style.firstChild);
  1902. }
  1903. style.appendChild(document.createTextNode(css));
  1904. }
  1905. }
  1906. function updateLink (link, options, obj) {
  1907. var css = obj.css;
  1908. var sourceMap = obj.sourceMap;
  1909. /*
  1910. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  1911. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  1912. on by default. Otherwise default to the convertToAbsoluteUrls option
  1913. directly
  1914. */
  1915. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  1916. if (options.convertToAbsoluteUrls || autoFixUrls) {
  1917. css = fixUrls(css);
  1918. }
  1919. if (sourceMap) {
  1920. // http://stackoverflow.com/a/26603875
  1921. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  1922. }
  1923. var blob = new Blob([css], { type: "text/css" });
  1924. var oldSrc = link.href;
  1925. link.href = URL.createObjectURL(blob);
  1926. if(oldSrc) URL.revokeObjectURL(oldSrc);
  1927. }
  1928. /***/ }),
  1929. /***/ 63:
  1930. /***/ (function(module, exports, __webpack_require__) {
  1931. "use strict";
  1932. exports.__esModule = true;
  1933. 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;
  1934. // color
  1935. var RED = '#ee0a24'; // border
  1936. exports.RED = RED;
  1937. var BORDER = 'van-hairline';
  1938. exports.BORDER = BORDER;
  1939. var BORDER_TOP = BORDER + "--top";
  1940. exports.BORDER_TOP = BORDER_TOP;
  1941. var BORDER_LEFT = BORDER + "--left";
  1942. exports.BORDER_LEFT = BORDER_LEFT;
  1943. var BORDER_BOTTOM = BORDER + "--bottom";
  1944. exports.BORDER_BOTTOM = BORDER_BOTTOM;
  1945. var BORDER_SURROUND = BORDER + "--surround";
  1946. exports.BORDER_SURROUND = BORDER_SURROUND;
  1947. var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
  1948. exports.BORDER_TOP_BOTTOM = BORDER_TOP_BOTTOM;
  1949. var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
  1950. exports.BORDER_UNSET_TOP_BOTTOM = BORDER_UNSET_TOP_BOTTOM;
  1951. /***/ }),
  1952. /***/ 71:
  1953. /***/ (function(module, exports, __webpack_require__) {
  1954. "use strict";
  1955. var _interopRequireDefault = __webpack_require__(1);
  1956. exports.__esModule = true;
  1957. exports.default = void 0;
  1958. var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  1959. var _utils = __webpack_require__(0);
  1960. var _functional = __webpack_require__(14);
  1961. // Utils
  1962. var _createNamespace = (0, _utils.createNamespace)('loading'),
  1963. createComponent = _createNamespace[0],
  1964. bem = _createNamespace[1];
  1965. function LoadingIcon(h, props) {
  1966. if (props.type === 'spinner') {
  1967. var Spin = [];
  1968. for (var i = 0; i < 12; i++) {
  1969. Spin.push(h("i"));
  1970. }
  1971. return Spin;
  1972. }
  1973. return h("svg", {
  1974. "class": bem('circular'),
  1975. "attrs": {
  1976. "viewBox": "25 25 50 50"
  1977. }
  1978. }, [h("circle", {
  1979. "attrs": {
  1980. "cx": "50",
  1981. "cy": "50",
  1982. "r": "20",
  1983. "fill": "none"
  1984. }
  1985. })]);
  1986. }
  1987. function LoadingText(h, props, slots) {
  1988. if (slots.default) {
  1989. var _props$textColor;
  1990. var style = {
  1991. fontSize: (0, _utils.addUnit)(props.textSize),
  1992. color: (_props$textColor = props.textColor) != null ? _props$textColor : props.color
  1993. };
  1994. return h("span", {
  1995. "class": bem('text'),
  1996. "style": style
  1997. }, [slots.default()]);
  1998. }
  1999. }
  2000. function Loading(h, props, slots, ctx) {
  2001. var color = props.color,
  2002. size = props.size,
  2003. type = props.type;
  2004. var style = {
  2005. color: color
  2006. };
  2007. if (size) {
  2008. var iconSize = (0, _utils.addUnit)(size);
  2009. style.width = iconSize;
  2010. style.height = iconSize;
  2011. }
  2012. return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
  2013. "class": bem([type, {
  2014. vertical: props.vertical
  2015. }])
  2016. }, (0, _functional.inherit)(ctx, true)]), [h("span", {
  2017. "class": bem('spinner', type),
  2018. "style": style
  2019. }, [LoadingIcon(h, props)]), LoadingText(h, props, slots)]);
  2020. }
  2021. Loading.props = {
  2022. color: String,
  2023. size: [Number, String],
  2024. vertical: Boolean,
  2025. textSize: [Number, String],
  2026. textColor: String,
  2027. type: {
  2028. type: String,
  2029. default: 'circular'
  2030. }
  2031. };
  2032. var _default = createComponent(Loading);
  2033. exports.default = _default;
  2034. /***/ }),
  2035. /***/ 73:
  2036. /***/ (function(module, exports, __webpack_require__) {
  2037. var content = __webpack_require__(74);
  2038. if(typeof content === 'string') content = [[module.i, content, '']];
  2039. var transform;
  2040. var insertInto;
  2041. var options = {"hmr":true}
  2042. options.transform = transform
  2043. options.insertInto = undefined;
  2044. var update = __webpack_require__(6)(content, options);
  2045. if(content.locals) module.exports = content.locals;
  2046. if(false) {}
  2047. /***/ }),
  2048. /***/ 74:
  2049. /***/ (function(module, exports, __webpack_require__) {
  2050. exports = module.exports = __webpack_require__(5)(false);
  2051. // Module
  2052. 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}", ""]);
  2053. /***/ }),
  2054. /***/ 81:
  2055. /***/ (function(module, exports, __webpack_require__) {
  2056. "use strict";
  2057. exports.__esModule = true;
  2058. exports.range = range;
  2059. exports.formatNumber = formatNumber;
  2060. function range(num, min, max) {
  2061. return Math.min(Math.max(num, min), max);
  2062. }
  2063. function trimExtraChar(value, _char, regExp) {
  2064. var index = value.indexOf(_char);
  2065. if (index === -1) {
  2066. return value;
  2067. }
  2068. if (_char === '-' && index !== 0) {
  2069. return value.slice(0, index);
  2070. }
  2071. return value.slice(0, index + 1) + value.slice(index).replace(regExp, '');
  2072. }
  2073. function formatNumber(value, allowDot, allowMinus) {
  2074. if (allowDot === void 0) {
  2075. allowDot = true;
  2076. }
  2077. if (allowMinus === void 0) {
  2078. allowMinus = true;
  2079. }
  2080. if (allowDot) {
  2081. value = trimExtraChar(value, '.', /\./g);
  2082. } else {
  2083. value = value.split('.')[0];
  2084. }
  2085. if (allowMinus) {
  2086. value = trimExtraChar(value, '-', /-/g);
  2087. } else {
  2088. value = value.replace(/-/, '');
  2089. }
  2090. var regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
  2091. return value.replace(regExp, '');
  2092. }
  2093. /***/ }),
  2094. /***/ 9:
  2095. /***/ (function(module, exports, __webpack_require__) {
  2096. "use strict";
  2097. exports.__esModule = true;
  2098. exports.camelize = camelize;
  2099. exports.padZero = padZero;
  2100. var camelizeRE = /-(\w)/g;
  2101. function camelize(str) {
  2102. return str.replace(camelizeRE, function (_, c) {
  2103. return c.toUpperCase();
  2104. });
  2105. }
  2106. function padZero(num, targetLength) {
  2107. if (targetLength === void 0) {
  2108. targetLength = 2;
  2109. }
  2110. var str = num + '';
  2111. while (str.length < targetLength) {
  2112. str = '0' + str;
  2113. }
  2114. return str;
  2115. }
  2116. /***/ })
  2117. /******/ });