cy-element-ui 1.0.49 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/lib/alert.js +108 -108
  2. package/lib/aside.js +77 -77
  3. package/lib/autocomplete.js +359 -5198
  4. package/lib/avatar.js +4 -4
  5. package/lib/backtop.js +101 -192
  6. package/lib/badge.js +108 -108
  7. package/lib/breadcrumb-item.js +108 -108
  8. package/lib/breadcrumb.js +94 -94
  9. package/lib/button-group.js +4 -4
  10. package/lib/button.js +4 -4
  11. package/lib/calendar.js +137 -1734
  12. package/lib/card.js +96 -96
  13. package/lib/carousel-item.js +108 -452
  14. package/lib/carousel.js +105 -1256
  15. package/lib/cascader-panel.js +191 -3524
  16. package/lib/cascader.js +709 -8069
  17. package/lib/checkbox-button.js +119 -151
  18. package/lib/checkbox-group.js +15 -47
  19. package/lib/checkbox.js +15 -47
  20. package/lib/col.js +2 -2
  21. package/lib/collapse-item.js +110 -815
  22. package/lib/collapse.js +108 -108
  23. package/lib/color-picker.js +835 -4712
  24. package/lib/container.js +88 -88
  25. package/lib/date-picker.js +4596 -10622
  26. package/lib/descriptions-item.js +2 -2
  27. package/lib/descriptions.js +8 -63
  28. package/lib/dialog.js +22 -1200
  29. package/lib/divider.js +104 -104
  30. package/lib/drawer.js +105 -875
  31. package/lib/dropdown-item.js +96 -128
  32. package/lib/dropdown-menu.js +99 -2301
  33. package/lib/dropdown.js +54 -990
  34. package/lib/element-ui.common.js +29758 -47436
  35. package/lib/empty.js +99 -793
  36. package/lib/fileUpload.js +25 -2541
  37. package/lib/footer.js +77 -77
  38. package/lib/form-item.js +208 -3311
  39. package/lib/form.js +115 -129
  40. package/lib/header.js +77 -77
  41. package/lib/icon.js +67 -67
  42. package/lib/image.js +146 -1662
  43. package/lib/index.js +1 -1
  44. package/lib/infinite-scroll.js +26 -435
  45. package/lib/input-number.js +24 -1458
  46. package/lib/input.js +37 -509
  47. package/lib/link.js +4 -4
  48. package/lib/loading.js +149 -886
  49. package/lib/main.js +64 -64
  50. package/lib/menu-item-group.js +103 -103
  51. package/lib/menu-item.js +137 -3140
  52. package/lib/menu.js +123 -1058
  53. package/lib/message-box.js +179 -2734
  54. package/lib/message.js +118 -1196
  55. package/lib/notification.js +118 -1195
  56. package/lib/option-group.js +119 -151
  57. package/lib/option.js +16 -392
  58. package/lib/page-header.js +87 -781
  59. package/lib/pagination.js +642 -7743
  60. package/lib/popconfirm.js +219 -3606
  61. package/lib/popover.js +99 -2624
  62. package/lib/progress.js +4 -4
  63. package/lib/radio-button.js +119 -151
  64. package/lib/radio-group.js +119 -151
  65. package/lib/radio.js +15 -47
  66. package/lib/rate.js +113 -756
  67. package/lib/result.js +108 -108
  68. package/lib/row.js +2 -2
  69. package/lib/scrollbar.js +41 -1813
  70. package/lib/select.js +209 -5547
  71. package/lib/selectDisplayInput.js +4 -4
  72. package/lib/skeleton-item.js +108 -108
  73. package/lib/skeleton.js +108 -108
  74. package/lib/slider.js +815 -5053
  75. package/lib/spinner.js +100 -100
  76. package/lib/statistic.js +112 -9600
  77. package/lib/step.js +108 -108
  78. package/lib/steps.js +99 -514
  79. package/lib/subTitle.js +91 -91
  80. package/lib/submenu.js +76 -2397
  81. package/lib/switch.js +127 -582
  82. package/lib/tab-pane.js +108 -108
  83. package/lib/tabDialog.js +104 -1630
  84. package/lib/table-column.js +267 -1115
  85. package/lib/table.js +1289 -7121
  86. package/lib/tabs.js +113 -1615
  87. package/lib/tag.js +4 -4
  88. package/lib/time-picker.js +554 -6491
  89. package/lib/time-select.js +407 -6334
  90. package/lib/timeline-item.js +108 -108
  91. package/lib/timeline.js +4 -4
  92. package/lib/tooltip.js +44 -2688
  93. package/lib/transfer.js +146 -2238
  94. package/lib/tree.js +148 -1563
  95. package/lib/treeSelect.js +106 -3421
  96. package/lib/upload.js +31 -1198
  97. package/package.json +1 -1
  98. package/src/index.js +1 -1
package/lib/image.js CHANGED
@@ -82,527 +82,159 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 146);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 71);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
90
  /***/ 0:
91
- /***/ (function(module, exports) {
92
-
93
- module.exports = require("vue");
94
-
95
- /***/ }),
96
-
97
- /***/ 1:
98
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
92
 
100
93
  "use strict";
101
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
102
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
103
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
104
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
105
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
106
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
107
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
108
- /* unused harmony export setStyle */
109
- /* unused harmony export isScroll */
110
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
111
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
112
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
113
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
114
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
115
-
116
- /* istanbul ignore next */
117
-
118
-
119
-
120
- var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
121
- var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
122
- var MOZ_HACK_REGEXP = /^moz([A-Z])/;
123
- var ieVersion = isServer ? 0 : Number(document.documentMode);
124
-
125
- /* istanbul ignore next */
126
- var trim = function trim(string) {
127
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
128
- };
129
- /* istanbul ignore next */
130
- var camelCase = function camelCase(name) {
131
- return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
132
- return offset ? letter.toUpperCase() : letter;
133
- }).replace(MOZ_HACK_REGEXP, 'Moz$1');
134
- };
135
-
136
- /* istanbul ignore next */
137
- var on = function () {
138
- if (!isServer && document.addEventListener) {
139
- return function (element, event, handler) {
140
- if (element && event && handler) {
141
- element.addEventListener(event, handler, false);
142
- }
143
- };
144
- } else {
145
- return function (element, event, handler) {
146
- if (element && event && handler) {
147
- element.attachEvent('on' + event, handler);
148
- }
149
- };
150
- }
151
- }();
152
-
153
- /* istanbul ignore next */
154
- var off = function () {
155
- if (!isServer && document.removeEventListener) {
156
- return function (element, event, handler) {
157
- if (element && event) {
158
- element.removeEventListener(event, handler, false);
159
- }
160
- };
161
- } else {
162
- return function (element, event, handler) {
163
- if (element && event) {
164
- element.detachEvent('on' + event, handler);
165
- }
166
- };
167
- }
168
- }();
169
-
170
- /* istanbul ignore next */
171
- var once = function once(el, event, fn) {
172
- var listener = function listener() {
173
- if (fn) {
174
- fn.apply(this, arguments);
175
- }
176
- off(el, event, listener);
177
- };
178
- on(el, event, listener);
179
- };
180
-
181
- /* istanbul ignore next */
182
- function hasClass(el, cls) {
183
- if (!el || !cls) return false;
184
- if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
185
- if (el.classList) {
186
- return el.classList.contains(cls);
187
- } else {
188
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
189
- }
190
- };
191
-
192
- /* istanbul ignore next */
193
- function addClass(el, cls) {
194
- if (!el) return;
195
- var curClass = el.className;
196
- var classes = (cls || '').split(' ');
197
-
198
- for (var i = 0, j = classes.length; i < j; i++) {
199
- var clsName = classes[i];
200
- if (!clsName) continue;
201
-
202
- if (el.classList) {
203
- el.classList.add(clsName);
204
- } else if (!hasClass(el, clsName)) {
205
- curClass += ' ' + clsName;
206
- }
207
- }
208
- if (!el.classList) {
209
- el.setAttribute('class', curClass);
210
- }
211
- };
212
-
213
- /* istanbul ignore next */
214
- function removeClass(el, cls) {
215
- if (!el || !cls) return;
216
- var classes = cls.split(' ');
217
- var curClass = ' ' + el.className + ' ';
218
-
219
- for (var i = 0, j = classes.length; i < j; i++) {
220
- var clsName = classes[i];
221
- if (!clsName) continue;
222
-
223
- if (el.classList) {
224
- el.classList.remove(clsName);
225
- } else if (hasClass(el, clsName)) {
226
- curClass = curClass.replace(' ' + clsName + ' ', ' ');
227
- }
228
- }
229
- if (!el.classList) {
230
- el.setAttribute('class', trim(curClass));
231
- }
232
- };
233
-
234
- /* istanbul ignore next */
235
- var getStyle = ieVersion < 9 ? function (element, styleName) {
236
- if (isServer) return;
237
- if (!element || !styleName) return null;
238
- styleName = camelCase(styleName);
239
- if (styleName === 'float') {
240
- styleName = 'styleFloat';
241
- }
242
- try {
243
- switch (styleName) {
244
- case 'opacity':
245
- try {
246
- return element.filters.item('alpha').opacity / 100;
247
- } catch (e) {
248
- return 1.0;
249
- }
250
- default:
251
- return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
252
- }
253
- } catch (e) {
254
- return element.style[styleName];
255
- }
256
- } : function (element, styleName) {
257
- if (isServer) return;
258
- if (!element || !styleName) return null;
259
- styleName = camelCase(styleName);
260
- if (styleName === 'float') {
261
- styleName = 'cssFloat';
262
- }
263
- try {
264
- var computed = document.defaultView.getComputedStyle(element, '');
265
- return element.style[styleName] || computed ? computed[styleName] : null;
266
- } catch (e) {
267
- return element.style[styleName];
268
- }
269
- };
270
-
271
- /* istanbul ignore next */
272
- function setStyle(element, styleName, value) {
273
- if (!element || !styleName) return;
274
-
275
- if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
276
- for (var prop in styleName) {
277
- if (styleName.hasOwnProperty(prop)) {
278
- setStyle(element, prop, styleName[prop]);
279
- }
280
- }
281
- } else {
282
- styleName = camelCase(styleName);
283
- if (styleName === 'opacity' && ieVersion < 9) {
284
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
285
- } else {
286
- element.style[styleName] = value;
287
- }
288
- }
289
- };
290
-
291
- var isScroll = function isScroll(el, vertical) {
292
- if (isServer) return;
94
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
+ /* globals __VUE_SSR_CONTEXT__ */
293
96
 
294
- var determinedDirection = vertical !== null && vertical !== undefined;
295
- var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
97
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
+ // This module is a runtime utility for cleaner component module output and will
99
+ // be included in the final webpack user bundle.
296
100
 
297
- return overflow.match(/(scroll|auto|overlay)/);
298
- };
101
+ function normalizeComponent(
102
+ scriptExports,
103
+ render,
104
+ staticRenderFns,
105
+ functionalTemplate,
106
+ injectStyles,
107
+ scopeId,
108
+ moduleIdentifier /* server only */,
109
+ shadowMode /* vue-cli only */
110
+ ) {
111
+ // Vue.extend constructor export interop
112
+ var options =
113
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
299
114
 
300
- var getScrollContainer = function getScrollContainer(el, vertical) {
301
- if (isServer) return;
115
+ // render functions
116
+ if (render) {
117
+ options.render = render
118
+ options.staticRenderFns = staticRenderFns
119
+ options._compiled = true
120
+ }
302
121
 
303
- var parent = el;
304
- while (parent) {
305
- if ([window, document, document.documentElement].includes(parent)) {
306
- return window;
307
- }
308
- if (isScroll(parent, vertical)) {
309
- return parent;
310
- }
311
- parent = parent.parentNode;
312
- }
122
+ // functional template
123
+ if (functionalTemplate) {
124
+ options.functional = true
125
+ }
313
126
 
314
- return parent;
315
- };
127
+ // scopedId
128
+ if (scopeId) {
129
+ options._scopeId = 'data-v-' + scopeId
130
+ }
316
131
 
317
- var isInContainer = function isInContainer(el, container) {
318
- if (isServer || !el || !container) return false;
132
+ var hook
133
+ if (moduleIdentifier) {
134
+ // server build
135
+ hook = function (context) {
136
+ // 2.3 injection
137
+ context =
138
+ context || // cached call
139
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
140
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
141
+ // 2.2 with runInNewContext: true
142
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
143
+ context = __VUE_SSR_CONTEXT__
144
+ }
145
+ // inject component styles
146
+ if (injectStyles) {
147
+ injectStyles.call(this, context)
148
+ }
149
+ // register component module identifier for async chunk inferrence
150
+ if (context && context._registeredComponents) {
151
+ context._registeredComponents.add(moduleIdentifier)
152
+ }
153
+ }
154
+ // used by ssr in case component is cached and beforeCreate
155
+ // never gets called
156
+ options._ssrRegister = hook
157
+ } else if (injectStyles) {
158
+ hook = shadowMode
159
+ ? function () {
160
+ injectStyles.call(
161
+ this,
162
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
163
+ )
164
+ }
165
+ : injectStyles
166
+ }
319
167
 
320
- var elRect = el.getBoundingClientRect();
321
- var containerRect = void 0;
168
+ if (hook) {
169
+ if (options.functional) {
170
+ // for template-only hot-reload because in that case the render fn doesn't
171
+ // go through the normalizer
172
+ options._injectStyles = hook
173
+ // register for functional component in vue file
174
+ var originalRender = options.render
175
+ options.render = function renderWithStyleInjection(h, context) {
176
+ hook.call(context)
177
+ return originalRender(h, context)
178
+ }
179
+ } else {
180
+ // inject component registration as beforeCreate hook
181
+ var existing = options.beforeCreate
182
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
183
+ }
184
+ }
322
185
 
323
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
324
- containerRect = {
325
- top: 0,
326
- right: window.innerWidth,
327
- bottom: window.innerHeight,
328
- left: 0
329
- };
330
- } else {
331
- containerRect = container.getBoundingClientRect();
332
- }
186
+ return {
187
+ exports: scriptExports,
188
+ options: options
189
+ }
190
+ }
333
191
 
334
- return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
335
- };
336
192
 
337
193
  /***/ }),
338
194
 
339
- /***/ 11:
340
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
341
-
342
- "use strict";
343
-
344
- // EXPORTS
345
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ t; });
346
-
347
- // UNUSED EXPORTS: use, i18n
348
-
349
- // CONCATENATED MODULE: ./src/locale/lang/zh-CN.js
350
- /* harmony default export */ var zh_CN = ({
351
- el: {
352
- colorpicker: {
353
- confirm: '确定',
354
- clear: '清空'
355
- },
356
- datepicker: {
357
- now: '此刻',
358
- today: '今天',
359
- cancel: '取消',
360
- clear: '清空',
361
- confirm: '确定',
362
- selectDate: '选择日期',
363
- selectTime: '选择时间',
364
- startDate: '开始日期',
365
- startTime: '开始时间',
366
- endDate: '结束日期',
367
- endTime: '结束时间',
368
- prevYear: '前一年',
369
- nextYear: '后一年',
370
- prevMonth: '上个月',
371
- nextMonth: '下个月',
372
- year: '年',
373
- month1: '1 月',
374
- month2: '2 月',
375
- month3: '3 月',
376
- month4: '4 月',
377
- month5: '5 月',
378
- month6: '6 月',
379
- month7: '7 月',
380
- month8: '8 月',
381
- month9: '9 月',
382
- month10: '10 月',
383
- month11: '11 月',
384
- month12: '12 月',
385
- // week: '周次',
386
- weeks: {
387
- sun: '日',
388
- mon: '一',
389
- tue: '二',
390
- wed: '三',
391
- thu: '四',
392
- fri: '五',
393
- sat: '六'
394
- },
395
- months: {
396
- jan: '一月',
397
- feb: '二月',
398
- mar: '三月',
399
- apr: '四月',
400
- may: '五月',
401
- jun: '六月',
402
- jul: '七月',
403
- aug: '八月',
404
- sep: '九月',
405
- oct: '十月',
406
- nov: '十一月',
407
- dec: '十二月'
408
- }
409
- },
410
- select: {
411
- loading: '加载中',
412
- noMatch: '无匹配数据',
413
- noData: '无数据',
414
- placeholder: '请选择'
415
- },
416
- cascader: {
417
- noMatch: '无匹配数据',
418
- loading: '加载中',
419
- placeholder: '请选择',
420
- noData: '暂无数据'
421
- },
422
- pagination: {
423
- goto: '前往',
424
- pagesize: '条/页',
425
- total: '共 {total} 条',
426
- pageClassifier: '页'
427
- },
428
- messagebox: {
429
- title: '提示',
430
- confirm: '确定',
431
- cancel: '取消',
432
- error: '输入的数据不合法!'
433
- },
434
- upload: {
435
- deleteTip: '按 delete 键可删除',
436
- delete: '删除',
437
- preview: '查看图片',
438
- continue: '继续上传'
439
- },
440
- table: {
441
- emptyText: '暂无数据',
442
- confirmFilter: '筛选',
443
- resetFilter: '重置',
444
- clearFilter: '全部',
445
- sumText: '合计'
446
- },
447
- tree: {
448
- emptyText: '暂无数据'
449
- },
450
- transfer: {
451
- noMatch: '无匹配数据',
452
- noData: '无数据',
453
- titles: ['列表 1', '列表 2'],
454
- filterPlaceholder: '请输入搜索内容',
455
- noCheckedFormat: '共 {total} 项',
456
- hasCheckedFormat: '已选 {checked}/{total} 项'
457
- },
458
- image: {
459
- error: '加载失败'
460
- },
461
- pageHeader: {
462
- title: '返回'
463
- },
464
- popconfirm: {
465
- confirmButtonText: '确定',
466
- cancelButtonText: '取消'
467
- },
468
- empty: {
469
- description: '暂无数据'
470
- }
471
- }
472
- });
473
- // EXTERNAL MODULE: external "vue"
474
- var external_vue_ = __webpack_require__(0);
475
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
476
-
477
- // EXTERNAL MODULE: ./node_modules/deepmerge/dist/cjs.js
478
- var cjs = __webpack_require__(15);
479
- var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
480
-
481
- // EXTERNAL MODULE: ./src/utils/util.js
482
- var util = __webpack_require__(3);
483
-
484
- // CONCATENATED MODULE: ./src/locale/format.js
485
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
486
-
487
-
488
-
489
- var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
490
- /**
491
- * String format template
492
- * - Inspired:
493
- * https://github.com/Matt-Esch/string-template/index.js
494
- */
495
- /* harmony default export */ var format = (function (Vue) {
496
- /**
497
- * template
498
- *
499
- * @param {String} string
500
- * @param {Array} ...args
501
- * @return {String}
502
- */
503
-
504
- function template(string) {
505
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
506
- args[_key - 1] = arguments[_key];
507
- }
508
-
509
- if (args.length === 1 && _typeof(args[0]) === 'object') {
510
- args = args[0];
511
- }
512
-
513
- if (!args || !args.hasOwnProperty) {
514
- args = {};
515
- }
516
-
517
- return string.replace(RE_NARGS, function (match, prefix, i, index) {
518
- var result = void 0;
519
-
520
- if (string[index - 1] === '{' && string[index + match.length] === '}') {
521
- return i;
522
- } else {
523
- result = Object(util["j" /* hasOwn */])(args, i) ? args[i] : null;
524
- if (result === null || result === undefined) {
525
- return '';
526
- }
527
-
528
- return result;
529
- }
530
- });
531
- }
532
-
533
- return template;
534
- });
535
- // CONCATENATED MODULE: ./src/locale/index.js
536
-
195
+ /***/ 14:
196
+ /***/ (function(module, exports) {
537
197
 
198
+ module.exports = require("element-ui/src/utils/popup");
538
199
 
200
+ /***/ }),
539
201
 
202
+ /***/ 18:
203
+ /***/ (function(module, exports) {
540
204
 
541
- var locale_format = format(external_vue_default.a);
542
- var lang = zh_CN;
543
- var merged = false;
544
- var locale_i18nHandler = function i18nHandler() {
545
- var vuei18n = Object.getPrototypeOf(this || external_vue_default.a).$t;
546
- if (typeof vuei18n === 'function' && !!external_vue_default.a.locale) {
547
- if (!merged) {
548
- merged = true;
549
- external_vue_default.a.locale(external_vue_default.a.config.lang, cjs_default()(lang, external_vue_default.a.locale(external_vue_default.a.config.lang) || {}, { clone: true }));
550
- }
551
- return vuei18n.apply(this, arguments);
552
- }
553
- };
205
+ module.exports = require("element-ui/src/utils/types");
554
206
 
555
- var t = function t(path, options) {
556
- var value = locale_i18nHandler.apply(this, arguments);
557
- if (value !== null && value !== undefined) return value;
207
+ /***/ }),
558
208
 
559
- var array = path.split('.');
560
- var current = lang;
209
+ /***/ 2:
210
+ /***/ (function(module, exports) {
561
211
 
562
- for (var i = 0, j = array.length; i < j; i++) {
563
- var property = array[i];
564
- value = current[property];
565
- if (i === j - 1) return locale_format(value, options);
566
- if (!value) return '';
567
- current = value;
568
- }
569
- return '';
570
- };
212
+ module.exports = require("element-ui/src/utils/dom");
571
213
 
572
- var use = function use(l) {
573
- lang = l || lang;
574
- };
214
+ /***/ }),
575
215
 
576
- var i18n = function i18n(fn) {
577
- locale_i18nHandler = fn || locale_i18nHandler;
578
- };
216
+ /***/ 25:
217
+ /***/ (function(module, exports) {
579
218
 
580
- /* harmony default export */ var locale = ({ use: use, t: t, i18n: i18n });
219
+ module.exports = require("throttle-debounce/throttle");
581
220
 
582
221
  /***/ }),
583
222
 
584
- /***/ 13:
585
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
223
+ /***/ 3:
224
+ /***/ (function(module, exports) {
586
225
 
587
- "use strict";
588
- /* harmony import */ var element_ui_src_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
226
+ module.exports = require("element-ui/src/utils/util");
589
227
 
228
+ /***/ }),
590
229
 
591
- /* harmony default export */ __webpack_exports__["a"] = ({
592
- methods: {
593
- t: function t() {
594
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
595
- args[_key] = arguments[_key];
596
- }
230
+ /***/ 6:
231
+ /***/ (function(module, exports) {
597
232
 
598
- return element_ui_src_locale__WEBPACK_IMPORTED_MODULE_0__[/* t */ "a"].apply(this, args);
599
- }
600
- }
601
- });
233
+ module.exports = require("element-ui/src/mixins/locale");
602
234
 
603
235
  /***/ }),
604
236
 
605
- /***/ 146:
237
+ /***/ 71:
606
238
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
607
239
 
608
240
  "use strict";
@@ -803,14 +435,14 @@ image_viewervue_type_template_id_1cbbb3b9_render._withStripped = true
803
435
 
804
436
  // CONCATENATED MODULE: ./packages/image/src/image-viewer.vue?vue&type=template&id=1cbbb3b9
805
437
 
806
- // EXTERNAL MODULE: ./src/utils/dom.js
807
- var dom = __webpack_require__(1);
438
+ // EXTERNAL MODULE: external "element-ui/src/utils/dom"
439
+ var dom_ = __webpack_require__(2);
808
440
 
809
- // EXTERNAL MODULE: ./src/utils/util.js
810
- var util = __webpack_require__(3);
441
+ // EXTERNAL MODULE: external "element-ui/src/utils/util"
442
+ var util_ = __webpack_require__(3);
811
443
 
812
- // EXTERNAL MODULE: ./src/utils/popup/index.js + 1 modules
813
- var popup = __webpack_require__(9);
444
+ // EXTERNAL MODULE: external "element-ui/src/utils/popup"
445
+ var popup_ = __webpack_require__(14);
814
446
 
815
447
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/image-viewer.vue?vue&type=script&lang=js
816
448
  var _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; };
@@ -830,7 +462,7 @@ var Mode = {
830
462
  }
831
463
  };
832
464
 
833
- var mousewheelEventName = Object(util["n" /* isFirefox */])() ? 'DOMMouseScroll' : 'mousewheel';
465
+ var mousewheelEventName = Object(util_["isFirefox"])() ? 'DOMMouseScroll' : 'mousewheel';
834
466
 
835
467
  /* harmony default export */ var image_viewervue_type_script_lang_js = ({
836
468
  name: 'ElImageViewer',
@@ -918,7 +550,7 @@ var mousewheelEventName = Object(util["n" /* isFirefox */])() ? 'DOMMouseScroll'
918
550
  return style;
919
551
  },
920
552
  viewerZIndex: function viewerZIndex() {
921
- var nextZIndex = popup["a" /* PopupManager */].nextZIndex();
553
+ var nextZIndex = popup_["PopupManager"].nextZIndex();
922
554
  return this.zIndex > nextZIndex ? this.zIndex : nextZIndex;
923
555
  }
924
556
  },
@@ -978,7 +610,7 @@ var mousewheelEventName = Object(util["n" /* isFirefox */])() ? 'DOMMouseScroll'
978
610
  break;
979
611
  }
980
612
  };
981
- this._mouseWheelHandler = Object(util["s" /* rafThrottle */])(function (e) {
613
+ this._mouseWheelHandler = Object(util_["rafThrottle"])(function (e) {
982
614
  var delta = e.wheelDelta ? e.wheelDelta : -e.detail;
983
615
  if (delta > 0) {
984
616
  _this2.handleActions('zoomIn', {
@@ -992,12 +624,12 @@ var mousewheelEventName = Object(util["n" /* isFirefox */])() ? 'DOMMouseScroll'
992
624
  });
993
625
  }
994
626
  });
995
- Object(dom["g" /* on */])(document, 'keydown', this._keyDownHandler);
996
- Object(dom["g" /* on */])(document, mousewheelEventName, this._mouseWheelHandler);
627
+ Object(dom_["on"])(document, 'keydown', this._keyDownHandler);
628
+ Object(dom_["on"])(document, mousewheelEventName, this._mouseWheelHandler);
997
629
  },
998
630
  deviceSupportUninstall: function deviceSupportUninstall() {
999
- Object(dom["f" /* off */])(document, 'keydown', this._keyDownHandler);
1000
- Object(dom["f" /* off */])(document, mousewheelEventName, this._mouseWheelHandler);
631
+ Object(dom_["off"])(document, 'keydown', this._keyDownHandler);
632
+ Object(dom_["off"])(document, mousewheelEventName, this._mouseWheelHandler);
1001
633
  this._keyDownHandler = null;
1002
634
  this._mouseWheelHandler = null;
1003
635
  },
@@ -1019,13 +651,13 @@ var mousewheelEventName = Object(util["n" /* isFirefox */])() ? 'DOMMouseScroll'
1019
651
 
1020
652
  var startX = e.pageX;
1021
653
  var startY = e.pageY;
1022
- this._dragHandler = Object(util["s" /* rafThrottle */])(function (ev) {
654
+ this._dragHandler = Object(util_["rafThrottle"])(function (ev) {
1023
655
  _this3.transform.offsetX = offsetX + ev.pageX - startX;
1024
656
  _this3.transform.offsetY = offsetY + ev.pageY - startY;
1025
657
  });
1026
- Object(dom["g" /* on */])(document, 'mousemove', this._dragHandler);
1027
- Object(dom["g" /* on */])(document, 'mouseup', function (ev) {
1028
- Object(dom["f" /* off */])(document, 'mousemove', _this3._dragHandler);
658
+ Object(dom_["on"])(document, 'mousemove', this._dragHandler);
659
+ Object(dom_["on"])(document, 'mouseup', function (ev) {
660
+ Object(dom_["off"])(document, 'mousemove', _this3._dragHandler);
1029
661
  });
1030
662
 
1031
663
  e.preventDefault();
@@ -1118,7 +750,7 @@ var mousewheelEventName = Object(util["n" /* isFirefox */])() ? 'DOMMouseScroll'
1118
750
  // CONCATENATED MODULE: ./packages/image/src/image-viewer.vue?vue&type=script&lang=js
1119
751
  /* harmony default export */ var src_image_viewervue_type_script_lang_js = (image_viewervue_type_script_lang_js);
1120
752
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1121
- var componentNormalizer = __webpack_require__(2);
753
+ var componentNormalizer = __webpack_require__(0);
1122
754
 
1123
755
  // CONCATENATED MODULE: ./packages/image/src/image-viewer.vue
1124
756
 
@@ -1140,15 +772,16 @@ var component = Object(componentNormalizer["a" /* default */])(
1140
772
  )
1141
773
 
1142
774
  /* harmony default export */ var image_viewer = (component.exports);
1143
- // EXTERNAL MODULE: ./src/mixins/locale.js
1144
- var locale = __webpack_require__(13);
775
+ // EXTERNAL MODULE: external "element-ui/src/mixins/locale"
776
+ var locale_ = __webpack_require__(6);
777
+ var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
1145
778
 
1146
- // EXTERNAL MODULE: ./src/utils/types.js
1147
- var types = __webpack_require__(4);
779
+ // EXTERNAL MODULE: external "element-ui/src/utils/types"
780
+ var types_ = __webpack_require__(18);
1148
781
 
1149
- // EXTERNAL MODULE: ./node_modules/throttle-debounce/throttle.js
1150
- var throttle = __webpack_require__(17);
1151
- var throttle_default = /*#__PURE__*/__webpack_require__.n(throttle);
782
+ // EXTERNAL MODULE: external "throttle-debounce/throttle"
783
+ var throttle_ = __webpack_require__(25);
784
+ var throttle_default = /*#__PURE__*/__webpack_require__.n(throttle_);
1152
785
 
1153
786
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/main.vue?vue&type=script&lang=js
1154
787
 
@@ -1175,7 +808,7 @@ var prevOverflow = '';
1175
808
  /* harmony default export */ var mainvue_type_script_lang_js = ({
1176
809
  name: 'ElImage',
1177
810
 
1178
- mixins: [locale["a" /* default */]],
811
+ mixins: [locale_default.a],
1179
812
  inheritAttrs: false,
1180
813
 
1181
814
  components: {
@@ -1302,7 +935,7 @@ var prevOverflow = '';
1302
935
  this.$emit('error', e);
1303
936
  },
1304
937
  handleLazyLoad: function handleLazyLoad() {
1305
- if (Object(dom["e" /* isInContainer */])(this.$el, this._scrollContainer)) {
938
+ if (Object(dom_["isInContainer"])(this.$el, this._scrollContainer)) {
1306
939
  this.show = true;
1307
940
  this.removeLazyLoadListener();
1308
941
  }
@@ -1314,18 +947,18 @@ var prevOverflow = '';
1314
947
 
1315
948
  var _scrollContainer = null;
1316
949
 
1317
- if (Object(types["c" /* isHtmlElement */])(scrollContainer)) {
950
+ if (Object(types_["isHtmlElement"])(scrollContainer)) {
1318
951
  _scrollContainer = scrollContainer;
1319
- } else if (Object(types["e" /* isString */])(scrollContainer)) {
952
+ } else if (Object(types_["isString"])(scrollContainer)) {
1320
953
  _scrollContainer = document.querySelector(scrollContainer);
1321
954
  } else {
1322
- _scrollContainer = Object(dom["b" /* getScrollContainer */])(this.$el);
955
+ _scrollContainer = Object(dom_["getScrollContainer"])(this.$el);
1323
956
  }
1324
957
 
1325
958
  if (_scrollContainer) {
1326
959
  this._scrollContainer = _scrollContainer;
1327
960
  this._lazyLoadHandler = throttle_default()(200, this.handleLazyLoad);
1328
- Object(dom["g" /* on */])(_scrollContainer, 'scroll', this._lazyLoadHandler);
961
+ Object(dom_["on"])(_scrollContainer, 'scroll', this._lazyLoadHandler);
1329
962
  this.handleLazyLoad();
1330
963
  }
1331
964
  },
@@ -1336,7 +969,7 @@ var prevOverflow = '';
1336
969
 
1337
970
  if (this.$isServer || !_scrollContainer || !_lazyLoadHandler) return;
1338
971
 
1339
- Object(dom["f" /* off */])(_scrollContainer, 'scroll', _lazyLoadHandler);
972
+ Object(dom_["off"])(_scrollContainer, 'scroll', _lazyLoadHandler);
1340
973
  this._scrollContainer = null;
1341
974
  this._lazyLoadHandler = null;
1342
975
  },
@@ -1421,1155 +1054,6 @@ main.install = function (Vue) {
1421
1054
 
1422
1055
  /* harmony default export */ var packages_image = __webpack_exports__["default"] = (main);
1423
1056
 
1424
- /***/ }),
1425
-
1426
- /***/ 15:
1427
- /***/ (function(module, exports, __webpack_require__) {
1428
-
1429
- "use strict";
1430
-
1431
-
1432
- var isMergeableObject = function isMergeableObject(value) {
1433
- return isNonNullObject(value)
1434
- && !isSpecial(value)
1435
- };
1436
-
1437
- function isNonNullObject(value) {
1438
- return !!value && typeof value === 'object'
1439
- }
1440
-
1441
- function isSpecial(value) {
1442
- var stringValue = Object.prototype.toString.call(value);
1443
-
1444
- return stringValue === '[object RegExp]'
1445
- || stringValue === '[object Date]'
1446
- || isReactElement(value)
1447
- }
1448
-
1449
- // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
1450
- var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
1451
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
1452
-
1453
- function isReactElement(value) {
1454
- return value.$$typeof === REACT_ELEMENT_TYPE
1455
- }
1456
-
1457
- function emptyTarget(val) {
1458
- return Array.isArray(val) ? [] : {}
1459
- }
1460
-
1461
- function cloneIfNecessary(value, optionsArgument) {
1462
- var clone = optionsArgument && optionsArgument.clone === true;
1463
- return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
1464
- }
1465
-
1466
- function defaultArrayMerge(target, source, optionsArgument) {
1467
- var destination = target.slice();
1468
- source.forEach(function(e, i) {
1469
- if (typeof destination[i] === 'undefined') {
1470
- destination[i] = cloneIfNecessary(e, optionsArgument);
1471
- } else if (isMergeableObject(e)) {
1472
- destination[i] = deepmerge(target[i], e, optionsArgument);
1473
- } else if (target.indexOf(e) === -1) {
1474
- destination.push(cloneIfNecessary(e, optionsArgument));
1475
- }
1476
- });
1477
- return destination
1478
- }
1479
-
1480
- function mergeObject(target, source, optionsArgument) {
1481
- var destination = {};
1482
- if (isMergeableObject(target)) {
1483
- Object.keys(target).forEach(function(key) {
1484
- destination[key] = cloneIfNecessary(target[key], optionsArgument);
1485
- });
1486
- }
1487
- Object.keys(source).forEach(function(key) {
1488
- if (!isMergeableObject(source[key]) || !target[key]) {
1489
- destination[key] = cloneIfNecessary(source[key], optionsArgument);
1490
- } else {
1491
- destination[key] = deepmerge(target[key], source[key], optionsArgument);
1492
- }
1493
- });
1494
- return destination
1495
- }
1496
-
1497
- function deepmerge(target, source, optionsArgument) {
1498
- var sourceIsArray = Array.isArray(source);
1499
- var targetIsArray = Array.isArray(target);
1500
- var options = optionsArgument || { arrayMerge: defaultArrayMerge };
1501
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
1502
-
1503
- if (!sourceAndTargetTypesMatch) {
1504
- return cloneIfNecessary(source, optionsArgument)
1505
- } else if (sourceIsArray) {
1506
- var arrayMerge = options.arrayMerge || defaultArrayMerge;
1507
- return arrayMerge(target, source, optionsArgument)
1508
- } else {
1509
- return mergeObject(target, source, optionsArgument)
1510
- }
1511
- }
1512
-
1513
- deepmerge.all = function deepmergeAll(array, optionsArgument) {
1514
- if (!Array.isArray(array) || array.length < 2) {
1515
- throw new Error('first argument should be an array with at least two elements')
1516
- }
1517
-
1518
- // we are sure there are at least 2 values, so it is safe to have no initial value
1519
- return array.reduce(function(prev, next) {
1520
- return deepmerge(prev, next, optionsArgument)
1521
- })
1522
- };
1523
-
1524
- var deepmerge_1 = deepmerge;
1525
-
1526
- module.exports = deepmerge_1;
1527
-
1528
-
1529
- /***/ }),
1530
-
1531
- /***/ 17:
1532
- /***/ (function(module, exports) {
1533
-
1534
- /* eslint-disable no-undefined,no-param-reassign,no-shadow */
1535
-
1536
- /**
1537
- * Throttle execution of a function. Especially useful for rate limiting
1538
- * execution of handlers on events like resize and scroll.
1539
- *
1540
- * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
1541
- * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the
1542
- * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time
1543
- * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,
1544
- * the internal counter is reset)
1545
- * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
1546
- * to `callback` when the throttled-function is executed.
1547
- * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),
1548
- * schedule `callback` to execute after `delay` ms.
1549
- *
1550
- * @return {Function} A new, throttled, function.
1551
- */
1552
- module.exports = function ( delay, noTrailing, callback, debounceMode ) {
1553
-
1554
- // After wrapper has stopped being called, this timeout ensures that
1555
- // `callback` is executed at the proper times in `throttle` and `end`
1556
- // debounce modes.
1557
- var timeoutID;
1558
-
1559
- // Keep track of the last time `callback` was executed.
1560
- var lastExec = 0;
1561
-
1562
- // `noTrailing` defaults to falsy.
1563
- if ( typeof noTrailing !== 'boolean' ) {
1564
- debounceMode = callback;
1565
- callback = noTrailing;
1566
- noTrailing = undefined;
1567
- }
1568
-
1569
- // The `wrapper` function encapsulates all of the throttling / debouncing
1570
- // functionality and when executed will limit the rate at which `callback`
1571
- // is executed.
1572
- function wrapper () {
1573
-
1574
- var self = this;
1575
- var elapsed = Number(new Date()) - lastExec;
1576
- var args = arguments;
1577
-
1578
- // Execute `callback` and update the `lastExec` timestamp.
1579
- function exec () {
1580
- lastExec = Number(new Date());
1581
- callback.apply(self, args);
1582
- }
1583
-
1584
- // If `debounceMode` is true (at begin) this is used to clear the flag
1585
- // to allow future `callback` executions.
1586
- function clear () {
1587
- timeoutID = undefined;
1588
- }
1589
-
1590
- if ( debounceMode && !timeoutID ) {
1591
- // Since `wrapper` is being called for the first time and
1592
- // `debounceMode` is true (at begin), execute `callback`.
1593
- exec();
1594
- }
1595
-
1596
- // Clear any existing timeout.
1597
- if ( timeoutID ) {
1598
- clearTimeout(timeoutID);
1599
- }
1600
-
1601
- if ( debounceMode === undefined && elapsed > delay ) {
1602
- // In throttle mode, if `delay` time has been exceeded, execute
1603
- // `callback`.
1604
- exec();
1605
-
1606
- } else if ( noTrailing !== true ) {
1607
- // In trailing throttle mode, since `delay` time has not been
1608
- // exceeded, schedule `callback` to execute `delay` ms after most
1609
- // recent execution.
1610
- //
1611
- // If `debounceMode` is true (at begin), schedule `clear` to execute
1612
- // after `delay` ms.
1613
- //
1614
- // If `debounceMode` is false (at end), schedule `callback` to
1615
- // execute after `delay` ms.
1616
- timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
1617
- }
1618
-
1619
- }
1620
-
1621
- // Return the wrapper function.
1622
- return wrapper;
1623
-
1624
- };
1625
-
1626
-
1627
- /***/ }),
1628
-
1629
- /***/ 2:
1630
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1631
-
1632
- "use strict";
1633
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
1634
- /* globals __VUE_SSR_CONTEXT__ */
1635
-
1636
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
1637
- // This module is a runtime utility for cleaner component module output and will
1638
- // be included in the final webpack user bundle.
1639
-
1640
- function normalizeComponent(
1641
- scriptExports,
1642
- render,
1643
- staticRenderFns,
1644
- functionalTemplate,
1645
- injectStyles,
1646
- scopeId,
1647
- moduleIdentifier /* server only */,
1648
- shadowMode /* vue-cli only */
1649
- ) {
1650
- // Vue.extend constructor export interop
1651
- var options =
1652
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
1653
-
1654
- // render functions
1655
- if (render) {
1656
- options.render = render
1657
- options.staticRenderFns = staticRenderFns
1658
- options._compiled = true
1659
- }
1660
-
1661
- // functional template
1662
- if (functionalTemplate) {
1663
- options.functional = true
1664
- }
1665
-
1666
- // scopedId
1667
- if (scopeId) {
1668
- options._scopeId = 'data-v-' + scopeId
1669
- }
1670
-
1671
- var hook
1672
- if (moduleIdentifier) {
1673
- // server build
1674
- hook = function (context) {
1675
- // 2.3 injection
1676
- context =
1677
- context || // cached call
1678
- (this.$vnode && this.$vnode.ssrContext) || // stateful
1679
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
1680
- // 2.2 with runInNewContext: true
1681
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1682
- context = __VUE_SSR_CONTEXT__
1683
- }
1684
- // inject component styles
1685
- if (injectStyles) {
1686
- injectStyles.call(this, context)
1687
- }
1688
- // register component module identifier for async chunk inferrence
1689
- if (context && context._registeredComponents) {
1690
- context._registeredComponents.add(moduleIdentifier)
1691
- }
1692
- }
1693
- // used by ssr in case component is cached and beforeCreate
1694
- // never gets called
1695
- options._ssrRegister = hook
1696
- } else if (injectStyles) {
1697
- hook = shadowMode
1698
- ? function () {
1699
- injectStyles.call(
1700
- this,
1701
- (options.functional ? this.parent : this).$root.$options.shadowRoot
1702
- )
1703
- }
1704
- : injectStyles
1705
- }
1706
-
1707
- if (hook) {
1708
- if (options.functional) {
1709
- // for template-only hot-reload because in that case the render fn doesn't
1710
- // go through the normalizer
1711
- options._injectStyles = hook
1712
- // register for functional component in vue file
1713
- var originalRender = options.render
1714
- options.render = function renderWithStyleInjection(h, context) {
1715
- hook.call(context)
1716
- return originalRender(h, context)
1717
- }
1718
- } else {
1719
- // inject component registration as beforeCreate hook
1720
- var existing = options.beforeCreate
1721
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
1722
- }
1723
- }
1724
-
1725
- return {
1726
- exports: scriptExports,
1727
- options: options
1728
- }
1729
- }
1730
-
1731
-
1732
- /***/ }),
1733
-
1734
- /***/ 3:
1735
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1736
-
1737
- "use strict";
1738
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
1739
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
1740
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
1741
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
1742
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
1743
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
1744
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
1745
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
1746
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
1747
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
1748
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
1749
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
1750
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
1751
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
1752
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
1753
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
1754
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
1755
- /* unused harmony export looseEqual */
1756
- /* unused harmony export arrayEquals */
1757
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
1758
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
1759
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
1760
- /* unused harmony export objToArray */
1761
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
1762
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1763
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1764
- /* harmony import */ var element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
1765
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1766
-
1767
-
1768
-
1769
-
1770
- var hasOwnProperty = Object.prototype.hasOwnProperty;
1771
-
1772
- function noop() {};
1773
-
1774
- function hasOwn(obj, key) {
1775
- return hasOwnProperty.call(obj, key);
1776
- };
1777
-
1778
- function extend(to, _from) {
1779
- for (var key in _from) {
1780
- to[key] = _from[key];
1781
- }
1782
- return to;
1783
- };
1784
-
1785
- function toObject(arr) {
1786
- var res = {};
1787
- for (var i = 0; i < arr.length; i++) {
1788
- if (arr[i]) {
1789
- extend(res, arr[i]);
1790
- }
1791
- }
1792
- return res;
1793
- };
1794
-
1795
- var getValueByPath = function getValueByPath(object, prop) {
1796
- prop = prop || '';
1797
- var paths = prop.split('.');
1798
- var current = object;
1799
- var result = null;
1800
- for (var i = 0, j = paths.length; i < j; i++) {
1801
- var path = paths[i];
1802
- if (!current) break;
1803
-
1804
- if (i === j - 1) {
1805
- result = current[path];
1806
- break;
1807
- }
1808
- current = current[path];
1809
- }
1810
- return result;
1811
- };
1812
-
1813
- function getPropByPath(obj, path, strict) {
1814
- var tempObj = obj;
1815
- path = path.replace(/\[(\w+)\]/g, '.$1');
1816
- path = path.replace(/^\./, '');
1817
-
1818
- var keyArr = path.split('.');
1819
- var i = 0;
1820
- for (var len = keyArr.length; i < len - 1; ++i) {
1821
- if (!tempObj && !strict) break;
1822
- var key = keyArr[i];
1823
- if (key in tempObj) {
1824
- tempObj = tempObj[key];
1825
- } else {
1826
- if (strict) {
1827
- throw new Error('please transfer a valid prop path to form item!');
1828
- }
1829
- break;
1830
- }
1831
- }
1832
- return {
1833
- o: tempObj,
1834
- k: keyArr[i],
1835
- v: tempObj ? tempObj[keyArr[i]] : null
1836
- };
1837
- };
1838
-
1839
- var generateId = function generateId() {
1840
- return Math.floor(Math.random() * 10000);
1841
- };
1842
-
1843
- var valueEquals = function valueEquals(a, b) {
1844
- // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
1845
- if (a === b) return true;
1846
- if (!(a instanceof Array)) return false;
1847
- if (!(b instanceof Array)) return false;
1848
- if (a.length !== b.length) return false;
1849
- for (var i = 0; i !== a.length; ++i) {
1850
- if (a[i] !== b[i]) return false;
1851
- }
1852
- return true;
1853
- };
1854
-
1855
- var escapeRegexpString = function escapeRegexpString() {
1856
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1857
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
1858
- };
1859
-
1860
- // TODO: use native Array.find, Array.findIndex when IE support is dropped
1861
- var arrayFindIndex = function arrayFindIndex(arr, pred) {
1862
- for (var i = 0; i !== arr.length; ++i) {
1863
- if (pred(arr[i])) {
1864
- return i;
1865
- }
1866
- }
1867
- return -1;
1868
- };
1869
-
1870
- var arrayFind = function arrayFind(arr, pred) {
1871
- var idx = arrayFindIndex(arr, pred);
1872
- return idx !== -1 ? arr[idx] : undefined;
1873
- };
1874
-
1875
- // coerce truthy value to array
1876
- var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
1877
- if (Array.isArray(val)) {
1878
- return val;
1879
- } else if (val) {
1880
- return [val];
1881
- } else {
1882
- return [];
1883
- }
1884
- };
1885
-
1886
- var isIE = function isIE() {
1887
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
1888
- };
1889
-
1890
- var isEdge = function isEdge() {
1891
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
1892
- };
1893
-
1894
- var isFirefox = function isFirefox() {
1895
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
1896
- };
1897
-
1898
- var autoprefixer = function autoprefixer(style) {
1899
- if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
1900
- var rules = ['transform', 'transition', 'animation'];
1901
- var prefixes = ['ms-', 'webkit-'];
1902
- rules.forEach(function (rule) {
1903
- var value = style[rule];
1904
- if (rule && value) {
1905
- prefixes.forEach(function (prefix) {
1906
- style[prefix + rule] = value;
1907
- });
1908
- }
1909
- });
1910
- return style;
1911
- };
1912
-
1913
- var kebabCase = function kebabCase(str) {
1914
- var hyphenateRE = /([^-])([A-Z])/g;
1915
- return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
1916
- };
1917
-
1918
- var capitalize = function capitalize(str) {
1919
- if (!Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
1920
- return str.charAt(0).toUpperCase() + str.slice(1);
1921
- };
1922
-
1923
- var looseEqual = function looseEqual(a, b) {
1924
- var isObjectA = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
1925
- var isObjectB = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
1926
- if (isObjectA && isObjectB) {
1927
- return JSON.stringify(a) === JSON.stringify(b);
1928
- } else if (!isObjectA && !isObjectB) {
1929
- return String(a) === String(b);
1930
- } else {
1931
- return false;
1932
- }
1933
- };
1934
-
1935
- var arrayEquals = function arrayEquals(arrayA, arrayB) {
1936
- arrayA = arrayA || [];
1937
- arrayB = arrayB || [];
1938
-
1939
- if (arrayA.length !== arrayB.length) {
1940
- return false;
1941
- }
1942
-
1943
- for (var i = 0; i < arrayA.length; i++) {
1944
- if (!looseEqual(arrayA[i], arrayB[i])) {
1945
- return false;
1946
- }
1947
- }
1948
-
1949
- return true;
1950
- };
1951
-
1952
- var isEqual = function isEqual(value1, value2) {
1953
- if (Array.isArray(value1) && Array.isArray(value2)) {
1954
- return arrayEquals(value1, value2);
1955
- }
1956
- return looseEqual(value1, value2);
1957
- };
1958
-
1959
- var isEmpty = function isEmpty(val) {
1960
- // null or undefined
1961
- if (val == null) return true;
1962
-
1963
- if (typeof val === 'boolean') return false;
1964
-
1965
- if (typeof val === 'number') return !val;
1966
-
1967
- if (val instanceof Error) return val.message === '';
1968
-
1969
- switch (Object.prototype.toString.call(val)) {
1970
- // String or Array
1971
- case '[object String]':
1972
- case '[object Array]':
1973
- return !val.length;
1974
-
1975
- // Map or Set or File
1976
- case '[object File]':
1977
- case '[object Map]':
1978
- case '[object Set]':
1979
- {
1980
- return !val.size;
1981
- }
1982
- // Plain Object
1983
- case '[object Object]':
1984
- {
1985
- return !Object.keys(val).length;
1986
- }
1987
- }
1988
-
1989
- return false;
1990
- };
1991
-
1992
- function rafThrottle(fn) {
1993
- var locked = false;
1994
- return function () {
1995
- var _this = this;
1996
-
1997
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1998
- args[_key] = arguments[_key];
1999
- }
2000
-
2001
- if (locked) return;
2002
- locked = true;
2003
- window.requestAnimationFrame(function (_) {
2004
- fn.apply(_this, args);
2005
- locked = false;
2006
- });
2007
- };
2008
- }
2009
-
2010
- function objToArray(obj) {
2011
- if (Array.isArray(obj)) {
2012
- return obj;
2013
- }
2014
- return isEmpty(obj) ? [] : [obj];
2015
- }
2016
-
2017
- var isMac = function isMac() {
2018
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
2019
- };
2020
-
2021
- /***/ }),
2022
-
2023
- /***/ 4:
2024
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2025
-
2026
- "use strict";
2027
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
2028
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
2029
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
2030
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
2031
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
2032
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
2033
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2034
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
2035
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2036
-
2037
-
2038
-
2039
- function isString(obj) {
2040
- return Object.prototype.toString.call(obj) === '[object String]';
2041
- }
2042
-
2043
- function isObject(obj) {
2044
- return Object.prototype.toString.call(obj) === '[object Object]';
2045
- }
2046
-
2047
- function isHtmlElement(node) {
2048
- return node && node.nodeType === Node.ELEMENT_NODE;
2049
- }
2050
-
2051
- /**
2052
- * - Inspired:
2053
- * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
2054
- */
2055
- var isFunction = function isFunction(functionToCheck) {
2056
- var getType = {};
2057
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
2058
- };
2059
-
2060
- if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
2061
- isFunction = function isFunction(obj) {
2062
- return typeof obj === 'function' || false;
2063
- };
2064
- }
2065
-
2066
-
2067
-
2068
- var isUndefined = function isUndefined(val) {
2069
- return val === void 0;
2070
- };
2071
-
2072
- var isDefined = function isDefined(val) {
2073
- return val !== undefined && val !== null;
2074
- };
2075
-
2076
- /***/ }),
2077
-
2078
- /***/ 7:
2079
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2080
-
2081
- "use strict";
2082
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
2083
- for (var i = 1, j = arguments.length; i < j; i++) {
2084
- var source = arguments[i] || {};
2085
- for (var prop in source) {
2086
- if (source.hasOwnProperty(prop)) {
2087
- var value = source[prop];
2088
- if (value !== undefined) {
2089
- target[prop] = value;
2090
- }
2091
- }
2092
- }
2093
- }
2094
-
2095
- return target;
2096
- });;
2097
-
2098
- /***/ }),
2099
-
2100
- /***/ 8:
2101
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2102
-
2103
- "use strict";
2104
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2105
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
2106
-
2107
-
2108
- var scrollBarWidth = void 0;
2109
-
2110
- /* harmony default export */ __webpack_exports__["a"] = (function () {
2111
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
2112
- if (scrollBarWidth !== undefined) return scrollBarWidth;
2113
-
2114
- var outer = document.createElement('div');
2115
- outer.className = 'el-scrollbar__wrap';
2116
- outer.style.visibility = 'hidden';
2117
- outer.style.width = '100px';
2118
- outer.style.position = 'absolute';
2119
- outer.style.top = '-9999px';
2120
- document.body.appendChild(outer);
2121
-
2122
- var widthNoScroll = outer.offsetWidth;
2123
- outer.style.overflow = 'scroll';
2124
-
2125
- var inner = document.createElement('div');
2126
- inner.style.width = '100%';
2127
- outer.appendChild(inner);
2128
-
2129
- var widthWithScroll = inner.offsetWidth;
2130
- outer.parentNode.removeChild(outer);
2131
- scrollBarWidth = widthNoScroll - widthWithScroll;
2132
-
2133
- return scrollBarWidth;
2134
- });;
2135
-
2136
- /***/ }),
2137
-
2138
- /***/ 9:
2139
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2140
-
2141
- "use strict";
2142
-
2143
- // EXPORTS
2144
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
2145
-
2146
- // EXTERNAL MODULE: external "vue"
2147
- var external_vue_ = __webpack_require__(0);
2148
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
2149
-
2150
- // EXTERNAL MODULE: ./src/utils/merge.js
2151
- var merge = __webpack_require__(7);
2152
-
2153
- // EXTERNAL MODULE: ./src/utils/dom.js
2154
- var utils_dom = __webpack_require__(1);
2155
-
2156
- // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
2157
-
2158
-
2159
-
2160
- var hasModal = false;
2161
- var hasInitZIndex = false;
2162
- var popup_manager_zIndex = void 0;
2163
-
2164
- var popup_manager_getModal = function getModal() {
2165
- if (external_vue_default.a.prototype.$isServer) return;
2166
- var modalDom = PopupManager.modalDom;
2167
- if (modalDom) {
2168
- hasModal = true;
2169
- } else {
2170
- hasModal = false;
2171
- modalDom = document.createElement('div');
2172
- PopupManager.modalDom = modalDom;
2173
-
2174
- modalDom.addEventListener('touchmove', function (event) {
2175
- event.preventDefault();
2176
- event.stopPropagation();
2177
- });
2178
-
2179
- modalDom.addEventListener('click', function () {
2180
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
2181
- });
2182
- }
2183
-
2184
- return modalDom;
2185
- };
2186
-
2187
- var instances = {};
2188
-
2189
- var PopupManager = {
2190
- modalFade: true,
2191
-
2192
- getInstance: function getInstance(id) {
2193
- return instances[id];
2194
- },
2195
-
2196
- register: function register(id, instance) {
2197
- if (id && instance) {
2198
- instances[id] = instance;
2199
- }
2200
- },
2201
-
2202
- deregister: function deregister(id) {
2203
- if (id) {
2204
- instances[id] = null;
2205
- delete instances[id];
2206
- }
2207
- },
2208
-
2209
- nextZIndex: function nextZIndex() {
2210
- return PopupManager.zIndex++;
2211
- },
2212
-
2213
- modalStack: [],
2214
-
2215
- doOnModalClick: function doOnModalClick() {
2216
- var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
2217
- if (!topItem) return;
2218
-
2219
- var instance = PopupManager.getInstance(topItem.id);
2220
- if (instance && instance.closeOnClickModal) {
2221
- instance.close();
2222
- }
2223
- },
2224
-
2225
- openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
2226
- if (external_vue_default.a.prototype.$isServer) return;
2227
- if (!id || zIndex === undefined) return;
2228
- this.modalFade = modalFade;
2229
-
2230
- var modalStack = this.modalStack;
2231
-
2232
- for (var i = 0, j = modalStack.length; i < j; i++) {
2233
- var item = modalStack[i];
2234
- if (item.id === id) {
2235
- return;
2236
- }
2237
- }
2238
-
2239
- var modalDom = popup_manager_getModal();
2240
-
2241
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
2242
- if (this.modalFade && !hasModal) {
2243
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
2244
- }
2245
- if (modalClass) {
2246
- var classArr = modalClass.trim().split(/\s+/);
2247
- classArr.forEach(function (item) {
2248
- return Object(utils_dom["a" /* addClass */])(modalDom, item);
2249
- });
2250
- }
2251
- setTimeout(function () {
2252
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
2253
- }, 200);
2254
-
2255
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
2256
- dom.parentNode.appendChild(modalDom);
2257
- } else {
2258
- document.body.appendChild(modalDom);
2259
- }
2260
-
2261
- if (zIndex) {
2262
- modalDom.style.zIndex = zIndex;
2263
- }
2264
- modalDom.tabIndex = 0;
2265
- modalDom.style.display = '';
2266
-
2267
- this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
2268
- },
2269
-
2270
- closeModal: function closeModal(id) {
2271
- var modalStack = this.modalStack;
2272
- var modalDom = popup_manager_getModal();
2273
-
2274
- if (modalStack.length > 0) {
2275
- var topItem = modalStack[modalStack.length - 1];
2276
- if (topItem.id === id) {
2277
- if (topItem.modalClass) {
2278
- var classArr = topItem.modalClass.trim().split(/\s+/);
2279
- classArr.forEach(function (item) {
2280
- return Object(utils_dom["i" /* removeClass */])(modalDom, item);
2281
- });
2282
- }
2283
-
2284
- modalStack.pop();
2285
- if (modalStack.length > 0) {
2286
- modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
2287
- }
2288
- } else {
2289
- for (var i = modalStack.length - 1; i >= 0; i--) {
2290
- if (modalStack[i].id === id) {
2291
- modalStack.splice(i, 1);
2292
- break;
2293
- }
2294
- }
2295
- }
2296
- }
2297
-
2298
- if (modalStack.length === 0) {
2299
- if (this.modalFade) {
2300
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
2301
- }
2302
- setTimeout(function () {
2303
- if (modalStack.length === 0) {
2304
- if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
2305
- modalDom.style.display = 'none';
2306
- PopupManager.modalDom = undefined;
2307
- }
2308
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
2309
- }, 200);
2310
- }
2311
- }
2312
- };
2313
-
2314
- Object.defineProperty(PopupManager, 'zIndex', {
2315
- configurable: true,
2316
- get: function get() {
2317
- if (!hasInitZIndex) {
2318
- popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
2319
- hasInitZIndex = true;
2320
- }
2321
- return popup_manager_zIndex;
2322
- },
2323
- set: function set(value) {
2324
- popup_manager_zIndex = value;
2325
- }
2326
- });
2327
-
2328
- var popup_manager_getTopPopup = function getTopPopup() {
2329
- if (external_vue_default.a.prototype.$isServer) return;
2330
- if (PopupManager.modalStack.length > 0) {
2331
- var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
2332
- if (!topPopup) return;
2333
- var instance = PopupManager.getInstance(topPopup.id);
2334
-
2335
- return instance;
2336
- }
2337
- };
2338
-
2339
- if (!external_vue_default.a.prototype.$isServer) {
2340
- // handle `esc` key when the popup is shown
2341
- window.addEventListener('keydown', function (event) {
2342
- if (event.keyCode === 27) {
2343
- var topPopup = popup_manager_getTopPopup();
2344
-
2345
- if (topPopup && topPopup.closeOnPressEscape) {
2346
- topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
2347
- }
2348
- }
2349
- });
2350
- }
2351
-
2352
- /* harmony default export */ var popup_manager = (PopupManager);
2353
- // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
2354
- var scrollbar_width = __webpack_require__(8);
2355
-
2356
- // CONCATENATED MODULE: ./src/utils/popup/index.js
2357
-
2358
-
2359
-
2360
-
2361
-
2362
-
2363
- var idSeed = 1;
2364
-
2365
- var scrollBarWidth = void 0;
2366
-
2367
- /* harmony default export */ var popup = __webpack_exports__["b"] = ({
2368
- props: {
2369
- visible: {
2370
- type: Boolean,
2371
- default: false
2372
- },
2373
- openDelay: {},
2374
- closeDelay: {},
2375
- zIndex: {},
2376
- modal: {
2377
- type: Boolean,
2378
- default: false
2379
- },
2380
- modalFade: {
2381
- type: Boolean,
2382
- default: true
2383
- },
2384
- modalClass: {},
2385
- modalAppendToBody: {
2386
- type: Boolean,
2387
- default: false
2388
- },
2389
- lockScroll: {
2390
- type: Boolean,
2391
- default: true
2392
- },
2393
- closeOnPressEscape: {
2394
- type: Boolean,
2395
- default: false
2396
- },
2397
- closeOnClickModal: {
2398
- type: Boolean,
2399
- default: false
2400
- }
2401
- },
2402
-
2403
- beforeMount: function beforeMount() {
2404
- this._popupId = 'popup-' + idSeed++;
2405
- popup_manager.register(this._popupId, this);
2406
- },
2407
- beforeDestroy: function beforeDestroy() {
2408
- popup_manager.deregister(this._popupId);
2409
- popup_manager.closeModal(this._popupId);
2410
-
2411
- this.restoreBodyStyle();
2412
- },
2413
- data: function data() {
2414
- return {
2415
- opened: false,
2416
- bodyPaddingRight: null,
2417
- computedBodyPaddingRight: 0,
2418
- withoutHiddenClass: true,
2419
- rendered: false
2420
- };
2421
- },
2422
-
2423
-
2424
- watch: {
2425
- visible: function visible(val) {
2426
- var _this = this;
2427
-
2428
- if (val) {
2429
- if (this._opening) return;
2430
- if (!this.rendered) {
2431
- this.rendered = true;
2432
- external_vue_default.a.nextTick(function () {
2433
- _this.open();
2434
- });
2435
- } else {
2436
- this.open();
2437
- }
2438
- } else {
2439
- this.close();
2440
- }
2441
- }
2442
- },
2443
-
2444
- methods: {
2445
- open: function open(options) {
2446
- var _this2 = this;
2447
-
2448
- if (!this.rendered) {
2449
- this.rendered = true;
2450
- }
2451
-
2452
- var props = Object(merge["a" /* default */])({}, this.$props || this, options);
2453
-
2454
- if (this._closeTimer) {
2455
- clearTimeout(this._closeTimer);
2456
- this._closeTimer = null;
2457
- }
2458
- clearTimeout(this._openTimer);
2459
-
2460
- var openDelay = Number(props.openDelay);
2461
- if (openDelay > 0) {
2462
- this._openTimer = setTimeout(function () {
2463
- _this2._openTimer = null;
2464
- _this2.doOpen(props);
2465
- }, openDelay);
2466
- } else {
2467
- this.doOpen(props);
2468
- }
2469
- },
2470
- doOpen: function doOpen(props) {
2471
- if (this.$isServer) return;
2472
- if (this.willOpen && !this.willOpen()) return;
2473
- if (this.opened) return;
2474
-
2475
- this._opening = true;
2476
-
2477
- var dom = this.$el;
2478
-
2479
- var modal = props.modal;
2480
-
2481
- var zIndex = props.zIndex;
2482
- if (zIndex) {
2483
- popup_manager.zIndex = zIndex;
2484
- }
2485
-
2486
- if (modal) {
2487
- if (this._closing) {
2488
- popup_manager.closeModal(this._popupId);
2489
- this._closing = false;
2490
- }
2491
- popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
2492
- if (props.lockScroll) {
2493
- this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
2494
- if (this.withoutHiddenClass) {
2495
- this.bodyPaddingRight = document.body.style.paddingRight;
2496
- this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
2497
- }
2498
- scrollBarWidth = Object(scrollbar_width["a" /* default */])();
2499
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
2500
- var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
2501
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
2502
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
2503
- }
2504
- Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
2505
- }
2506
- }
2507
-
2508
- if (getComputedStyle(dom).position === 'static') {
2509
- dom.style.position = 'absolute';
2510
- }
2511
-
2512
- dom.style.zIndex = popup_manager.nextZIndex();
2513
- this.opened = true;
2514
-
2515
- this.onOpen && this.onOpen();
2516
-
2517
- this.doAfterOpen();
2518
- },
2519
- doAfterOpen: function doAfterOpen() {
2520
- this._opening = false;
2521
- },
2522
- close: function close() {
2523
- var _this3 = this;
2524
-
2525
- if (this.willClose && !this.willClose()) return;
2526
-
2527
- if (this._openTimer !== null) {
2528
- clearTimeout(this._openTimer);
2529
- this._openTimer = null;
2530
- }
2531
- clearTimeout(this._closeTimer);
2532
-
2533
- var closeDelay = Number(this.closeDelay);
2534
-
2535
- if (closeDelay > 0) {
2536
- this._closeTimer = setTimeout(function () {
2537
- _this3._closeTimer = null;
2538
- _this3.doClose();
2539
- }, closeDelay);
2540
- } else {
2541
- this.doClose();
2542
- }
2543
- },
2544
- doClose: function doClose() {
2545
- this._closing = true;
2546
-
2547
- this.onClose && this.onClose();
2548
-
2549
- if (this.lockScroll) {
2550
- setTimeout(this.restoreBodyStyle, 200);
2551
- }
2552
-
2553
- this.opened = false;
2554
-
2555
- this.doAfterClose();
2556
- },
2557
- doAfterClose: function doAfterClose() {
2558
- popup_manager.closeModal(this._popupId);
2559
- this._closing = false;
2560
- },
2561
- restoreBodyStyle: function restoreBodyStyle() {
2562
- if (this.modal && this.withoutHiddenClass) {
2563
- document.body.style.paddingRight = this.bodyPaddingRight;
2564
- Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
2565
- }
2566
- this.withoutHiddenClass = true;
2567
- }
2568
- }
2569
- });
2570
-
2571
-
2572
-
2573
1057
  /***/ })
2574
1058
 
2575
1059
  /******/ });