cy-element-ui 1.0.62 → 1.0.63
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.
- package/lib/alert.js +4 -4
- package/lib/aside.js +77 -77
- package/lib/autocomplete.js +159 -3940
- package/lib/avatar.js +108 -108
- package/lib/backtop.js +110 -110
- package/lib/badge.js +108 -108
- package/lib/breadcrumb-item.js +4 -4
- package/lib/breadcrumb.js +4 -4
- package/lib/button-group.js +4 -4
- package/lib/button.js +4 -4
- package/lib/calendar.js +46 -1545
- package/lib/card.js +96 -96
- package/lib/carousel-item.js +108 -452
- package/lib/carousel.js +116 -185
- package/lib/cascader-panel.js +187 -2270
- package/lib/cascader.js +275 -6452
- package/lib/checkbox-button.js +11 -43
- package/lib/checkbox-group.js +15 -47
- package/lib/checkbox.js +15 -47
- package/lib/col.js +2 -2
- package/lib/collapse-item.js +110 -815
- package/lib/collapse.js +108 -108
- package/lib/color-picker.js +153 -3953
- package/lib/container.js +88 -88
- package/lib/date-picker.js +419 -5230
- package/lib/descriptions-item.js +2 -2
- package/lib/descriptions.js +8 -63
- package/lib/dialog.js +22 -1200
- package/lib/directives/repeat-click.js +2 -2
- package/lib/divider.js +104 -104
- package/lib/drawer.js +105 -875
- package/lib/dropdown-item.js +11 -43
- package/lib/dropdown-menu.js +75 -2277
- package/lib/dropdown.js +136 -1072
- package/lib/element-ui.common.js +29785 -42723
- package/lib/empty.js +7 -603
- package/lib/fileUpload.js +109 -2477
- package/lib/footer.js +77 -77
- package/lib/form-item.js +28 -418
- package/lib/form.js +15 -29
- package/lib/header.js +77 -77
- package/lib/icon.js +4 -4
- package/lib/image.js +49 -1376
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +21 -311
- package/lib/input-number.js +33 -1422
- package/lib/input.js +37 -507
- package/lib/link.js +4 -4
- package/lib/loading.js +67 -804
- package/lib/locale/format.js +1 -1
- package/lib/locale/index.js +1 -1
- package/lib/main.js +64 -64
- package/lib/menu-item-group.js +4 -4
- package/lib/menu-item.js +61 -2945
- package/lib/menu.js +54 -745
- package/lib/message-box.js +80 -2537
- package/lib/message.js +24 -1102
- package/lib/mixins/locale.js +1 -1
- package/lib/mixins/migrating.js +1 -1
- package/lib/notification.js +25 -1102
- package/lib/option-group.js +11 -43
- package/lib/option.js +18 -394
- package/lib/page-header.js +87 -683
- package/lib/pagination.js +139 -6078
- package/lib/popconfirm.js +219 -3508
- package/lib/popover.js +99 -2624
- package/lib/progress.js +4 -4
- package/lib/radio-button.js +11 -43
- package/lib/radio-group.js +11 -43
- package/lib/radio.js +15 -47
- package/lib/rate.js +113 -756
- package/lib/result.js +4 -4
- package/lib/row.js +2 -2
- package/lib/scrollbar.js +50 -735
- package/lib/select.js +209 -4352
- package/lib/selectDisplayInput.js +108 -108
- package/lib/skeleton-item.js +2 -2
- package/lib/skeleton.js +108 -108
- package/lib/slider.js +120 -4266
- package/lib/spinner.js +4 -4
- package/lib/statistic.js +117 -9605
- package/lib/step.js +108 -108
- package/lib/steps.js +99 -514
- package/lib/subTitle.js +91 -91
- package/lib/submenu.js +121 -2442
- package/lib/switch.js +21 -476
- package/lib/tab-pane.js +4 -4
- package/lib/tabDialog.js +37 -1563
- package/lib/table-column.js +32 -880
- package/lib/table.js +424 -4467
- package/lib/tabs.js +12 -425
- package/lib/tag.js +4 -4
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/element.css +1 -1
- package/lib/theme-chalk/fileUpload.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/selectDisplayInput.css +1 -1
- package/lib/theme-chalk/subTitle.css +1 -1
- package/lib/theme-chalk/tabDialog.css +1 -1
- package/lib/theme-chalk/treeSelect.css +1 -1
- package/lib/time-picker.js +285 -5013
- package/lib/time-select.js +181 -4949
- package/lib/timeline-item.js +108 -108
- package/lib/timeline.js +82 -82
- package/lib/tooltip.js +41 -2566
- package/lib/transfer.js +142 -2136
- package/lib/transitions/collapse-transition.js +1 -1
- package/lib/tree.js +55 -1372
- package/lib/treeSelect.js +106 -3421
- package/lib/upload.js +28 -1047
- package/lib/utils/clickoutside.js +1 -1
- package/lib/utils/date-util.js +2 -2
- package/lib/utils/popup/index.js +2 -2
- package/lib/utils/popup/popup-manager.js +1 -1
- package/lib/utils/util.js +1 -1
- package/lib/utils/vdom.js +1 -1
- package/lib/utils/vue-popper.js +1 -1
- package/package.json +2 -2
- package/src/index.js +1 -1
- package/lib/theme-chalk/alert.css +0 -1
- package/lib/theme-chalk/aside.css +0 -1
- package/lib/theme-chalk/autocomplete.css +0 -1
- package/lib/theme-chalk/avatar.css +0 -1
- package/lib/theme-chalk/backtop.css +0 -1
- package/lib/theme-chalk/badge.css +0 -1
- package/lib/theme-chalk/breadcrumb-item.css +0 -0
- package/lib/theme-chalk/breadcrumb.css +0 -1
- package/lib/theme-chalk/button-group.css +0 -0
- package/lib/theme-chalk/button.css +0 -1
- package/lib/theme-chalk/calendar.css +0 -1
- package/lib/theme-chalk/card.css +0 -1
- package/lib/theme-chalk/carousel-item.css +0 -1
- package/lib/theme-chalk/carousel.css +0 -1
- package/lib/theme-chalk/cascader-panel.css +0 -1
- package/lib/theme-chalk/cascader.css +0 -1
- package/lib/theme-chalk/checkbox-button.css +0 -0
- package/lib/theme-chalk/checkbox-group.css +0 -0
- package/lib/theme-chalk/checkbox.css +0 -1
- package/lib/theme-chalk/col.css +0 -1
- package/lib/theme-chalk/collapse-item.css +0 -0
- package/lib/theme-chalk/collapse.css +0 -1
- package/lib/theme-chalk/color-picker.css +0 -1
- package/lib/theme-chalk/container.css +0 -1
- package/lib/theme-chalk/date-picker.css +0 -1
- package/lib/theme-chalk/descriptions-item.css +0 -1
- package/lib/theme-chalk/descriptions.css +0 -1
- package/lib/theme-chalk/dialog.css +0 -1
- package/lib/theme-chalk/display.css +0 -1
- package/lib/theme-chalk/divider.css +0 -1
- package/lib/theme-chalk/drawer.css +0 -1
- package/lib/theme-chalk/dropdown-item.css +0 -0
- package/lib/theme-chalk/dropdown-menu.css +0 -0
- package/lib/theme-chalk/dropdown.css +0 -1
- package/lib/theme-chalk/empty.css +0 -1
- package/lib/theme-chalk/fonts/element-icons.ttf +0 -0
- package/lib/theme-chalk/fonts/element-icons.woff +0 -0
- package/lib/theme-chalk/footer.css +0 -1
- package/lib/theme-chalk/form-item.css +0 -0
- package/lib/theme-chalk/form.css +0 -1
- package/lib/theme-chalk/header.css +0 -1
- package/lib/theme-chalk/icon.css +0 -1
- package/lib/theme-chalk/image.css +0 -1
- package/lib/theme-chalk/index.scss +0 -1
- package/lib/theme-chalk/infinite-scroll.css +0 -0
- package/lib/theme-chalk/infiniteScroll.css +0 -0
- package/lib/theme-chalk/input-number.css +0 -1
- package/lib/theme-chalk/input.css +0 -1
- package/lib/theme-chalk/link.css +0 -1
- package/lib/theme-chalk/loading.css +0 -1
- package/lib/theme-chalk/main.css +0 -1
- package/lib/theme-chalk/menu-item-group.css +0 -0
- package/lib/theme-chalk/menu-item.css +0 -0
- package/lib/theme-chalk/menu.css +0 -1
- package/lib/theme-chalk/message-box.css +0 -1
- package/lib/theme-chalk/message.css +0 -1
- package/lib/theme-chalk/notification.css +0 -1
- package/lib/theme-chalk/option-group.css +0 -1
- package/lib/theme-chalk/option.css +0 -1
- package/lib/theme-chalk/page-header.css +0 -1
- package/lib/theme-chalk/pagination.css +0 -1
- package/lib/theme-chalk/popconfirm.css +0 -1
- package/lib/theme-chalk/popover.css +0 -1
- package/lib/theme-chalk/popper.css +0 -1
- package/lib/theme-chalk/progress.css +0 -1
- package/lib/theme-chalk/radio-button.css +0 -1
- package/lib/theme-chalk/radio-group.css +0 -1
- package/lib/theme-chalk/radio.css +0 -1
- package/lib/theme-chalk/rate.css +0 -1
- package/lib/theme-chalk/reset.css +0 -1
- package/lib/theme-chalk/result.css +0 -1
- package/lib/theme-chalk/row.css +0 -1
- package/lib/theme-chalk/scrollbar.css +0 -1
- package/lib/theme-chalk/select-dropdown.css +0 -1
- package/lib/theme-chalk/select.css +0 -1
- package/lib/theme-chalk/skeleton-item.css +0 -1
- package/lib/theme-chalk/skeleton.css +0 -1
- package/lib/theme-chalk/slider.css +0 -1
- package/lib/theme-chalk/spinner.css +0 -1
- package/lib/theme-chalk/statistic.css +0 -1
- package/lib/theme-chalk/step.css +0 -1
- package/lib/theme-chalk/steps.css +0 -1
- package/lib/theme-chalk/submenu.css +0 -0
- package/lib/theme-chalk/switch.css +0 -1
- package/lib/theme-chalk/tab-pane.css +0 -0
- package/lib/theme-chalk/table-column.css +0 -1
- package/lib/theme-chalk/table.css +0 -1
- package/lib/theme-chalk/tabs.css +0 -1
- package/lib/theme-chalk/tag.css +0 -1
- package/lib/theme-chalk/time-picker.css +0 -1
- package/lib/theme-chalk/time-select.css +0 -1
- package/lib/theme-chalk/timeline-item.css +0 -1
- package/lib/theme-chalk/timeline.css +0 -1
- package/lib/theme-chalk/tooltip.css +0 -1
- package/lib/theme-chalk/transfer.css +0 -1
- package/lib/theme-chalk/tree.css +0 -1
- package/lib/theme-chalk/upload.css +0 -1
package/lib/loading.js
CHANGED
|
@@ -82,261 +82,12 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 77);
|
|
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
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
99
|
-
|
|
100
|
-
"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;
|
|
293
|
-
|
|
294
|
-
var determinedDirection = vertical !== null && vertical !== undefined;
|
|
295
|
-
var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
|
|
296
|
-
|
|
297
|
-
return overflow.match(/(scroll|auto|overlay)/);
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
var getScrollContainer = function getScrollContainer(el, vertical) {
|
|
301
|
-
if (isServer) return;
|
|
302
|
-
|
|
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
|
-
}
|
|
313
|
-
|
|
314
|
-
return parent;
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
var isInContainer = function isInContainer(el, container) {
|
|
318
|
-
if (isServer || !el || !container) return false;
|
|
319
|
-
|
|
320
|
-
var elRect = el.getBoundingClientRect();
|
|
321
|
-
var containerRect = void 0;
|
|
322
|
-
|
|
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
|
-
};
|
|
336
|
-
|
|
337
|
-
/***/ }),
|
|
338
|
-
|
|
339
|
-
/***/ 2:
|
|
340
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
341
92
|
|
|
342
93
|
"use strict";
|
|
@@ -441,29 +192,35 @@ function normalizeComponent(
|
|
|
441
192
|
|
|
442
193
|
/***/ }),
|
|
443
194
|
|
|
444
|
-
/***/
|
|
445
|
-
/***/ (function(module,
|
|
195
|
+
/***/ 14:
|
|
196
|
+
/***/ (function(module, exports) {
|
|
446
197
|
|
|
447
|
-
|
|
448
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (target) {
|
|
449
|
-
for (var i = 1, j = arguments.length; i < j; i++) {
|
|
450
|
-
var source = arguments[i] || {};
|
|
451
|
-
for (var prop in source) {
|
|
452
|
-
if (source.hasOwnProperty(prop)) {
|
|
453
|
-
var value = source[prop];
|
|
454
|
-
if (value !== undefined) {
|
|
455
|
-
target[prop] = value;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
}
|
|
198
|
+
module.exports = require("cy-element-ui/lib/utils/popup");
|
|
460
199
|
|
|
461
|
-
|
|
462
|
-
|
|
200
|
+
/***/ }),
|
|
201
|
+
|
|
202
|
+
/***/ 2:
|
|
203
|
+
/***/ (function(module, exports) {
|
|
204
|
+
|
|
205
|
+
module.exports = require("cy-element-ui/lib/utils/dom");
|
|
206
|
+
|
|
207
|
+
/***/ }),
|
|
208
|
+
|
|
209
|
+
/***/ 43:
|
|
210
|
+
/***/ (function(module, exports) {
|
|
211
|
+
|
|
212
|
+
module.exports = require("cy-element-ui/lib/utils/after-leave");
|
|
463
213
|
|
|
464
214
|
/***/ }),
|
|
465
215
|
|
|
466
|
-
/***/
|
|
216
|
+
/***/ 7:
|
|
217
|
+
/***/ (function(module, exports) {
|
|
218
|
+
|
|
219
|
+
module.exports = require("vue");
|
|
220
|
+
|
|
221
|
+
/***/ }),
|
|
222
|
+
|
|
223
|
+
/***/ 77:
|
|
467
224
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
468
225
|
|
|
469
226
|
"use strict";
|
|
@@ -471,7 +228,7 @@ function normalizeComponent(
|
|
|
471
228
|
__webpack_require__.r(__webpack_exports__);
|
|
472
229
|
|
|
473
230
|
// EXTERNAL MODULE: external "vue"
|
|
474
|
-
var external_vue_ = __webpack_require__(
|
|
231
|
+
var external_vue_ = __webpack_require__(7);
|
|
475
232
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
476
233
|
|
|
477
234
|
// 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
|
|
@@ -561,7 +318,7 @@ render._withStripped = true
|
|
|
561
318
|
// CONCATENATED MODULE: ./packages/loading/src/loading.vue?vue&type=script&lang=js
|
|
562
319
|
/* harmony default export */ var src_loadingvue_type_script_lang_js = (loadingvue_type_script_lang_js);
|
|
563
320
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
564
|
-
var componentNormalizer = __webpack_require__(
|
|
321
|
+
var componentNormalizer = __webpack_require__(0);
|
|
565
322
|
|
|
566
323
|
// CONCATENATED MODULE: ./packages/loading/src/loading.vue
|
|
567
324
|
|
|
@@ -583,43 +340,16 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
583
340
|
)
|
|
584
341
|
|
|
585
342
|
/* harmony default export */ var loading = (component.exports);
|
|
586
|
-
// EXTERNAL MODULE:
|
|
587
|
-
var
|
|
588
|
-
|
|
589
|
-
// EXTERNAL MODULE:
|
|
590
|
-
var
|
|
591
|
-
|
|
592
|
-
//
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
* @param {Vue} instance Vue instance.
|
|
597
|
-
* @param {Function} callback callback of after-leave event
|
|
598
|
-
* @param {Number} speed the speed of transition, default value is 300ms
|
|
599
|
-
* @param {Boolean} once weather bind after-leave once. default value is false.
|
|
600
|
-
*/
|
|
601
|
-
/* harmony default export */ var after_leave = (function (instance, callback) {
|
|
602
|
-
var speed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
|
|
603
|
-
var once = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
604
|
-
|
|
605
|
-
if (!instance || !callback) throw new Error('instance & callback is required');
|
|
606
|
-
var called = false;
|
|
607
|
-
var afterLeaveCallback = function afterLeaveCallback() {
|
|
608
|
-
if (called) return;
|
|
609
|
-
called = true;
|
|
610
|
-
if (callback) {
|
|
611
|
-
callback.apply(null, arguments);
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
if (once) {
|
|
615
|
-
instance.$once('after-leave', afterLeaveCallback);
|
|
616
|
-
} else {
|
|
617
|
-
instance.$on('after-leave', afterLeaveCallback);
|
|
618
|
-
}
|
|
619
|
-
setTimeout(function () {
|
|
620
|
-
afterLeaveCallback();
|
|
621
|
-
}, speed + 100);
|
|
622
|
-
});;
|
|
343
|
+
// EXTERNAL MODULE: external "cy-element-ui/lib/utils/dom"
|
|
344
|
+
var dom_ = __webpack_require__(2);
|
|
345
|
+
|
|
346
|
+
// EXTERNAL MODULE: external "cy-element-ui/lib/utils/popup"
|
|
347
|
+
var popup_ = __webpack_require__(14);
|
|
348
|
+
|
|
349
|
+
// EXTERNAL MODULE: external "cy-element-ui/lib/utils/after-leave"
|
|
350
|
+
var after_leave_ = __webpack_require__(43);
|
|
351
|
+
var after_leave_default = /*#__PURE__*/__webpack_require__.n(after_leave_);
|
|
352
|
+
|
|
623
353
|
// CONCATENATED MODULE: ./packages/loading/src/directive.js
|
|
624
354
|
|
|
625
355
|
|
|
@@ -635,21 +365,21 @@ loadingDirective.install = function (Vue) {
|
|
|
635
365
|
if (binding.value) {
|
|
636
366
|
Vue.nextTick(function () {
|
|
637
367
|
if (binding.modifiers.fullscreen) {
|
|
638
|
-
el.originalPosition = Object(
|
|
639
|
-
el.originalOverflow = Object(
|
|
640
|
-
el.maskStyle.zIndex =
|
|
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();
|
|
641
371
|
|
|
642
|
-
Object(
|
|
372
|
+
Object(dom_["addClass"])(el.mask, 'is-fullscreen');
|
|
643
373
|
insertDom(document.body, el, binding);
|
|
644
374
|
} else {
|
|
645
|
-
Object(
|
|
375
|
+
Object(dom_["removeClass"])(el.mask, 'is-fullscreen');
|
|
646
376
|
|
|
647
377
|
if (binding.modifiers.body) {
|
|
648
|
-
el.originalPosition = Object(
|
|
378
|
+
el.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
|
|
649
379
|
|
|
650
380
|
['top', 'left'].forEach(function (property) {
|
|
651
381
|
var scroll = property === 'top' ? 'scrollTop' : 'scrollLeft';
|
|
652
|
-
el.maskStyle[property] = el.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - parseInt(Object(
|
|
382
|
+
el.maskStyle[property] = el.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - parseInt(Object(dom_["getStyle"])(document.body, 'margin-' + property), 10) + 'px';
|
|
653
383
|
});
|
|
654
384
|
['height', 'width'].forEach(function (property) {
|
|
655
385
|
el.maskStyle[property] = el.getBoundingClientRect()[property] + 'px';
|
|
@@ -657,18 +387,18 @@ loadingDirective.install = function (Vue) {
|
|
|
657
387
|
|
|
658
388
|
insertDom(document.body, el, binding);
|
|
659
389
|
} else {
|
|
660
|
-
el.originalPosition = Object(
|
|
390
|
+
el.originalPosition = Object(dom_["getStyle"])(el, 'position');
|
|
661
391
|
insertDom(el, el, binding);
|
|
662
392
|
}
|
|
663
393
|
}
|
|
664
394
|
});
|
|
665
395
|
} else {
|
|
666
|
-
|
|
396
|
+
after_leave_default()(el.instance, function (_) {
|
|
667
397
|
if (!el.instance.hiding) return;
|
|
668
398
|
el.domVisible = false;
|
|
669
399
|
var target = binding.modifiers.fullscreen || binding.modifiers.body ? document.body : el;
|
|
670
|
-
Object(
|
|
671
|
-
Object(
|
|
400
|
+
Object(dom_["removeClass"])(target, 'el-loading-parent--relative');
|
|
401
|
+
Object(dom_["removeClass"])(target, 'el-loading-parent--hidden');
|
|
672
402
|
el.instance.hiding = false;
|
|
673
403
|
}, 300, true);
|
|
674
404
|
el.instance.visible = false;
|
|
@@ -676,16 +406,16 @@ loadingDirective.install = function (Vue) {
|
|
|
676
406
|
}
|
|
677
407
|
};
|
|
678
408
|
var insertDom = function insertDom(parent, el, binding) {
|
|
679
|
-
if (!el.domVisible && Object(
|
|
409
|
+
if (!el.domVisible && Object(dom_["getStyle"])(el, 'display') !== 'none' && Object(dom_["getStyle"])(el, 'visibility') !== 'hidden') {
|
|
680
410
|
Object.keys(el.maskStyle).forEach(function (property) {
|
|
681
411
|
el.mask.style[property] = el.maskStyle[property];
|
|
682
412
|
});
|
|
683
413
|
|
|
684
414
|
if (el.originalPosition !== 'absolute' && el.originalPosition !== 'fixed' && el.originalPosition !== 'sticky') {
|
|
685
|
-
Object(
|
|
415
|
+
Object(dom_["addClass"])(parent, 'el-loading-parent--relative');
|
|
686
416
|
}
|
|
687
417
|
if (binding.modifiers.fullscreen && binding.modifiers.lock) {
|
|
688
|
-
Object(
|
|
418
|
+
Object(dom_["addClass"])(parent, 'el-loading-parent--hidden');
|
|
689
419
|
}
|
|
690
420
|
el.domVisible = true;
|
|
691
421
|
|
|
@@ -746,8 +476,9 @@ loadingDirective.install = function (Vue) {
|
|
|
746
476
|
};
|
|
747
477
|
|
|
748
478
|
/* harmony default export */ var directive = (loadingDirective);
|
|
749
|
-
// EXTERNAL MODULE:
|
|
750
|
-
var
|
|
479
|
+
// EXTERNAL MODULE: external "cy-element-ui/lib/utils/merge"
|
|
480
|
+
var merge_ = __webpack_require__(9);
|
|
481
|
+
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
751
482
|
|
|
752
483
|
// CONCATENATED MODULE: ./packages/loading/src/index.js
|
|
753
484
|
|
|
@@ -778,10 +509,10 @@ LoadingConstructor.prototype.close = function () {
|
|
|
778
509
|
if (this.fullscreen) {
|
|
779
510
|
fullscreenLoading = undefined;
|
|
780
511
|
}
|
|
781
|
-
|
|
512
|
+
after_leave_default()(this, function (_) {
|
|
782
513
|
var target = _this.fullscreen || _this.body ? document.body : _this.target;
|
|
783
|
-
Object(
|
|
784
|
-
Object(
|
|
514
|
+
Object(dom_["removeClass"])(target, 'el-loading-parent--relative');
|
|
515
|
+
Object(dom_["removeClass"])(target, 'el-loading-parent--hidden');
|
|
785
516
|
if (_this.$el && _this.$el.parentNode) {
|
|
786
517
|
_this.$el.parentNode.removeChild(_this.$el);
|
|
787
518
|
}
|
|
@@ -793,11 +524,11 @@ LoadingConstructor.prototype.close = function () {
|
|
|
793
524
|
var src_addStyle = function addStyle(options, parent, instance) {
|
|
794
525
|
var maskStyle = {};
|
|
795
526
|
if (options.fullscreen) {
|
|
796
|
-
instance.originalPosition = Object(
|
|
797
|
-
instance.originalOverflow = Object(
|
|
798
|
-
maskStyle.zIndex =
|
|
527
|
+
instance.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
|
|
528
|
+
instance.originalOverflow = Object(dom_["getStyle"])(document.body, 'overflow');
|
|
529
|
+
maskStyle.zIndex = popup_["PopupManager"].nextZIndex();
|
|
799
530
|
} else if (options.body) {
|
|
800
|
-
instance.originalPosition = Object(
|
|
531
|
+
instance.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
|
|
801
532
|
['top', 'left'].forEach(function (property) {
|
|
802
533
|
var scroll = property === 'top' ? 'scrollTop' : 'scrollLeft';
|
|
803
534
|
maskStyle[property] = options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] + 'px';
|
|
@@ -806,7 +537,7 @@ var src_addStyle = function addStyle(options, parent, instance) {
|
|
|
806
537
|
maskStyle[property] = options.target.getBoundingClientRect()[property] + 'px';
|
|
807
538
|
});
|
|
808
539
|
} else {
|
|
809
|
-
instance.originalPosition = Object(
|
|
540
|
+
instance.originalPosition = Object(dom_["getStyle"])(parent, 'position');
|
|
810
541
|
}
|
|
811
542
|
Object.keys(maskStyle).forEach(function (property) {
|
|
812
543
|
instance.$el.style[property] = maskStyle[property];
|
|
@@ -817,7 +548,7 @@ var src_Loading = function Loading() {
|
|
|
817
548
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
818
549
|
|
|
819
550
|
if (external_vue_default.a.prototype.$isServer) return;
|
|
820
|
-
options =
|
|
551
|
+
options = merge_default()({}, defaults, options);
|
|
821
552
|
if (typeof options.target === 'string') {
|
|
822
553
|
options.target = document.querySelector(options.target);
|
|
823
554
|
}
|
|
@@ -839,10 +570,10 @@ var src_Loading = function Loading() {
|
|
|
839
570
|
|
|
840
571
|
src_addStyle(options, parent, instance);
|
|
841
572
|
if (instance.originalPosition !== 'absolute' && instance.originalPosition !== 'fixed' && instance.originalPosition !== 'sticky') {
|
|
842
|
-
Object(
|
|
573
|
+
Object(dom_["addClass"])(parent, 'el-loading-parent--relative');
|
|
843
574
|
}
|
|
844
575
|
if (options.fullscreen && options.lock) {
|
|
845
|
-
Object(
|
|
576
|
+
Object(dom_["addClass"])(parent, 'el-loading-parent--hidden');
|
|
846
577
|
}
|
|
847
578
|
parent.appendChild(instance.$el);
|
|
848
579
|
external_vue_default.a.nextTick(function () {
|
|
@@ -871,478 +602,10 @@ var src_Loading = function Loading() {
|
|
|
871
602
|
|
|
872
603
|
/***/ }),
|
|
873
604
|
|
|
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
|
-
|
|
912
605
|
/***/ 9:
|
|
913
|
-
/***/ (function(module,
|
|
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
|
-
|
|
606
|
+
/***/ (function(module, exports) {
|
|
1345
607
|
|
|
608
|
+
module.exports = require("cy-element-ui/lib/utils/merge");
|
|
1346
609
|
|
|
1347
610
|
/***/ })
|
|
1348
611
|
|