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