cy-element-ui 1.0.52 → 1.0.53

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 (120) hide show
  1. package/lib/alert.js +108 -108
  2. package/lib/aside.js +77 -77
  3. package/lib/autocomplete.js +5199 -360
  4. package/lib/avatar.js +4 -4
  5. package/lib/backtop.js +192 -101
  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 +1734 -137
  12. package/lib/card.js +96 -96
  13. package/lib/carousel-item.js +452 -108
  14. package/lib/carousel.js +1256 -105
  15. package/lib/cascader-panel.js +3524 -191
  16. package/lib/cascader.js +8077 -717
  17. package/lib/checkbox-button.js +151 -119
  18. package/lib/checkbox-group.js +47 -15
  19. package/lib/checkbox.js +47 -15
  20. package/lib/col.js +2 -2
  21. package/lib/collapse-item.js +815 -110
  22. package/lib/collapse.js +108 -108
  23. package/lib/color-picker.js +4705 -828
  24. package/lib/container.js +88 -88
  25. package/lib/date-picker.js +10735 -4709
  26. package/lib/descriptions-item.js +2 -2
  27. package/lib/descriptions.js +63 -8
  28. package/lib/dialog.js +1200 -22
  29. package/lib/directives/repeat-click.js +2 -2
  30. package/lib/divider.js +104 -104
  31. package/lib/drawer.js +875 -105
  32. package/lib/dropdown-item.js +128 -96
  33. package/lib/dropdown-menu.js +2301 -99
  34. package/lib/dropdown.js +990 -54
  35. package/lib/element-ui.common.js +31129 -13451
  36. package/lib/empty.js +793 -99
  37. package/lib/fileUpload.js +2542 -26
  38. package/lib/footer.js +77 -77
  39. package/lib/form-item.js +3305 -202
  40. package/lib/form.js +129 -115
  41. package/lib/header.js +77 -77
  42. package/lib/icon.js +67 -67
  43. package/lib/image.js +1662 -146
  44. package/lib/index.js +1 -1
  45. package/lib/infinite-scroll.js +435 -26
  46. package/lib/input-number.js +1458 -24
  47. package/lib/input.js +509 -37
  48. package/lib/link.js +4 -4
  49. package/lib/loading.js +886 -149
  50. package/lib/locale/format.js +1 -1
  51. package/lib/main.js +64 -64
  52. package/lib/menu-item-group.js +103 -103
  53. package/lib/menu-item.js +3140 -137
  54. package/lib/menu.js +1058 -123
  55. package/lib/message-box.js +2743 -188
  56. package/lib/message.js +1196 -118
  57. package/lib/mixins/migrating.js +1 -1
  58. package/lib/notification.js +1196 -119
  59. package/lib/option-group.js +151 -119
  60. package/lib/option.js +392 -16
  61. package/lib/page-header.js +781 -87
  62. package/lib/pagination.js +7747 -646
  63. package/lib/popconfirm.js +3606 -219
  64. package/lib/popover.js +2604 -79
  65. package/lib/progress.js +4 -4
  66. package/lib/radio-button.js +151 -119
  67. package/lib/radio-group.js +151 -119
  68. package/lib/radio.js +47 -15
  69. package/lib/rate.js +756 -113
  70. package/lib/result.js +108 -108
  71. package/lib/row.js +2 -2
  72. package/lib/scrollbar.js +1813 -41
  73. package/lib/select.js +5547 -209
  74. package/lib/selectDisplayInput.js +4 -4
  75. package/lib/skeleton-item.js +108 -108
  76. package/lib/skeleton.js +108 -108
  77. package/lib/slider.js +4768 -530
  78. package/lib/spinner.js +100 -100
  79. package/lib/statistic.js +9600 -112
  80. package/lib/step.js +108 -108
  81. package/lib/steps.js +514 -99
  82. package/lib/subTitle.js +91 -91
  83. package/lib/submenu.js +2397 -76
  84. package/lib/switch.js +582 -127
  85. package/lib/tab-pane.js +108 -108
  86. package/lib/tabDialog.js +1630 -104
  87. package/lib/table-column.js +1115 -267
  88. package/lib/table.js +7085 -1253
  89. package/lib/tabs.js +1615 -113
  90. package/lib/tag.js +4 -4
  91. package/lib/time-picker.js +6487 -550
  92. package/lib/time-select.js +6334 -407
  93. package/lib/timeline-item.js +108 -108
  94. package/lib/timeline.js +4 -4
  95. package/lib/tooltip.js +2688 -44
  96. package/lib/transfer.js +2238 -146
  97. package/lib/transitions/collapse-transition.js +1 -1
  98. package/lib/tree.js +1563 -148
  99. package/lib/treeSelect.js +3421 -106
  100. package/lib/upload.js +1198 -31
  101. package/lib/utils/clickoutside.js +1 -1
  102. package/lib/utils/date-util.js +2 -2
  103. package/lib/utils/popup/index.js +2 -2
  104. package/lib/utils/popup/popup-manager.js +1 -1
  105. package/lib/utils/util.js +1 -1
  106. package/lib/utils/vdom.js +1 -1
  107. package/lib/utils/vue-popper.js +1 -1
  108. package/package.json +1 -1
  109. package/src/directives/repeat-click.js +2 -2
  110. package/src/index.js +1 -1
  111. package/src/locale/format.js +1 -1
  112. package/src/mixins/migrating.js +1 -1
  113. package/src/transitions/collapse-transition.js +1 -1
  114. package/src/utils/clickoutside.js +1 -1
  115. package/src/utils/date-util.js +2 -2
  116. package/src/utils/popup/index.js +2 -2
  117. package/src/utils/popup/popup-manager.js +1 -1
  118. package/src/utils/util.js +1 -1
  119. package/src/utils/vdom.js +1 -1
  120. package/src/utils/vue-popper.js +1 -1
package/lib/loading.js CHANGED
@@ -82,145 +82,261 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 77);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 149);
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:
91
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
99
 
93
100
  "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
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
+ };
96
135
 
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.
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
+ }();
100
169
 
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
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
+ };
114
180
 
115
- // render functions
116
- if (render) {
117
- options.render = render
118
- options.staticRenderFns = staticRenderFns
119
- options._compiled = true
120
- }
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
+ };
121
191
 
122
- // functional template
123
- if (functionalTemplate) {
124
- options.functional = true
125
- }
192
+ /* istanbul ignore next */
193
+ function addClass(el, cls) {
194
+ if (!el) return;
195
+ var curClass = el.className;
196
+ var classes = (cls || '').split(' ');
126
197
 
127
- // scopedId
128
- if (scopeId) {
129
- options._scopeId = 'data-v-' + scopeId
130
- }
198
+ for (var i = 0, j = classes.length; i < j; i++) {
199
+ var clsName = classes[i];
200
+ if (!clsName) continue;
131
201
 
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
- }
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
+ };
167
212
 
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
- }
213
+ /* istanbul ignore next */
214
+ function removeClass(el, cls) {
215
+ if (!el || !cls) return;
216
+ var classes = cls.split(' ');
217
+ var curClass = ' ' + el.className + ' ';
185
218
 
186
- return {
187
- exports: scriptExports,
188
- options: options
189
- }
190
- }
219
+ for (var i = 0, j = classes.length; i < j; i++) {
220
+ var clsName = classes[i];
221
+ if (!clsName) continue;
191
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
+ };
192
233
 
193
- /***/ }),
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
+ };
194
270
 
195
- /***/ 14:
196
- /***/ (function(module, exports) {
271
+ /* istanbul ignore next */
272
+ function setStyle(element, styleName, value) {
273
+ if (!element || !styleName) return;
197
274
 
198
- module.exports = require("element-ui/src/utils/popup");
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
+ };
199
290
 
200
- /***/ }),
291
+ var isScroll = function isScroll(el, vertical) {
292
+ if (isServer) return;
201
293
 
202
- /***/ 2:
203
- /***/ (function(module, exports) {
294
+ var determinedDirection = vertical !== null && vertical !== undefined;
295
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
204
296
 
205
- module.exports = require("element-ui/src/utils/dom");
297
+ return overflow.match(/(scroll|auto|overlay)/);
298
+ };
206
299
 
207
- /***/ }),
300
+ var getScrollContainer = function getScrollContainer(el, vertical) {
301
+ if (isServer) return;
208
302
 
209
- /***/ 43:
210
- /***/ (function(module, exports) {
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
+ }
211
313
 
212
- module.exports = require("element-ui/src/utils/after-leave");
314
+ return parent;
315
+ };
213
316
 
214
- /***/ }),
317
+ var isInContainer = function isInContainer(el, container) {
318
+ if (isServer || !el || !container) return false;
215
319
 
216
- /***/ 7:
217
- /***/ (function(module, exports) {
320
+ var elRect = el.getBoundingClientRect();
321
+ var containerRect = void 0;
218
322
 
219
- module.exports = require("vue");
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
+ }
333
+
334
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
335
+ };
220
336
 
221
337
  /***/ }),
222
338
 
223
- /***/ 77:
339
+ /***/ 149:
224
340
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
225
341
 
226
342
  "use strict";
@@ -228,7 +344,7 @@ module.exports = require("vue");
228
344
  __webpack_require__.r(__webpack_exports__);
229
345
 
230
346
  // EXTERNAL MODULE: external "vue"
231
- var external_vue_ = __webpack_require__(7);
347
+ var external_vue_ = __webpack_require__(0);
232
348
  var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
233
349
 
234
350
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/loading/src/loading.vue?vue&type=template&id=897d5e8e
@@ -318,7 +434,7 @@ render._withStripped = true
318
434
  // CONCATENATED MODULE: ./packages/loading/src/loading.vue?vue&type=script&lang=js
319
435
  /* harmony default export */ var src_loadingvue_type_script_lang_js = (loadingvue_type_script_lang_js);
320
436
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
321
- var componentNormalizer = __webpack_require__(0);
437
+ var componentNormalizer = __webpack_require__(2);
322
438
 
323
439
  // CONCATENATED MODULE: ./packages/loading/src/loading.vue
324
440
 
@@ -340,16 +456,43 @@ var component = Object(componentNormalizer["a" /* default */])(
340
456
  )
341
457
 
342
458
  /* harmony default export */ var loading = (component.exports);
343
- // EXTERNAL MODULE: external "element-ui/src/utils/dom"
344
- var dom_ = __webpack_require__(2);
345
-
346
- // EXTERNAL MODULE: external "element-ui/src/utils/popup"
347
- var popup_ = __webpack_require__(14);
348
-
349
- // EXTERNAL MODULE: external "element-ui/src/utils/after-leave"
350
- var after_leave_ = __webpack_require__(43);
351
- var after_leave_default = /*#__PURE__*/__webpack_require__.n(after_leave_);
352
-
459
+ // EXTERNAL MODULE: ./src/utils/dom.js
460
+ var dom = __webpack_require__(1);
461
+
462
+ // EXTERNAL MODULE: ./src/utils/popup/index.js + 1 modules
463
+ var popup = __webpack_require__(9);
464
+
465
+ // CONCATENATED MODULE: ./src/utils/after-leave.js
466
+ /**
467
+ * Bind after-leave event for vue instance. Make sure after-leave is called in any browsers.
468
+ *
469
+ * @param {Vue} instance Vue instance.
470
+ * @param {Function} callback callback of after-leave event
471
+ * @param {Number} speed the speed of transition, default value is 300ms
472
+ * @param {Boolean} once weather bind after-leave once. default value is false.
473
+ */
474
+ /* harmony default export */ var after_leave = (function (instance, callback) {
475
+ var speed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
476
+ var once = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
477
+
478
+ if (!instance || !callback) throw new Error('instance & callback is required');
479
+ var called = false;
480
+ var afterLeaveCallback = function afterLeaveCallback() {
481
+ if (called) return;
482
+ called = true;
483
+ if (callback) {
484
+ callback.apply(null, arguments);
485
+ }
486
+ };
487
+ if (once) {
488
+ instance.$once('after-leave', afterLeaveCallback);
489
+ } else {
490
+ instance.$on('after-leave', afterLeaveCallback);
491
+ }
492
+ setTimeout(function () {
493
+ afterLeaveCallback();
494
+ }, speed + 100);
495
+ });;
353
496
  // CONCATENATED MODULE: ./packages/loading/src/directive.js
354
497
 
355
498
 
@@ -365,21 +508,21 @@ loadingDirective.install = function (Vue) {
365
508
  if (binding.value) {
366
509
  Vue.nextTick(function () {
367
510
  if (binding.modifiers.fullscreen) {
368
- el.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
369
- el.originalOverflow = Object(dom_["getStyle"])(document.body, 'overflow');
370
- el.maskStyle.zIndex = popup_["PopupManager"].nextZIndex();
511
+ el.originalPosition = Object(dom["c" /* getStyle */])(document.body, 'position');
512
+ el.originalOverflow = Object(dom["c" /* getStyle */])(document.body, 'overflow');
513
+ el.maskStyle.zIndex = popup["a" /* PopupManager */].nextZIndex();
371
514
 
372
- Object(dom_["addClass"])(el.mask, 'is-fullscreen');
515
+ Object(dom["a" /* addClass */])(el.mask, 'is-fullscreen');
373
516
  insertDom(document.body, el, binding);
374
517
  } else {
375
- Object(dom_["removeClass"])(el.mask, 'is-fullscreen');
518
+ Object(dom["i" /* removeClass */])(el.mask, 'is-fullscreen');
376
519
 
377
520
  if (binding.modifiers.body) {
378
- el.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
521
+ el.originalPosition = Object(dom["c" /* getStyle */])(document.body, 'position');
379
522
 
380
523
  ['top', 'left'].forEach(function (property) {
381
524
  var scroll = property === 'top' ? 'scrollTop' : 'scrollLeft';
382
- el.maskStyle[property] = el.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - parseInt(Object(dom_["getStyle"])(document.body, 'margin-' + property), 10) + 'px';
525
+ el.maskStyle[property] = el.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - parseInt(Object(dom["c" /* getStyle */])(document.body, 'margin-' + property), 10) + 'px';
383
526
  });
384
527
  ['height', 'width'].forEach(function (property) {
385
528
  el.maskStyle[property] = el.getBoundingClientRect()[property] + 'px';
@@ -387,18 +530,18 @@ loadingDirective.install = function (Vue) {
387
530
 
388
531
  insertDom(document.body, el, binding);
389
532
  } else {
390
- el.originalPosition = Object(dom_["getStyle"])(el, 'position');
533
+ el.originalPosition = Object(dom["c" /* getStyle */])(el, 'position');
391
534
  insertDom(el, el, binding);
392
535
  }
393
536
  }
394
537
  });
395
538
  } else {
396
- after_leave_default()(el.instance, function (_) {
539
+ after_leave(el.instance, function (_) {
397
540
  if (!el.instance.hiding) return;
398
541
  el.domVisible = false;
399
542
  var target = binding.modifiers.fullscreen || binding.modifiers.body ? document.body : el;
400
- Object(dom_["removeClass"])(target, 'el-loading-parent--relative');
401
- Object(dom_["removeClass"])(target, 'el-loading-parent--hidden');
543
+ Object(dom["i" /* removeClass */])(target, 'el-loading-parent--relative');
544
+ Object(dom["i" /* removeClass */])(target, 'el-loading-parent--hidden');
402
545
  el.instance.hiding = false;
403
546
  }, 300, true);
404
547
  el.instance.visible = false;
@@ -406,16 +549,16 @@ loadingDirective.install = function (Vue) {
406
549
  }
407
550
  };
408
551
  var insertDom = function insertDom(parent, el, binding) {
409
- if (!el.domVisible && Object(dom_["getStyle"])(el, 'display') !== 'none' && Object(dom_["getStyle"])(el, 'visibility') !== 'hidden') {
552
+ if (!el.domVisible && Object(dom["c" /* getStyle */])(el, 'display') !== 'none' && Object(dom["c" /* getStyle */])(el, 'visibility') !== 'hidden') {
410
553
  Object.keys(el.maskStyle).forEach(function (property) {
411
554
  el.mask.style[property] = el.maskStyle[property];
412
555
  });
413
556
 
414
557
  if (el.originalPosition !== 'absolute' && el.originalPosition !== 'fixed' && el.originalPosition !== 'sticky') {
415
- Object(dom_["addClass"])(parent, 'el-loading-parent--relative');
558
+ Object(dom["a" /* addClass */])(parent, 'el-loading-parent--relative');
416
559
  }
417
560
  if (binding.modifiers.fullscreen && binding.modifiers.lock) {
418
- Object(dom_["addClass"])(parent, 'el-loading-parent--hidden');
561
+ Object(dom["a" /* addClass */])(parent, 'el-loading-parent--hidden');
419
562
  }
420
563
  el.domVisible = true;
421
564
 
@@ -476,9 +619,8 @@ loadingDirective.install = function (Vue) {
476
619
  };
477
620
 
478
621
  /* harmony default export */ var directive = (loadingDirective);
479
- // EXTERNAL MODULE: external "element-ui/src/utils/merge"
480
- var merge_ = __webpack_require__(9);
481
- var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
622
+ // EXTERNAL MODULE: ./src/utils/merge.js
623
+ var merge = __webpack_require__(7);
482
624
 
483
625
  // CONCATENATED MODULE: ./packages/loading/src/index.js
484
626
 
@@ -509,10 +651,10 @@ LoadingConstructor.prototype.close = function () {
509
651
  if (this.fullscreen) {
510
652
  fullscreenLoading = undefined;
511
653
  }
512
- after_leave_default()(this, function (_) {
654
+ after_leave(this, function (_) {
513
655
  var target = _this.fullscreen || _this.body ? document.body : _this.target;
514
- Object(dom_["removeClass"])(target, 'el-loading-parent--relative');
515
- Object(dom_["removeClass"])(target, 'el-loading-parent--hidden');
656
+ Object(dom["i" /* removeClass */])(target, 'el-loading-parent--relative');
657
+ Object(dom["i" /* removeClass */])(target, 'el-loading-parent--hidden');
516
658
  if (_this.$el && _this.$el.parentNode) {
517
659
  _this.$el.parentNode.removeChild(_this.$el);
518
660
  }
@@ -524,11 +666,11 @@ LoadingConstructor.prototype.close = function () {
524
666
  var src_addStyle = function addStyle(options, parent, instance) {
525
667
  var maskStyle = {};
526
668
  if (options.fullscreen) {
527
- instance.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
528
- instance.originalOverflow = Object(dom_["getStyle"])(document.body, 'overflow');
529
- maskStyle.zIndex = popup_["PopupManager"].nextZIndex();
669
+ instance.originalPosition = Object(dom["c" /* getStyle */])(document.body, 'position');
670
+ instance.originalOverflow = Object(dom["c" /* getStyle */])(document.body, 'overflow');
671
+ maskStyle.zIndex = popup["a" /* PopupManager */].nextZIndex();
530
672
  } else if (options.body) {
531
- instance.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
673
+ instance.originalPosition = Object(dom["c" /* getStyle */])(document.body, 'position');
532
674
  ['top', 'left'].forEach(function (property) {
533
675
  var scroll = property === 'top' ? 'scrollTop' : 'scrollLeft';
534
676
  maskStyle[property] = options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] + 'px';
@@ -537,7 +679,7 @@ var src_addStyle = function addStyle(options, parent, instance) {
537
679
  maskStyle[property] = options.target.getBoundingClientRect()[property] + 'px';
538
680
  });
539
681
  } else {
540
- instance.originalPosition = Object(dom_["getStyle"])(parent, 'position');
682
+ instance.originalPosition = Object(dom["c" /* getStyle */])(parent, 'position');
541
683
  }
542
684
  Object.keys(maskStyle).forEach(function (property) {
543
685
  instance.$el.style[property] = maskStyle[property];
@@ -548,7 +690,7 @@ var src_Loading = function Loading() {
548
690
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
549
691
 
550
692
  if (external_vue_default.a.prototype.$isServer) return;
551
- options = merge_default()({}, defaults, options);
693
+ options = Object(merge["a" /* default */])({}, defaults, options);
552
694
  if (typeof options.target === 'string') {
553
695
  options.target = document.querySelector(options.target);
554
696
  }
@@ -570,10 +712,10 @@ var src_Loading = function Loading() {
570
712
 
571
713
  src_addStyle(options, parent, instance);
572
714
  if (instance.originalPosition !== 'absolute' && instance.originalPosition !== 'fixed' && instance.originalPosition !== 'sticky') {
573
- Object(dom_["addClass"])(parent, 'el-loading-parent--relative');
715
+ Object(dom["a" /* addClass */])(parent, 'el-loading-parent--relative');
574
716
  }
575
717
  if (options.fullscreen && options.lock) {
576
- Object(dom_["addClass"])(parent, 'el-loading-parent--hidden');
718
+ Object(dom["a" /* addClass */])(parent, 'el-loading-parent--hidden');
577
719
  }
578
720
  parent.appendChild(instance.$el);
579
721
  external_vue_default.a.nextTick(function () {
@@ -602,10 +744,605 @@ var src_Loading = function Loading() {
602
744
 
603
745
  /***/ }),
604
746
 
747
+ /***/ 2:
748
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
749
+
750
+ "use strict";
751
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
752
+ /* globals __VUE_SSR_CONTEXT__ */
753
+
754
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
755
+ // This module is a runtime utility for cleaner component module output and will
756
+ // be included in the final webpack user bundle.
757
+
758
+ function normalizeComponent(
759
+ scriptExports,
760
+ render,
761
+ staticRenderFns,
762
+ functionalTemplate,
763
+ injectStyles,
764
+ scopeId,
765
+ moduleIdentifier /* server only */,
766
+ shadowMode /* vue-cli only */
767
+ ) {
768
+ // Vue.extend constructor export interop
769
+ var options =
770
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
771
+
772
+ // render functions
773
+ if (render) {
774
+ options.render = render
775
+ options.staticRenderFns = staticRenderFns
776
+ options._compiled = true
777
+ }
778
+
779
+ // functional template
780
+ if (functionalTemplate) {
781
+ options.functional = true
782
+ }
783
+
784
+ // scopedId
785
+ if (scopeId) {
786
+ options._scopeId = 'data-v-' + scopeId
787
+ }
788
+
789
+ var hook
790
+ if (moduleIdentifier) {
791
+ // server build
792
+ hook = function (context) {
793
+ // 2.3 injection
794
+ context =
795
+ context || // cached call
796
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
797
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
798
+ // 2.2 with runInNewContext: true
799
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
800
+ context = __VUE_SSR_CONTEXT__
801
+ }
802
+ // inject component styles
803
+ if (injectStyles) {
804
+ injectStyles.call(this, context)
805
+ }
806
+ // register component module identifier for async chunk inferrence
807
+ if (context && context._registeredComponents) {
808
+ context._registeredComponents.add(moduleIdentifier)
809
+ }
810
+ }
811
+ // used by ssr in case component is cached and beforeCreate
812
+ // never gets called
813
+ options._ssrRegister = hook
814
+ } else if (injectStyles) {
815
+ hook = shadowMode
816
+ ? function () {
817
+ injectStyles.call(
818
+ this,
819
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
820
+ )
821
+ }
822
+ : injectStyles
823
+ }
824
+
825
+ if (hook) {
826
+ if (options.functional) {
827
+ // for template-only hot-reload because in that case the render fn doesn't
828
+ // go through the normalizer
829
+ options._injectStyles = hook
830
+ // register for functional component in vue file
831
+ var originalRender = options.render
832
+ options.render = function renderWithStyleInjection(h, context) {
833
+ hook.call(context)
834
+ return originalRender(h, context)
835
+ }
836
+ } else {
837
+ // inject component registration as beforeCreate hook
838
+ var existing = options.beforeCreate
839
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
840
+ }
841
+ }
842
+
843
+ return {
844
+ exports: scriptExports,
845
+ options: options
846
+ }
847
+ }
848
+
849
+
850
+ /***/ }),
851
+
852
+ /***/ 7:
853
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
854
+
855
+ "use strict";
856
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
857
+ for (var i = 1, j = arguments.length; i < j; i++) {
858
+ var source = arguments[i] || {};
859
+ for (var prop in source) {
860
+ if (source.hasOwnProperty(prop)) {
861
+ var value = source[prop];
862
+ if (value !== undefined) {
863
+ target[prop] = value;
864
+ }
865
+ }
866
+ }
867
+ }
868
+
869
+ return target;
870
+ });;
871
+
872
+ /***/ }),
873
+
874
+ /***/ 8:
875
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
876
+
877
+ "use strict";
878
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
879
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
880
+
881
+
882
+ var scrollBarWidth = void 0;
883
+
884
+ /* harmony default export */ __webpack_exports__["a"] = (function () {
885
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
886
+ if (scrollBarWidth !== undefined) return scrollBarWidth;
887
+
888
+ var outer = document.createElement('div');
889
+ outer.className = 'el-scrollbar__wrap';
890
+ outer.style.visibility = 'hidden';
891
+ outer.style.width = '100px';
892
+ outer.style.position = 'absolute';
893
+ outer.style.top = '-9999px';
894
+ document.body.appendChild(outer);
895
+
896
+ var widthNoScroll = outer.offsetWidth;
897
+ outer.style.overflow = 'scroll';
898
+
899
+ var inner = document.createElement('div');
900
+ inner.style.width = '100%';
901
+ outer.appendChild(inner);
902
+
903
+ var widthWithScroll = inner.offsetWidth;
904
+ outer.parentNode.removeChild(outer);
905
+ scrollBarWidth = widthNoScroll - widthWithScroll;
906
+
907
+ return scrollBarWidth;
908
+ });;
909
+
910
+ /***/ }),
911
+
605
912
  /***/ 9:
606
- /***/ (function(module, exports) {
913
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
914
+
915
+ "use strict";
916
+
917
+ // EXPORTS
918
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
919
+
920
+ // EXTERNAL MODULE: external "vue"
921
+ var external_vue_ = __webpack_require__(0);
922
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
923
+
924
+ // EXTERNAL MODULE: ./src/utils/merge.js
925
+ var merge = __webpack_require__(7);
926
+
927
+ // EXTERNAL MODULE: ./src/utils/dom.js
928
+ var utils_dom = __webpack_require__(1);
929
+
930
+ // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
931
+
932
+
933
+
934
+ var hasModal = false;
935
+ var hasInitZIndex = false;
936
+ var popup_manager_zIndex = void 0;
937
+
938
+ var popup_manager_getModal = function getModal() {
939
+ if (external_vue_default.a.prototype.$isServer) return;
940
+ var modalDom = PopupManager.modalDom;
941
+ if (modalDom) {
942
+ hasModal = true;
943
+ } else {
944
+ hasModal = false;
945
+ modalDom = document.createElement('div');
946
+ PopupManager.modalDom = modalDom;
947
+
948
+ modalDom.addEventListener('touchmove', function (event) {
949
+ event.preventDefault();
950
+ event.stopPropagation();
951
+ });
952
+
953
+ modalDom.addEventListener('click', function () {
954
+ PopupManager.doOnModalClick && PopupManager.doOnModalClick();
955
+ });
956
+ }
957
+
958
+ return modalDom;
959
+ };
960
+
961
+ var instances = {};
962
+
963
+ var PopupManager = {
964
+ modalFade: true,
965
+
966
+ getInstance: function getInstance(id) {
967
+ return instances[id];
968
+ },
969
+
970
+ register: function register(id, instance) {
971
+ if (id && instance) {
972
+ instances[id] = instance;
973
+ }
974
+ },
975
+
976
+ deregister: function deregister(id) {
977
+ if (id) {
978
+ instances[id] = null;
979
+ delete instances[id];
980
+ }
981
+ },
982
+
983
+ nextZIndex: function nextZIndex() {
984
+ return PopupManager.zIndex++;
985
+ },
986
+
987
+ modalStack: [],
988
+
989
+ doOnModalClick: function doOnModalClick() {
990
+ var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
991
+ if (!topItem) return;
992
+
993
+ var instance = PopupManager.getInstance(topItem.id);
994
+ if (instance && instance.closeOnClickModal) {
995
+ instance.close();
996
+ }
997
+ },
998
+
999
+ openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
1000
+ if (external_vue_default.a.prototype.$isServer) return;
1001
+ if (!id || zIndex === undefined) return;
1002
+ this.modalFade = modalFade;
1003
+
1004
+ var modalStack = this.modalStack;
1005
+
1006
+ for (var i = 0, j = modalStack.length; i < j; i++) {
1007
+ var item = modalStack[i];
1008
+ if (item.id === id) {
1009
+ return;
1010
+ }
1011
+ }
1012
+
1013
+ var modalDom = popup_manager_getModal();
1014
+
1015
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
1016
+ if (this.modalFade && !hasModal) {
1017
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
1018
+ }
1019
+ if (modalClass) {
1020
+ var classArr = modalClass.trim().split(/\s+/);
1021
+ classArr.forEach(function (item) {
1022
+ return Object(utils_dom["a" /* addClass */])(modalDom, item);
1023
+ });
1024
+ }
1025
+ setTimeout(function () {
1026
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
1027
+ }, 200);
1028
+
1029
+ if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
1030
+ dom.parentNode.appendChild(modalDom);
1031
+ } else {
1032
+ document.body.appendChild(modalDom);
1033
+ }
1034
+
1035
+ if (zIndex) {
1036
+ modalDom.style.zIndex = zIndex;
1037
+ }
1038
+ modalDom.tabIndex = 0;
1039
+ modalDom.style.display = '';
1040
+
1041
+ this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
1042
+ },
1043
+
1044
+ closeModal: function closeModal(id) {
1045
+ var modalStack = this.modalStack;
1046
+ var modalDom = popup_manager_getModal();
1047
+
1048
+ if (modalStack.length > 0) {
1049
+ var topItem = modalStack[modalStack.length - 1];
1050
+ if (topItem.id === id) {
1051
+ if (topItem.modalClass) {
1052
+ var classArr = topItem.modalClass.trim().split(/\s+/);
1053
+ classArr.forEach(function (item) {
1054
+ return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1055
+ });
1056
+ }
1057
+
1058
+ modalStack.pop();
1059
+ if (modalStack.length > 0) {
1060
+ modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1061
+ }
1062
+ } else {
1063
+ for (var i = modalStack.length - 1; i >= 0; i--) {
1064
+ if (modalStack[i].id === id) {
1065
+ modalStack.splice(i, 1);
1066
+ break;
1067
+ }
1068
+ }
1069
+ }
1070
+ }
1071
+
1072
+ if (modalStack.length === 0) {
1073
+ if (this.modalFade) {
1074
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1075
+ }
1076
+ setTimeout(function () {
1077
+ if (modalStack.length === 0) {
1078
+ if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1079
+ modalDom.style.display = 'none';
1080
+ PopupManager.modalDom = undefined;
1081
+ }
1082
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1083
+ }, 200);
1084
+ }
1085
+ }
1086
+ };
1087
+
1088
+ Object.defineProperty(PopupManager, 'zIndex', {
1089
+ configurable: true,
1090
+ get: function get() {
1091
+ if (!hasInitZIndex) {
1092
+ popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
1093
+ hasInitZIndex = true;
1094
+ }
1095
+ return popup_manager_zIndex;
1096
+ },
1097
+ set: function set(value) {
1098
+ popup_manager_zIndex = value;
1099
+ }
1100
+ });
1101
+
1102
+ var popup_manager_getTopPopup = function getTopPopup() {
1103
+ if (external_vue_default.a.prototype.$isServer) return;
1104
+ if (PopupManager.modalStack.length > 0) {
1105
+ var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1106
+ if (!topPopup) return;
1107
+ var instance = PopupManager.getInstance(topPopup.id);
1108
+
1109
+ return instance;
1110
+ }
1111
+ };
1112
+
1113
+ if (!external_vue_default.a.prototype.$isServer) {
1114
+ // handle `esc` key when the popup is shown
1115
+ window.addEventListener('keydown', function (event) {
1116
+ if (event.keyCode === 27) {
1117
+ var topPopup = popup_manager_getTopPopup();
1118
+
1119
+ if (topPopup && topPopup.closeOnPressEscape) {
1120
+ topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
1121
+ }
1122
+ }
1123
+ });
1124
+ }
1125
+
1126
+ /* harmony default export */ var popup_manager = (PopupManager);
1127
+ // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
1128
+ var scrollbar_width = __webpack_require__(8);
1129
+
1130
+ // CONCATENATED MODULE: ./src/utils/popup/index.js
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+ var idSeed = 1;
1138
+
1139
+ var scrollBarWidth = void 0;
1140
+
1141
+ /* harmony default export */ var popup = __webpack_exports__["b"] = ({
1142
+ props: {
1143
+ visible: {
1144
+ type: Boolean,
1145
+ default: false
1146
+ },
1147
+ openDelay: {},
1148
+ closeDelay: {},
1149
+ zIndex: {},
1150
+ modal: {
1151
+ type: Boolean,
1152
+ default: false
1153
+ },
1154
+ modalFade: {
1155
+ type: Boolean,
1156
+ default: true
1157
+ },
1158
+ modalClass: {},
1159
+ modalAppendToBody: {
1160
+ type: Boolean,
1161
+ default: false
1162
+ },
1163
+ lockScroll: {
1164
+ type: Boolean,
1165
+ default: true
1166
+ },
1167
+ closeOnPressEscape: {
1168
+ type: Boolean,
1169
+ default: false
1170
+ },
1171
+ closeOnClickModal: {
1172
+ type: Boolean,
1173
+ default: false
1174
+ }
1175
+ },
1176
+
1177
+ beforeMount: function beforeMount() {
1178
+ this._popupId = 'popup-' + idSeed++;
1179
+ popup_manager.register(this._popupId, this);
1180
+ },
1181
+ beforeDestroy: function beforeDestroy() {
1182
+ popup_manager.deregister(this._popupId);
1183
+ popup_manager.closeModal(this._popupId);
1184
+
1185
+ this.restoreBodyStyle();
1186
+ },
1187
+ data: function data() {
1188
+ return {
1189
+ opened: false,
1190
+ bodyPaddingRight: null,
1191
+ computedBodyPaddingRight: 0,
1192
+ withoutHiddenClass: true,
1193
+ rendered: false
1194
+ };
1195
+ },
1196
+
1197
+
1198
+ watch: {
1199
+ visible: function visible(val) {
1200
+ var _this = this;
1201
+
1202
+ if (val) {
1203
+ if (this._opening) return;
1204
+ if (!this.rendered) {
1205
+ this.rendered = true;
1206
+ external_vue_default.a.nextTick(function () {
1207
+ _this.open();
1208
+ });
1209
+ } else {
1210
+ this.open();
1211
+ }
1212
+ } else {
1213
+ this.close();
1214
+ }
1215
+ }
1216
+ },
1217
+
1218
+ methods: {
1219
+ open: function open(options) {
1220
+ var _this2 = this;
1221
+
1222
+ if (!this.rendered) {
1223
+ this.rendered = true;
1224
+ }
1225
+
1226
+ var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1227
+
1228
+ if (this._closeTimer) {
1229
+ clearTimeout(this._closeTimer);
1230
+ this._closeTimer = null;
1231
+ }
1232
+ clearTimeout(this._openTimer);
1233
+
1234
+ var openDelay = Number(props.openDelay);
1235
+ if (openDelay > 0) {
1236
+ this._openTimer = setTimeout(function () {
1237
+ _this2._openTimer = null;
1238
+ _this2.doOpen(props);
1239
+ }, openDelay);
1240
+ } else {
1241
+ this.doOpen(props);
1242
+ }
1243
+ },
1244
+ doOpen: function doOpen(props) {
1245
+ if (this.$isServer) return;
1246
+ if (this.willOpen && !this.willOpen()) return;
1247
+ if (this.opened) return;
1248
+
1249
+ this._opening = true;
1250
+
1251
+ var dom = this.$el;
1252
+
1253
+ var modal = props.modal;
1254
+
1255
+ var zIndex = props.zIndex;
1256
+ if (zIndex) {
1257
+ popup_manager.zIndex = zIndex;
1258
+ }
1259
+
1260
+ if (modal) {
1261
+ if (this._closing) {
1262
+ popup_manager.closeModal(this._popupId);
1263
+ this._closing = false;
1264
+ }
1265
+ popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1266
+ if (props.lockScroll) {
1267
+ this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1268
+ if (this.withoutHiddenClass) {
1269
+ this.bodyPaddingRight = document.body.style.paddingRight;
1270
+ this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1271
+ }
1272
+ scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1273
+ var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1274
+ var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1275
+ if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1276
+ document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1277
+ }
1278
+ Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1279
+ }
1280
+ }
1281
+
1282
+ if (getComputedStyle(dom).position === 'static') {
1283
+ dom.style.position = 'absolute';
1284
+ }
1285
+
1286
+ dom.style.zIndex = popup_manager.nextZIndex();
1287
+ this.opened = true;
1288
+
1289
+ this.onOpen && this.onOpen();
1290
+
1291
+ this.doAfterOpen();
1292
+ },
1293
+ doAfterOpen: function doAfterOpen() {
1294
+ this._opening = false;
1295
+ },
1296
+ close: function close() {
1297
+ var _this3 = this;
1298
+
1299
+ if (this.willClose && !this.willClose()) return;
1300
+
1301
+ if (this._openTimer !== null) {
1302
+ clearTimeout(this._openTimer);
1303
+ this._openTimer = null;
1304
+ }
1305
+ clearTimeout(this._closeTimer);
1306
+
1307
+ var closeDelay = Number(this.closeDelay);
1308
+
1309
+ if (closeDelay > 0) {
1310
+ this._closeTimer = setTimeout(function () {
1311
+ _this3._closeTimer = null;
1312
+ _this3.doClose();
1313
+ }, closeDelay);
1314
+ } else {
1315
+ this.doClose();
1316
+ }
1317
+ },
1318
+ doClose: function doClose() {
1319
+ this._closing = true;
1320
+
1321
+ this.onClose && this.onClose();
1322
+
1323
+ if (this.lockScroll) {
1324
+ setTimeout(this.restoreBodyStyle, 200);
1325
+ }
1326
+
1327
+ this.opened = false;
1328
+
1329
+ this.doAfterClose();
1330
+ },
1331
+ doAfterClose: function doAfterClose() {
1332
+ popup_manager.closeModal(this._popupId);
1333
+ this._closing = false;
1334
+ },
1335
+ restoreBodyStyle: function restoreBodyStyle() {
1336
+ if (this.modal && this.withoutHiddenClass) {
1337
+ document.body.style.paddingRight = this.bodyPaddingRight;
1338
+ Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1339
+ }
1340
+ this.withoutHiddenClass = true;
1341
+ }
1342
+ }
1343
+ });
1344
+
607
1345
 
608
- module.exports = require("element-ui/src/utils/merge");
609
1346
 
610
1347
  /***/ })
611
1348