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
@@ -82,261 +82,138 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 157);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 84);
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(' ');
94
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
+ /* globals __VUE_SSR_CONTEXT__ */
197
96
 
198
- for (var i = 0, j = classes.length; i < j; i++) {
199
- var clsName = classes[i];
200
- if (!clsName) continue;
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.
201
100
 
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
- };
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
212
114
 
213
- /* istanbul ignore next */
214
- function removeClass(el, cls) {
215
- if (!el || !cls) return;
216
- var classes = cls.split(' ');
217
- var curClass = ' ' + el.className + ' ';
115
+ // render functions
116
+ if (render) {
117
+ options.render = render
118
+ options.staticRenderFns = staticRenderFns
119
+ options._compiled = true
120
+ }
218
121
 
219
- for (var i = 0, j = classes.length; i < j; i++) {
220
- var clsName = classes[i];
221
- if (!clsName) continue;
122
+ // functional template
123
+ if (functionalTemplate) {
124
+ options.functional = true
125
+ }
222
126
 
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
- };
127
+ // scopedId
128
+ if (scopeId) {
129
+ options._scopeId = 'data-v-' + scopeId
130
+ }
233
131
 
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
- };
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
+ }
270
167
 
271
- /* istanbul ignore next */
272
- function setStyle(element, styleName, value) {
273
- if (!element || !styleName) return;
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
+ }
274
185
 
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
- };
186
+ return {
187
+ exports: scriptExports,
188
+ options: options
189
+ }
190
+ }
290
191
 
291
- var isScroll = function isScroll(el, vertical) {
292
- if (isServer) return;
293
192
 
294
- var determinedDirection = vertical !== null && vertical !== undefined;
295
- var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
193
+ /***/ }),
296
194
 
297
- return overflow.match(/(scroll|auto|overlay)/);
298
- };
195
+ /***/ 14:
196
+ /***/ (function(module, exports) {
299
197
 
300
- var getScrollContainer = function getScrollContainer(el, vertical) {
301
- if (isServer) return;
198
+ module.exports = require("element-ui/src/utils/popup");
302
199
 
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
- }
200
+ /***/ }),
313
201
 
314
- return parent;
315
- };
202
+ /***/ 23:
203
+ /***/ (function(module, exports) {
316
204
 
317
- var isInContainer = function isInContainer(el, container) {
318
- if (isServer || !el || !container) return false;
205
+ module.exports = require("element-ui/src/utils/vdom");
319
206
 
320
- var elRect = el.getBoundingClientRect();
321
- var containerRect = void 0;
207
+ /***/ }),
322
208
 
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
- }
209
+ /***/ 7:
210
+ /***/ (function(module, exports) {
333
211
 
334
- return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
335
- };
212
+ module.exports = require("vue");
336
213
 
337
214
  /***/ }),
338
215
 
339
- /***/ 157:
216
+ /***/ 84:
340
217
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
341
218
 
342
219
  "use strict";
@@ -344,7 +221,7 @@ var isInContainer = function isInContainer(el, container) {
344
221
  __webpack_require__.r(__webpack_exports__);
345
222
 
346
223
  // EXTERNAL MODULE: external "vue"
347
- var external_vue_ = __webpack_require__(0);
224
+ var external_vue_ = __webpack_require__(7);
348
225
  var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
349
226
 
350
227
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/notification/src/main.vue?vue&type=template&id=2fc0bc52
@@ -564,7 +441,7 @@ var typeMap = {
564
441
  // CONCATENATED MODULE: ./packages/notification/src/main.vue?vue&type=script&lang=js
565
442
  /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
566
443
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
567
- var componentNormalizer = __webpack_require__(2);
444
+ var componentNormalizer = __webpack_require__(0);
568
445
 
569
446
  // CONCATENATED MODULE: ./packages/notification/src/main.vue
570
447
 
@@ -586,14 +463,15 @@ var component = Object(componentNormalizer["a" /* default */])(
586
463
  )
587
464
 
588
465
  /* harmony default export */ var main = (component.exports);
589
- // EXTERNAL MODULE: ./src/utils/merge.js
590
- var merge = __webpack_require__(7);
466
+ // EXTERNAL MODULE: external "element-ui/src/utils/merge"
467
+ var merge_ = __webpack_require__(9);
468
+ var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
591
469
 
592
- // EXTERNAL MODULE: ./src/utils/popup/index.js + 1 modules
593
- var popup = __webpack_require__(9);
470
+ // EXTERNAL MODULE: external "element-ui/src/utils/popup"
471
+ var popup_ = __webpack_require__(14);
594
472
 
595
- // EXTERNAL MODULE: ./src/utils/vdom.js
596
- var vdom = __webpack_require__(38);
473
+ // EXTERNAL MODULE: external "element-ui/src/utils/vdom"
474
+ var vdom_ = __webpack_require__(23);
597
475
 
598
476
  // CONCATENATED MODULE: ./packages/notification/src/main.js
599
477
 
@@ -609,7 +487,7 @@ var seed = 1;
609
487
 
610
488
  var main_Notification = function Notification(options) {
611
489
  if (external_vue_default.a.prototype.$isServer) return;
612
- options = Object(merge["a" /* default */])({}, options);
490
+ options = merge_default()({}, options);
613
491
  var userOnClose = options.onClose;
614
492
  var id = 'notification_' + seed++;
615
493
  var position = options.position || 'top-right';
@@ -622,7 +500,7 @@ var main_Notification = function Notification(options) {
622
500
  data: options
623
501
  });
624
502
 
625
- if (Object(vdom["a" /* isVNode */])(options.message)) {
503
+ if (Object(vdom_["isVNode"])(options.message)) {
626
504
  instance.$slots.default = [options.message];
627
505
  options.message = 'REPLACED_BY_VNODE';
628
506
  }
@@ -631,7 +509,7 @@ var main_Notification = function Notification(options) {
631
509
  document.body.appendChild(instance.$el);
632
510
  instance.visible = true;
633
511
  instance.dom = instance.$el;
634
- instance.dom.style.zIndex = popup["a" /* PopupManager */].nextZIndex();
512
+ instance.dom.style.zIndex = popup_["PopupManager"].nextZIndex();
635
513
 
636
514
  var verticalOffset = options.offset || 0;
637
515
  instances.filter(function (item) {
@@ -647,7 +525,7 @@ var main_Notification = function Notification(options) {
647
525
 
648
526
  ['success', 'warning', 'info', 'error'].forEach(function (type) {
649
527
  main_Notification[type] = function (options) {
650
- if (typeof options === 'string' || Object(vdom["a" /* isVNode */])(options)) {
528
+ if (typeof options === 'string' || Object(vdom_["isVNode"])(options)) {
651
529
  options = {
652
530
  message: options
653
531
  };
@@ -697,965 +575,10 @@ main_Notification.closeAll = function () {
697
575
 
698
576
  /***/ }),
699
577
 
700
- /***/ 2:
701
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
702
-
703
- "use strict";
704
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
705
- /* globals __VUE_SSR_CONTEXT__ */
706
-
707
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
708
- // This module is a runtime utility for cleaner component module output and will
709
- // be included in the final webpack user bundle.
710
-
711
- function normalizeComponent(
712
- scriptExports,
713
- render,
714
- staticRenderFns,
715
- functionalTemplate,
716
- injectStyles,
717
- scopeId,
718
- moduleIdentifier /* server only */,
719
- shadowMode /* vue-cli only */
720
- ) {
721
- // Vue.extend constructor export interop
722
- var options =
723
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
724
-
725
- // render functions
726
- if (render) {
727
- options.render = render
728
- options.staticRenderFns = staticRenderFns
729
- options._compiled = true
730
- }
731
-
732
- // functional template
733
- if (functionalTemplate) {
734
- options.functional = true
735
- }
736
-
737
- // scopedId
738
- if (scopeId) {
739
- options._scopeId = 'data-v-' + scopeId
740
- }
741
-
742
- var hook
743
- if (moduleIdentifier) {
744
- // server build
745
- hook = function (context) {
746
- // 2.3 injection
747
- context =
748
- context || // cached call
749
- (this.$vnode && this.$vnode.ssrContext) || // stateful
750
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
751
- // 2.2 with runInNewContext: true
752
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
753
- context = __VUE_SSR_CONTEXT__
754
- }
755
- // inject component styles
756
- if (injectStyles) {
757
- injectStyles.call(this, context)
758
- }
759
- // register component module identifier for async chunk inferrence
760
- if (context && context._registeredComponents) {
761
- context._registeredComponents.add(moduleIdentifier)
762
- }
763
- }
764
- // used by ssr in case component is cached and beforeCreate
765
- // never gets called
766
- options._ssrRegister = hook
767
- } else if (injectStyles) {
768
- hook = shadowMode
769
- ? function () {
770
- injectStyles.call(
771
- this,
772
- (options.functional ? this.parent : this).$root.$options.shadowRoot
773
- )
774
- }
775
- : injectStyles
776
- }
777
-
778
- if (hook) {
779
- if (options.functional) {
780
- // for template-only hot-reload because in that case the render fn doesn't
781
- // go through the normalizer
782
- options._injectStyles = hook
783
- // register for functional component in vue file
784
- var originalRender = options.render
785
- options.render = function renderWithStyleInjection(h, context) {
786
- hook.call(context)
787
- return originalRender(h, context)
788
- }
789
- } else {
790
- // inject component registration as beforeCreate hook
791
- var existing = options.beforeCreate
792
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
793
- }
794
- }
795
-
796
- return {
797
- exports: scriptExports,
798
- options: options
799
- }
800
- }
801
-
802
-
803
- /***/ }),
804
-
805
- /***/ 3:
806
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
807
-
808
- "use strict";
809
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
810
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
811
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
812
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
813
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
814
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
815
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
816
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
817
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
818
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
819
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
820
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
821
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
822
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
823
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
824
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
825
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
826
- /* unused harmony export looseEqual */
827
- /* unused harmony export arrayEquals */
828
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
829
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
830
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
831
- /* unused harmony export objToArray */
832
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
833
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
834
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
835
- /* harmony import */ var element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
836
- 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; };
837
-
838
-
839
-
840
-
841
- var hasOwnProperty = Object.prototype.hasOwnProperty;
842
-
843
- function noop() {};
844
-
845
- function hasOwn(obj, key) {
846
- return hasOwnProperty.call(obj, key);
847
- };
848
-
849
- function extend(to, _from) {
850
- for (var key in _from) {
851
- to[key] = _from[key];
852
- }
853
- return to;
854
- };
855
-
856
- function toObject(arr) {
857
- var res = {};
858
- for (var i = 0; i < arr.length; i++) {
859
- if (arr[i]) {
860
- extend(res, arr[i]);
861
- }
862
- }
863
- return res;
864
- };
865
-
866
- var getValueByPath = function getValueByPath(object, prop) {
867
- prop = prop || '';
868
- var paths = prop.split('.');
869
- var current = object;
870
- var result = null;
871
- for (var i = 0, j = paths.length; i < j; i++) {
872
- var path = paths[i];
873
- if (!current) break;
874
-
875
- if (i === j - 1) {
876
- result = current[path];
877
- break;
878
- }
879
- current = current[path];
880
- }
881
- return result;
882
- };
883
-
884
- function getPropByPath(obj, path, strict) {
885
- var tempObj = obj;
886
- path = path.replace(/\[(\w+)\]/g, '.$1');
887
- path = path.replace(/^\./, '');
888
-
889
- var keyArr = path.split('.');
890
- var i = 0;
891
- for (var len = keyArr.length; i < len - 1; ++i) {
892
- if (!tempObj && !strict) break;
893
- var key = keyArr[i];
894
- if (key in tempObj) {
895
- tempObj = tempObj[key];
896
- } else {
897
- if (strict) {
898
- throw new Error('please transfer a valid prop path to form item!');
899
- }
900
- break;
901
- }
902
- }
903
- return {
904
- o: tempObj,
905
- k: keyArr[i],
906
- v: tempObj ? tempObj[keyArr[i]] : null
907
- };
908
- };
909
-
910
- var generateId = function generateId() {
911
- return Math.floor(Math.random() * 10000);
912
- };
913
-
914
- var valueEquals = function valueEquals(a, b) {
915
- // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
916
- if (a === b) return true;
917
- if (!(a instanceof Array)) return false;
918
- if (!(b instanceof Array)) return false;
919
- if (a.length !== b.length) return false;
920
- for (var i = 0; i !== a.length; ++i) {
921
- if (a[i] !== b[i]) return false;
922
- }
923
- return true;
924
- };
925
-
926
- var escapeRegexpString = function escapeRegexpString() {
927
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
928
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
929
- };
930
-
931
- // TODO: use native Array.find, Array.findIndex when IE support is dropped
932
- var arrayFindIndex = function arrayFindIndex(arr, pred) {
933
- for (var i = 0; i !== arr.length; ++i) {
934
- if (pred(arr[i])) {
935
- return i;
936
- }
937
- }
938
- return -1;
939
- };
940
-
941
- var arrayFind = function arrayFind(arr, pred) {
942
- var idx = arrayFindIndex(arr, pred);
943
- return idx !== -1 ? arr[idx] : undefined;
944
- };
945
-
946
- // coerce truthy value to array
947
- var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
948
- if (Array.isArray(val)) {
949
- return val;
950
- } else if (val) {
951
- return [val];
952
- } else {
953
- return [];
954
- }
955
- };
956
-
957
- var isIE = function isIE() {
958
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
959
- };
960
-
961
- var isEdge = function isEdge() {
962
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
963
- };
964
-
965
- var isFirefox = function isFirefox() {
966
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
967
- };
968
-
969
- var autoprefixer = function autoprefixer(style) {
970
- if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
971
- var rules = ['transform', 'transition', 'animation'];
972
- var prefixes = ['ms-', 'webkit-'];
973
- rules.forEach(function (rule) {
974
- var value = style[rule];
975
- if (rule && value) {
976
- prefixes.forEach(function (prefix) {
977
- style[prefix + rule] = value;
978
- });
979
- }
980
- });
981
- return style;
982
- };
983
-
984
- var kebabCase = function kebabCase(str) {
985
- var hyphenateRE = /([^-])([A-Z])/g;
986
- return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
987
- };
988
-
989
- var capitalize = function capitalize(str) {
990
- if (!Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
991
- return str.charAt(0).toUpperCase() + str.slice(1);
992
- };
993
-
994
- var looseEqual = function looseEqual(a, b) {
995
- var isObjectA = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
996
- var isObjectB = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
997
- if (isObjectA && isObjectB) {
998
- return JSON.stringify(a) === JSON.stringify(b);
999
- } else if (!isObjectA && !isObjectB) {
1000
- return String(a) === String(b);
1001
- } else {
1002
- return false;
1003
- }
1004
- };
1005
-
1006
- var arrayEquals = function arrayEquals(arrayA, arrayB) {
1007
- arrayA = arrayA || [];
1008
- arrayB = arrayB || [];
1009
-
1010
- if (arrayA.length !== arrayB.length) {
1011
- return false;
1012
- }
1013
-
1014
- for (var i = 0; i < arrayA.length; i++) {
1015
- if (!looseEqual(arrayA[i], arrayB[i])) {
1016
- return false;
1017
- }
1018
- }
1019
-
1020
- return true;
1021
- };
1022
-
1023
- var isEqual = function isEqual(value1, value2) {
1024
- if (Array.isArray(value1) && Array.isArray(value2)) {
1025
- return arrayEquals(value1, value2);
1026
- }
1027
- return looseEqual(value1, value2);
1028
- };
1029
-
1030
- var isEmpty = function isEmpty(val) {
1031
- // null or undefined
1032
- if (val == null) return true;
1033
-
1034
- if (typeof val === 'boolean') return false;
1035
-
1036
- if (typeof val === 'number') return !val;
1037
-
1038
- if (val instanceof Error) return val.message === '';
1039
-
1040
- switch (Object.prototype.toString.call(val)) {
1041
- // String or Array
1042
- case '[object String]':
1043
- case '[object Array]':
1044
- return !val.length;
1045
-
1046
- // Map or Set or File
1047
- case '[object File]':
1048
- case '[object Map]':
1049
- case '[object Set]':
1050
- {
1051
- return !val.size;
1052
- }
1053
- // Plain Object
1054
- case '[object Object]':
1055
- {
1056
- return !Object.keys(val).length;
1057
- }
1058
- }
1059
-
1060
- return false;
1061
- };
1062
-
1063
- function rafThrottle(fn) {
1064
- var locked = false;
1065
- return function () {
1066
- var _this = this;
1067
-
1068
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1069
- args[_key] = arguments[_key];
1070
- }
1071
-
1072
- if (locked) return;
1073
- locked = true;
1074
- window.requestAnimationFrame(function (_) {
1075
- fn.apply(_this, args);
1076
- locked = false;
1077
- });
1078
- };
1079
- }
1080
-
1081
- function objToArray(obj) {
1082
- if (Array.isArray(obj)) {
1083
- return obj;
1084
- }
1085
- return isEmpty(obj) ? [] : [obj];
1086
- }
1087
-
1088
- var isMac = function isMac() {
1089
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
1090
- };
1091
-
1092
- /***/ }),
1093
-
1094
- /***/ 38:
1095
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1096
-
1097
- "use strict";
1098
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isVNode; });
1099
- /* harmony import */ var element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
1100
- 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; };
1101
-
1102
-
1103
-
1104
- function isVNode(node) {
1105
- return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "j"])(node, 'componentOptions');
1106
- };
1107
-
1108
- /***/ }),
1109
-
1110
- /***/ 4:
1111
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1112
-
1113
- "use strict";
1114
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
1115
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
1116
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
1117
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
1118
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
1119
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
1120
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1121
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1122
- 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; };
1123
-
1124
-
1125
-
1126
- function isString(obj) {
1127
- return Object.prototype.toString.call(obj) === '[object String]';
1128
- }
1129
-
1130
- function isObject(obj) {
1131
- return Object.prototype.toString.call(obj) === '[object Object]';
1132
- }
1133
-
1134
- function isHtmlElement(node) {
1135
- return node && node.nodeType === Node.ELEMENT_NODE;
1136
- }
1137
-
1138
- /**
1139
- * - Inspired:
1140
- * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
1141
- */
1142
- var isFunction = function isFunction(functionToCheck) {
1143
- var getType = {};
1144
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
1145
- };
1146
-
1147
- if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
1148
- isFunction = function isFunction(obj) {
1149
- return typeof obj === 'function' || false;
1150
- };
1151
- }
1152
-
1153
-
1154
-
1155
- var isUndefined = function isUndefined(val) {
1156
- return val === void 0;
1157
- };
1158
-
1159
- var isDefined = function isDefined(val) {
1160
- return val !== undefined && val !== null;
1161
- };
1162
-
1163
- /***/ }),
1164
-
1165
- /***/ 7:
1166
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1167
-
1168
- "use strict";
1169
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
1170
- for (var i = 1, j = arguments.length; i < j; i++) {
1171
- var source = arguments[i] || {};
1172
- for (var prop in source) {
1173
- if (source.hasOwnProperty(prop)) {
1174
- var value = source[prop];
1175
- if (value !== undefined) {
1176
- target[prop] = value;
1177
- }
1178
- }
1179
- }
1180
- }
1181
-
1182
- return target;
1183
- });;
1184
-
1185
- /***/ }),
1186
-
1187
- /***/ 8:
1188
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1189
-
1190
- "use strict";
1191
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1192
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1193
-
1194
-
1195
- var scrollBarWidth = void 0;
1196
-
1197
- /* harmony default export */ __webpack_exports__["a"] = (function () {
1198
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
1199
- if (scrollBarWidth !== undefined) return scrollBarWidth;
1200
-
1201
- var outer = document.createElement('div');
1202
- outer.className = 'el-scrollbar__wrap';
1203
- outer.style.visibility = 'hidden';
1204
- outer.style.width = '100px';
1205
- outer.style.position = 'absolute';
1206
- outer.style.top = '-9999px';
1207
- document.body.appendChild(outer);
1208
-
1209
- var widthNoScroll = outer.offsetWidth;
1210
- outer.style.overflow = 'scroll';
1211
-
1212
- var inner = document.createElement('div');
1213
- inner.style.width = '100%';
1214
- outer.appendChild(inner);
1215
-
1216
- var widthWithScroll = inner.offsetWidth;
1217
- outer.parentNode.removeChild(outer);
1218
- scrollBarWidth = widthNoScroll - widthWithScroll;
1219
-
1220
- return scrollBarWidth;
1221
- });;
1222
-
1223
- /***/ }),
1224
-
1225
578
  /***/ 9:
1226
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1227
-
1228
- "use strict";
1229
-
1230
- // EXPORTS
1231
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
1232
-
1233
- // EXTERNAL MODULE: external "vue"
1234
- var external_vue_ = __webpack_require__(0);
1235
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
1236
-
1237
- // EXTERNAL MODULE: ./src/utils/merge.js
1238
- var merge = __webpack_require__(7);
1239
-
1240
- // EXTERNAL MODULE: ./src/utils/dom.js
1241
- var utils_dom = __webpack_require__(1);
1242
-
1243
- // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
1244
-
1245
-
1246
-
1247
- var hasModal = false;
1248
- var hasInitZIndex = false;
1249
- var popup_manager_zIndex = void 0;
1250
-
1251
- var popup_manager_getModal = function getModal() {
1252
- if (external_vue_default.a.prototype.$isServer) return;
1253
- var modalDom = PopupManager.modalDom;
1254
- if (modalDom) {
1255
- hasModal = true;
1256
- } else {
1257
- hasModal = false;
1258
- modalDom = document.createElement('div');
1259
- PopupManager.modalDom = modalDom;
1260
-
1261
- modalDom.addEventListener('touchmove', function (event) {
1262
- event.preventDefault();
1263
- event.stopPropagation();
1264
- });
1265
-
1266
- modalDom.addEventListener('click', function () {
1267
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
1268
- });
1269
- }
1270
-
1271
- return modalDom;
1272
- };
1273
-
1274
- var instances = {};
1275
-
1276
- var PopupManager = {
1277
- modalFade: true,
1278
-
1279
- getInstance: function getInstance(id) {
1280
- return instances[id];
1281
- },
1282
-
1283
- register: function register(id, instance) {
1284
- if (id && instance) {
1285
- instances[id] = instance;
1286
- }
1287
- },
1288
-
1289
- deregister: function deregister(id) {
1290
- if (id) {
1291
- instances[id] = null;
1292
- delete instances[id];
1293
- }
1294
- },
1295
-
1296
- nextZIndex: function nextZIndex() {
1297
- return PopupManager.zIndex++;
1298
- },
1299
-
1300
- modalStack: [],
1301
-
1302
- doOnModalClick: function doOnModalClick() {
1303
- var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1304
- if (!topItem) return;
1305
-
1306
- var instance = PopupManager.getInstance(topItem.id);
1307
- if (instance && instance.closeOnClickModal) {
1308
- instance.close();
1309
- }
1310
- },
1311
-
1312
- openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
1313
- if (external_vue_default.a.prototype.$isServer) return;
1314
- if (!id || zIndex === undefined) return;
1315
- this.modalFade = modalFade;
1316
-
1317
- var modalStack = this.modalStack;
1318
-
1319
- for (var i = 0, j = modalStack.length; i < j; i++) {
1320
- var item = modalStack[i];
1321
- if (item.id === id) {
1322
- return;
1323
- }
1324
- }
1325
-
1326
- var modalDom = popup_manager_getModal();
1327
-
1328
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
1329
- if (this.modalFade && !hasModal) {
1330
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
1331
- }
1332
- if (modalClass) {
1333
- var classArr = modalClass.trim().split(/\s+/);
1334
- classArr.forEach(function (item) {
1335
- return Object(utils_dom["a" /* addClass */])(modalDom, item);
1336
- });
1337
- }
1338
- setTimeout(function () {
1339
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
1340
- }, 200);
1341
-
1342
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
1343
- dom.parentNode.appendChild(modalDom);
1344
- } else {
1345
- document.body.appendChild(modalDom);
1346
- }
1347
-
1348
- if (zIndex) {
1349
- modalDom.style.zIndex = zIndex;
1350
- }
1351
- modalDom.tabIndex = 0;
1352
- modalDom.style.display = '';
1353
-
1354
- this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
1355
- },
1356
-
1357
- closeModal: function closeModal(id) {
1358
- var modalStack = this.modalStack;
1359
- var modalDom = popup_manager_getModal();
1360
-
1361
- if (modalStack.length > 0) {
1362
- var topItem = modalStack[modalStack.length - 1];
1363
- if (topItem.id === id) {
1364
- if (topItem.modalClass) {
1365
- var classArr = topItem.modalClass.trim().split(/\s+/);
1366
- classArr.forEach(function (item) {
1367
- return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1368
- });
1369
- }
1370
-
1371
- modalStack.pop();
1372
- if (modalStack.length > 0) {
1373
- modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1374
- }
1375
- } else {
1376
- for (var i = modalStack.length - 1; i >= 0; i--) {
1377
- if (modalStack[i].id === id) {
1378
- modalStack.splice(i, 1);
1379
- break;
1380
- }
1381
- }
1382
- }
1383
- }
1384
-
1385
- if (modalStack.length === 0) {
1386
- if (this.modalFade) {
1387
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1388
- }
1389
- setTimeout(function () {
1390
- if (modalStack.length === 0) {
1391
- if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1392
- modalDom.style.display = 'none';
1393
- PopupManager.modalDom = undefined;
1394
- }
1395
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1396
- }, 200);
1397
- }
1398
- }
1399
- };
1400
-
1401
- Object.defineProperty(PopupManager, 'zIndex', {
1402
- configurable: true,
1403
- get: function get() {
1404
- if (!hasInitZIndex) {
1405
- popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
1406
- hasInitZIndex = true;
1407
- }
1408
- return popup_manager_zIndex;
1409
- },
1410
- set: function set(value) {
1411
- popup_manager_zIndex = value;
1412
- }
1413
- });
1414
-
1415
- var popup_manager_getTopPopup = function getTopPopup() {
1416
- if (external_vue_default.a.prototype.$isServer) return;
1417
- if (PopupManager.modalStack.length > 0) {
1418
- var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1419
- if (!topPopup) return;
1420
- var instance = PopupManager.getInstance(topPopup.id);
1421
-
1422
- return instance;
1423
- }
1424
- };
1425
-
1426
- if (!external_vue_default.a.prototype.$isServer) {
1427
- // handle `esc` key when the popup is shown
1428
- window.addEventListener('keydown', function (event) {
1429
- if (event.keyCode === 27) {
1430
- var topPopup = popup_manager_getTopPopup();
1431
-
1432
- if (topPopup && topPopup.closeOnPressEscape) {
1433
- topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
1434
- }
1435
- }
1436
- });
1437
- }
1438
-
1439
- /* harmony default export */ var popup_manager = (PopupManager);
1440
- // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
1441
- var scrollbar_width = __webpack_require__(8);
1442
-
1443
- // CONCATENATED MODULE: ./src/utils/popup/index.js
1444
-
1445
-
1446
-
1447
-
1448
-
1449
-
1450
- var idSeed = 1;
1451
-
1452
- var scrollBarWidth = void 0;
1453
-
1454
- /* harmony default export */ var popup = __webpack_exports__["b"] = ({
1455
- props: {
1456
- visible: {
1457
- type: Boolean,
1458
- default: false
1459
- },
1460
- openDelay: {},
1461
- closeDelay: {},
1462
- zIndex: {},
1463
- modal: {
1464
- type: Boolean,
1465
- default: false
1466
- },
1467
- modalFade: {
1468
- type: Boolean,
1469
- default: true
1470
- },
1471
- modalClass: {},
1472
- modalAppendToBody: {
1473
- type: Boolean,
1474
- default: false
1475
- },
1476
- lockScroll: {
1477
- type: Boolean,
1478
- default: true
1479
- },
1480
- closeOnPressEscape: {
1481
- type: Boolean,
1482
- default: false
1483
- },
1484
- closeOnClickModal: {
1485
- type: Boolean,
1486
- default: false
1487
- }
1488
- },
1489
-
1490
- beforeMount: function beforeMount() {
1491
- this._popupId = 'popup-' + idSeed++;
1492
- popup_manager.register(this._popupId, this);
1493
- },
1494
- beforeDestroy: function beforeDestroy() {
1495
- popup_manager.deregister(this._popupId);
1496
- popup_manager.closeModal(this._popupId);
1497
-
1498
- this.restoreBodyStyle();
1499
- },
1500
- data: function data() {
1501
- return {
1502
- opened: false,
1503
- bodyPaddingRight: null,
1504
- computedBodyPaddingRight: 0,
1505
- withoutHiddenClass: true,
1506
- rendered: false
1507
- };
1508
- },
1509
-
1510
-
1511
- watch: {
1512
- visible: function visible(val) {
1513
- var _this = this;
1514
-
1515
- if (val) {
1516
- if (this._opening) return;
1517
- if (!this.rendered) {
1518
- this.rendered = true;
1519
- external_vue_default.a.nextTick(function () {
1520
- _this.open();
1521
- });
1522
- } else {
1523
- this.open();
1524
- }
1525
- } else {
1526
- this.close();
1527
- }
1528
- }
1529
- },
1530
-
1531
- methods: {
1532
- open: function open(options) {
1533
- var _this2 = this;
1534
-
1535
- if (!this.rendered) {
1536
- this.rendered = true;
1537
- }
1538
-
1539
- var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1540
-
1541
- if (this._closeTimer) {
1542
- clearTimeout(this._closeTimer);
1543
- this._closeTimer = null;
1544
- }
1545
- clearTimeout(this._openTimer);
1546
-
1547
- var openDelay = Number(props.openDelay);
1548
- if (openDelay > 0) {
1549
- this._openTimer = setTimeout(function () {
1550
- _this2._openTimer = null;
1551
- _this2.doOpen(props);
1552
- }, openDelay);
1553
- } else {
1554
- this.doOpen(props);
1555
- }
1556
- },
1557
- doOpen: function doOpen(props) {
1558
- if (this.$isServer) return;
1559
- if (this.willOpen && !this.willOpen()) return;
1560
- if (this.opened) return;
1561
-
1562
- this._opening = true;
1563
-
1564
- var dom = this.$el;
1565
-
1566
- var modal = props.modal;
1567
-
1568
- var zIndex = props.zIndex;
1569
- if (zIndex) {
1570
- popup_manager.zIndex = zIndex;
1571
- }
1572
-
1573
- if (modal) {
1574
- if (this._closing) {
1575
- popup_manager.closeModal(this._popupId);
1576
- this._closing = false;
1577
- }
1578
- popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1579
- if (props.lockScroll) {
1580
- this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1581
- if (this.withoutHiddenClass) {
1582
- this.bodyPaddingRight = document.body.style.paddingRight;
1583
- this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1584
- }
1585
- scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1586
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1587
- var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1588
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1589
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1590
- }
1591
- Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1592
- }
1593
- }
1594
-
1595
- if (getComputedStyle(dom).position === 'static') {
1596
- dom.style.position = 'absolute';
1597
- }
1598
-
1599
- dom.style.zIndex = popup_manager.nextZIndex();
1600
- this.opened = true;
1601
-
1602
- this.onOpen && this.onOpen();
1603
-
1604
- this.doAfterOpen();
1605
- },
1606
- doAfterOpen: function doAfterOpen() {
1607
- this._opening = false;
1608
- },
1609
- close: function close() {
1610
- var _this3 = this;
1611
-
1612
- if (this.willClose && !this.willClose()) return;
1613
-
1614
- if (this._openTimer !== null) {
1615
- clearTimeout(this._openTimer);
1616
- this._openTimer = null;
1617
- }
1618
- clearTimeout(this._closeTimer);
1619
-
1620
- var closeDelay = Number(this.closeDelay);
1621
-
1622
- if (closeDelay > 0) {
1623
- this._closeTimer = setTimeout(function () {
1624
- _this3._closeTimer = null;
1625
- _this3.doClose();
1626
- }, closeDelay);
1627
- } else {
1628
- this.doClose();
1629
- }
1630
- },
1631
- doClose: function doClose() {
1632
- this._closing = true;
1633
-
1634
- this.onClose && this.onClose();
1635
-
1636
- if (this.lockScroll) {
1637
- setTimeout(this.restoreBodyStyle, 200);
1638
- }
1639
-
1640
- this.opened = false;
1641
-
1642
- this.doAfterClose();
1643
- },
1644
- doAfterClose: function doAfterClose() {
1645
- popup_manager.closeModal(this._popupId);
1646
- this._closing = false;
1647
- },
1648
- restoreBodyStyle: function restoreBodyStyle() {
1649
- if (this.modal && this.withoutHiddenClass) {
1650
- document.body.style.paddingRight = this.bodyPaddingRight;
1651
- Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1652
- }
1653
- this.withoutHiddenClass = true;
1654
- }
1655
- }
1656
- });
1657
-
579
+ /***/ (function(module, exports) {
1658
580
 
581
+ module.exports = require("element-ui/src/utils/merge");
1659
582
 
1660
583
  /***/ })
1661
584