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/drawer.js CHANGED
@@ -82,261 +82,117 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 194);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 130);
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
- /***/ 194:
195
+ /***/ 130:
340
196
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
341
197
 
342
198
  "use strict";
@@ -468,11 +324,13 @@ render._withStripped = true
468
324
 
469
325
  // CONCATENATED MODULE: ./packages/drawer/src/main.vue?vue&type=template&id=19f4c8a0
470
326
 
471
- // EXTERNAL MODULE: ./src/utils/popup/index.js + 1 modules
472
- var popup = __webpack_require__(9);
327
+ // EXTERNAL MODULE: external "element-ui/src/utils/popup"
328
+ var popup_ = __webpack_require__(14);
329
+ var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
473
330
 
474
- // EXTERNAL MODULE: ./src/mixins/emitter.js
475
- var emitter = __webpack_require__(6);
331
+ // EXTERNAL MODULE: external "element-ui/src/mixins/emitter"
332
+ var emitter_ = __webpack_require__(4);
333
+ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
476
334
 
477
335
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/drawer/src/main.vue?vue&type=script&lang=js
478
336
 
@@ -481,7 +339,7 @@ var emitter = __webpack_require__(6);
481
339
 
482
340
  /* harmony default export */ var mainvue_type_script_lang_js = ({
483
341
  name: 'ElDrawer',
484
- mixins: [popup["b" /* default */], emitter["a" /* default */]],
342
+ mixins: [popup_default.a, emitter_default.a],
485
343
  props: {
486
344
  appendToBody: {
487
345
  type: Boolean,
@@ -637,7 +495,7 @@ var emitter = __webpack_require__(6);
637
495
  // CONCATENATED MODULE: ./packages/drawer/src/main.vue?vue&type=script&lang=js
638
496
  /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
639
497
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
640
- var componentNormalizer = __webpack_require__(2);
498
+ var componentNormalizer = __webpack_require__(0);
641
499
 
642
500
  // CONCATENATED MODULE: ./packages/drawer/src/main.vue
643
501
 
@@ -671,645 +529,17 @@ main.install = function (Vue) {
671
529
 
672
530
  /***/ }),
673
531
 
674
- /***/ 2:
675
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
676
-
677
- "use strict";
678
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
679
- /* globals __VUE_SSR_CONTEXT__ */
680
-
681
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
682
- // This module is a runtime utility for cleaner component module output and will
683
- // be included in the final webpack user bundle.
684
-
685
- function normalizeComponent(
686
- scriptExports,
687
- render,
688
- staticRenderFns,
689
- functionalTemplate,
690
- injectStyles,
691
- scopeId,
692
- moduleIdentifier /* server only */,
693
- shadowMode /* vue-cli only */
694
- ) {
695
- // Vue.extend constructor export interop
696
- var options =
697
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
698
-
699
- // render functions
700
- if (render) {
701
- options.render = render
702
- options.staticRenderFns = staticRenderFns
703
- options._compiled = true
704
- }
705
-
706
- // functional template
707
- if (functionalTemplate) {
708
- options.functional = true
709
- }
710
-
711
- // scopedId
712
- if (scopeId) {
713
- options._scopeId = 'data-v-' + scopeId
714
- }
715
-
716
- var hook
717
- if (moduleIdentifier) {
718
- // server build
719
- hook = function (context) {
720
- // 2.3 injection
721
- context =
722
- context || // cached call
723
- (this.$vnode && this.$vnode.ssrContext) || // stateful
724
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
725
- // 2.2 with runInNewContext: true
726
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
727
- context = __VUE_SSR_CONTEXT__
728
- }
729
- // inject component styles
730
- if (injectStyles) {
731
- injectStyles.call(this, context)
732
- }
733
- // register component module identifier for async chunk inferrence
734
- if (context && context._registeredComponents) {
735
- context._registeredComponents.add(moduleIdentifier)
736
- }
737
- }
738
- // used by ssr in case component is cached and beforeCreate
739
- // never gets called
740
- options._ssrRegister = hook
741
- } else if (injectStyles) {
742
- hook = shadowMode
743
- ? function () {
744
- injectStyles.call(
745
- this,
746
- (options.functional ? this.parent : this).$root.$options.shadowRoot
747
- )
748
- }
749
- : injectStyles
750
- }
751
-
752
- if (hook) {
753
- if (options.functional) {
754
- // for template-only hot-reload because in that case the render fn doesn't
755
- // go through the normalizer
756
- options._injectStyles = hook
757
- // register for functional component in vue file
758
- var originalRender = options.render
759
- options.render = function renderWithStyleInjection(h, context) {
760
- hook.call(context)
761
- return originalRender(h, context)
762
- }
763
- } else {
764
- // inject component registration as beforeCreate hook
765
- var existing = options.beforeCreate
766
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
767
- }
768
- }
769
-
770
- return {
771
- exports: scriptExports,
772
- options: options
773
- }
774
- }
775
-
776
-
777
- /***/ }),
778
-
779
- /***/ 6:
780
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
781
-
782
- "use strict";
783
- function _broadcast(componentName, eventName, params) {
784
- this.$children.forEach(function (child) {
785
- var name = child.$options.componentName;
786
-
787
- if (name === componentName) {
788
- child.$emit.apply(child, [eventName].concat(params));
789
- } else {
790
- _broadcast.apply(child, [componentName, eventName].concat([params]));
791
- }
792
- });
793
- }
794
- /* harmony default export */ __webpack_exports__["a"] = ({
795
- methods: {
796
- dispatch: function dispatch(componentName, eventName, params) {
797
- var parent = this.$parent || this.$root;
798
- var name = parent.$options.componentName;
799
-
800
- while (parent && (!name || name !== componentName)) {
801
- parent = parent.$parent;
802
-
803
- if (parent) {
804
- name = parent.$options.componentName;
805
- }
806
- }
807
- if (parent) {
808
- parent.$emit.apply(parent, [eventName].concat(params));
809
- }
810
- },
811
- broadcast: function broadcast(componentName, eventName, params) {
812
- _broadcast.call(this, componentName, eventName, params);
813
- }
814
- }
815
- });
816
-
817
- /***/ }),
818
-
819
- /***/ 7:
820
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
821
-
822
- "use strict";
823
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
824
- for (var i = 1, j = arguments.length; i < j; i++) {
825
- var source = arguments[i] || {};
826
- for (var prop in source) {
827
- if (source.hasOwnProperty(prop)) {
828
- var value = source[prop];
829
- if (value !== undefined) {
830
- target[prop] = value;
831
- }
832
- }
833
- }
834
- }
835
-
836
- return target;
837
- });;
838
-
839
- /***/ }),
840
-
841
- /***/ 8:
842
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
843
-
844
- "use strict";
845
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
846
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
847
-
848
-
849
- var scrollBarWidth = void 0;
850
-
851
- /* harmony default export */ __webpack_exports__["a"] = (function () {
852
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
853
- if (scrollBarWidth !== undefined) return scrollBarWidth;
854
-
855
- var outer = document.createElement('div');
856
- outer.className = 'el-scrollbar__wrap';
857
- outer.style.visibility = 'hidden';
858
- outer.style.width = '100px';
859
- outer.style.position = 'absolute';
860
- outer.style.top = '-9999px';
861
- document.body.appendChild(outer);
862
-
863
- var widthNoScroll = outer.offsetWidth;
864
- outer.style.overflow = 'scroll';
865
-
866
- var inner = document.createElement('div');
867
- inner.style.width = '100%';
868
- outer.appendChild(inner);
869
-
870
- var widthWithScroll = inner.offsetWidth;
871
- outer.parentNode.removeChild(outer);
872
- scrollBarWidth = widthNoScroll - widthWithScroll;
532
+ /***/ 14:
533
+ /***/ (function(module, exports) {
873
534
 
874
- return scrollBarWidth;
875
- });;
535
+ module.exports = require("element-ui/src/utils/popup");
876
536
 
877
537
  /***/ }),
878
538
 
879
- /***/ 9:
880
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
881
-
882
- "use strict";
883
-
884
- // EXPORTS
885
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
886
-
887
- // EXTERNAL MODULE: external "vue"
888
- var external_vue_ = __webpack_require__(0);
889
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
890
-
891
- // EXTERNAL MODULE: ./src/utils/merge.js
892
- var merge = __webpack_require__(7);
893
-
894
- // EXTERNAL MODULE: ./src/utils/dom.js
895
- var utils_dom = __webpack_require__(1);
896
-
897
- // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
898
-
899
-
900
-
901
- var hasModal = false;
902
- var hasInitZIndex = false;
903
- var popup_manager_zIndex = void 0;
904
-
905
- var popup_manager_getModal = function getModal() {
906
- if (external_vue_default.a.prototype.$isServer) return;
907
- var modalDom = PopupManager.modalDom;
908
- if (modalDom) {
909
- hasModal = true;
910
- } else {
911
- hasModal = false;
912
- modalDom = document.createElement('div');
913
- PopupManager.modalDom = modalDom;
914
-
915
- modalDom.addEventListener('touchmove', function (event) {
916
- event.preventDefault();
917
- event.stopPropagation();
918
- });
919
-
920
- modalDom.addEventListener('click', function () {
921
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
922
- });
923
- }
924
-
925
- return modalDom;
926
- };
927
-
928
- var instances = {};
929
-
930
- var PopupManager = {
931
- modalFade: true,
932
-
933
- getInstance: function getInstance(id) {
934
- return instances[id];
935
- },
936
-
937
- register: function register(id, instance) {
938
- if (id && instance) {
939
- instances[id] = instance;
940
- }
941
- },
942
-
943
- deregister: function deregister(id) {
944
- if (id) {
945
- instances[id] = null;
946
- delete instances[id];
947
- }
948
- },
949
-
950
- nextZIndex: function nextZIndex() {
951
- return PopupManager.zIndex++;
952
- },
953
-
954
- modalStack: [],
955
-
956
- doOnModalClick: function doOnModalClick() {
957
- var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
958
- if (!topItem) return;
959
-
960
- var instance = PopupManager.getInstance(topItem.id);
961
- if (instance && instance.closeOnClickModal) {
962
- instance.close();
963
- }
964
- },
965
-
966
- openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
967
- if (external_vue_default.a.prototype.$isServer) return;
968
- if (!id || zIndex === undefined) return;
969
- this.modalFade = modalFade;
970
-
971
- var modalStack = this.modalStack;
972
-
973
- for (var i = 0, j = modalStack.length; i < j; i++) {
974
- var item = modalStack[i];
975
- if (item.id === id) {
976
- return;
977
- }
978
- }
979
-
980
- var modalDom = popup_manager_getModal();
981
-
982
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
983
- if (this.modalFade && !hasModal) {
984
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
985
- }
986
- if (modalClass) {
987
- var classArr = modalClass.trim().split(/\s+/);
988
- classArr.forEach(function (item) {
989
- return Object(utils_dom["a" /* addClass */])(modalDom, item);
990
- });
991
- }
992
- setTimeout(function () {
993
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
994
- }, 200);
995
-
996
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
997
- dom.parentNode.appendChild(modalDom);
998
- } else {
999
- document.body.appendChild(modalDom);
1000
- }
1001
-
1002
- if (zIndex) {
1003
- modalDom.style.zIndex = zIndex;
1004
- }
1005
- modalDom.tabIndex = 0;
1006
- modalDom.style.display = '';
1007
-
1008
- this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
1009
- },
1010
-
1011
- closeModal: function closeModal(id) {
1012
- var modalStack = this.modalStack;
1013
- var modalDom = popup_manager_getModal();
1014
-
1015
- if (modalStack.length > 0) {
1016
- var topItem = modalStack[modalStack.length - 1];
1017
- if (topItem.id === id) {
1018
- if (topItem.modalClass) {
1019
- var classArr = topItem.modalClass.trim().split(/\s+/);
1020
- classArr.forEach(function (item) {
1021
- return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1022
- });
1023
- }
1024
-
1025
- modalStack.pop();
1026
- if (modalStack.length > 0) {
1027
- modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1028
- }
1029
- } else {
1030
- for (var i = modalStack.length - 1; i >= 0; i--) {
1031
- if (modalStack[i].id === id) {
1032
- modalStack.splice(i, 1);
1033
- break;
1034
- }
1035
- }
1036
- }
1037
- }
1038
-
1039
- if (modalStack.length === 0) {
1040
- if (this.modalFade) {
1041
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1042
- }
1043
- setTimeout(function () {
1044
- if (modalStack.length === 0) {
1045
- if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1046
- modalDom.style.display = 'none';
1047
- PopupManager.modalDom = undefined;
1048
- }
1049
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1050
- }, 200);
1051
- }
1052
- }
1053
- };
1054
-
1055
- Object.defineProperty(PopupManager, 'zIndex', {
1056
- configurable: true,
1057
- get: function get() {
1058
- if (!hasInitZIndex) {
1059
- popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
1060
- hasInitZIndex = true;
1061
- }
1062
- return popup_manager_zIndex;
1063
- },
1064
- set: function set(value) {
1065
- popup_manager_zIndex = value;
1066
- }
1067
- });
1068
-
1069
- var popup_manager_getTopPopup = function getTopPopup() {
1070
- if (external_vue_default.a.prototype.$isServer) return;
1071
- if (PopupManager.modalStack.length > 0) {
1072
- var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1073
- if (!topPopup) return;
1074
- var instance = PopupManager.getInstance(topPopup.id);
1075
-
1076
- return instance;
1077
- }
1078
- };
1079
-
1080
- if (!external_vue_default.a.prototype.$isServer) {
1081
- // handle `esc` key when the popup is shown
1082
- window.addEventListener('keydown', function (event) {
1083
- if (event.keyCode === 27) {
1084
- var topPopup = popup_manager_getTopPopup();
1085
-
1086
- if (topPopup && topPopup.closeOnPressEscape) {
1087
- topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
1088
- }
1089
- }
1090
- });
1091
- }
1092
-
1093
- /* harmony default export */ var popup_manager = (PopupManager);
1094
- // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
1095
- var scrollbar_width = __webpack_require__(8);
1096
-
1097
- // CONCATENATED MODULE: ./src/utils/popup/index.js
1098
-
1099
-
1100
-
1101
-
1102
-
1103
-
1104
- var idSeed = 1;
1105
-
1106
- var scrollBarWidth = void 0;
1107
-
1108
- /* harmony default export */ var popup = __webpack_exports__["b"] = ({
1109
- props: {
1110
- visible: {
1111
- type: Boolean,
1112
- default: false
1113
- },
1114
- openDelay: {},
1115
- closeDelay: {},
1116
- zIndex: {},
1117
- modal: {
1118
- type: Boolean,
1119
- default: false
1120
- },
1121
- modalFade: {
1122
- type: Boolean,
1123
- default: true
1124
- },
1125
- modalClass: {},
1126
- modalAppendToBody: {
1127
- type: Boolean,
1128
- default: false
1129
- },
1130
- lockScroll: {
1131
- type: Boolean,
1132
- default: true
1133
- },
1134
- closeOnPressEscape: {
1135
- type: Boolean,
1136
- default: false
1137
- },
1138
- closeOnClickModal: {
1139
- type: Boolean,
1140
- default: false
1141
- }
1142
- },
1143
-
1144
- beforeMount: function beforeMount() {
1145
- this._popupId = 'popup-' + idSeed++;
1146
- popup_manager.register(this._popupId, this);
1147
- },
1148
- beforeDestroy: function beforeDestroy() {
1149
- popup_manager.deregister(this._popupId);
1150
- popup_manager.closeModal(this._popupId);
1151
-
1152
- this.restoreBodyStyle();
1153
- },
1154
- data: function data() {
1155
- return {
1156
- opened: false,
1157
- bodyPaddingRight: null,
1158
- computedBodyPaddingRight: 0,
1159
- withoutHiddenClass: true,
1160
- rendered: false
1161
- };
1162
- },
1163
-
1164
-
1165
- watch: {
1166
- visible: function visible(val) {
1167
- var _this = this;
1168
-
1169
- if (val) {
1170
- if (this._opening) return;
1171
- if (!this.rendered) {
1172
- this.rendered = true;
1173
- external_vue_default.a.nextTick(function () {
1174
- _this.open();
1175
- });
1176
- } else {
1177
- this.open();
1178
- }
1179
- } else {
1180
- this.close();
1181
- }
1182
- }
1183
- },
1184
-
1185
- methods: {
1186
- open: function open(options) {
1187
- var _this2 = this;
1188
-
1189
- if (!this.rendered) {
1190
- this.rendered = true;
1191
- }
1192
-
1193
- var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1194
-
1195
- if (this._closeTimer) {
1196
- clearTimeout(this._closeTimer);
1197
- this._closeTimer = null;
1198
- }
1199
- clearTimeout(this._openTimer);
1200
-
1201
- var openDelay = Number(props.openDelay);
1202
- if (openDelay > 0) {
1203
- this._openTimer = setTimeout(function () {
1204
- _this2._openTimer = null;
1205
- _this2.doOpen(props);
1206
- }, openDelay);
1207
- } else {
1208
- this.doOpen(props);
1209
- }
1210
- },
1211
- doOpen: function doOpen(props) {
1212
- if (this.$isServer) return;
1213
- if (this.willOpen && !this.willOpen()) return;
1214
- if (this.opened) return;
1215
-
1216
- this._opening = true;
1217
-
1218
- var dom = this.$el;
1219
-
1220
- var modal = props.modal;
1221
-
1222
- var zIndex = props.zIndex;
1223
- if (zIndex) {
1224
- popup_manager.zIndex = zIndex;
1225
- }
1226
-
1227
- if (modal) {
1228
- if (this._closing) {
1229
- popup_manager.closeModal(this._popupId);
1230
- this._closing = false;
1231
- }
1232
- popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1233
- if (props.lockScroll) {
1234
- this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1235
- if (this.withoutHiddenClass) {
1236
- this.bodyPaddingRight = document.body.style.paddingRight;
1237
- this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1238
- }
1239
- scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1240
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1241
- var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1242
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1243
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1244
- }
1245
- Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1246
- }
1247
- }
1248
-
1249
- if (getComputedStyle(dom).position === 'static') {
1250
- dom.style.position = 'absolute';
1251
- }
1252
-
1253
- dom.style.zIndex = popup_manager.nextZIndex();
1254
- this.opened = true;
1255
-
1256
- this.onOpen && this.onOpen();
1257
-
1258
- this.doAfterOpen();
1259
- },
1260
- doAfterOpen: function doAfterOpen() {
1261
- this._opening = false;
1262
- },
1263
- close: function close() {
1264
- var _this3 = this;
1265
-
1266
- if (this.willClose && !this.willClose()) return;
1267
-
1268
- if (this._openTimer !== null) {
1269
- clearTimeout(this._openTimer);
1270
- this._openTimer = null;
1271
- }
1272
- clearTimeout(this._closeTimer);
1273
-
1274
- var closeDelay = Number(this.closeDelay);
1275
-
1276
- if (closeDelay > 0) {
1277
- this._closeTimer = setTimeout(function () {
1278
- _this3._closeTimer = null;
1279
- _this3.doClose();
1280
- }, closeDelay);
1281
- } else {
1282
- this.doClose();
1283
- }
1284
- },
1285
- doClose: function doClose() {
1286
- this._closing = true;
1287
-
1288
- this.onClose && this.onClose();
1289
-
1290
- if (this.lockScroll) {
1291
- setTimeout(this.restoreBodyStyle, 200);
1292
- }
1293
-
1294
- this.opened = false;
1295
-
1296
- this.doAfterClose();
1297
- },
1298
- doAfterClose: function doAfterClose() {
1299
- popup_manager.closeModal(this._popupId);
1300
- this._closing = false;
1301
- },
1302
- restoreBodyStyle: function restoreBodyStyle() {
1303
- if (this.modal && this.withoutHiddenClass) {
1304
- document.body.style.paddingRight = this.bodyPaddingRight;
1305
- Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1306
- }
1307
- this.withoutHiddenClass = true;
1308
- }
1309
- }
1310
- });
1311
-
539
+ /***/ 4:
540
+ /***/ (function(module, exports) {
1312
541
 
542
+ module.exports = require("element-ui/src/mixins/emitter");
1313
543
 
1314
544
  /***/ })
1315
545