cy-element-ui 1.0.45 → 1.0.47
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/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/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/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/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/tree.js +55 -1372
- package/lib/treeSelect.js +106 -3421
- package/lib/upload.js +28 -1047
- package/package.json +1 -1
- package/src/index.js +1 -1
package/lib/message-box.js
CHANGED
|
@@ -82,1284 +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 = 83);
|
|
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
|
-
/***/ 11:
|
|
340
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
341
|
-
|
|
342
|
-
"use strict";
|
|
343
|
-
|
|
344
|
-
// EXPORTS
|
|
345
|
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ t; });
|
|
346
|
-
|
|
347
|
-
// UNUSED EXPORTS: use, i18n
|
|
348
|
-
|
|
349
|
-
// CONCATENATED MODULE: ./src/locale/lang/zh-CN.js
|
|
350
|
-
/* harmony default export */ var zh_CN = ({
|
|
351
|
-
el: {
|
|
352
|
-
colorpicker: {
|
|
353
|
-
confirm: '确定',
|
|
354
|
-
clear: '清空'
|
|
355
|
-
},
|
|
356
|
-
datepicker: {
|
|
357
|
-
now: '此刻',
|
|
358
|
-
today: '今天',
|
|
359
|
-
cancel: '取消',
|
|
360
|
-
clear: '清空',
|
|
361
|
-
confirm: '确定',
|
|
362
|
-
selectDate: '选择日期',
|
|
363
|
-
selectTime: '选择时间',
|
|
364
|
-
startDate: '开始日期',
|
|
365
|
-
startTime: '开始时间',
|
|
366
|
-
endDate: '结束日期',
|
|
367
|
-
endTime: '结束时间',
|
|
368
|
-
prevYear: '前一年',
|
|
369
|
-
nextYear: '后一年',
|
|
370
|
-
prevMonth: '上个月',
|
|
371
|
-
nextMonth: '下个月',
|
|
372
|
-
year: '年',
|
|
373
|
-
month1: '1 月',
|
|
374
|
-
month2: '2 月',
|
|
375
|
-
month3: '3 月',
|
|
376
|
-
month4: '4 月',
|
|
377
|
-
month5: '5 月',
|
|
378
|
-
month6: '6 月',
|
|
379
|
-
month7: '7 月',
|
|
380
|
-
month8: '8 月',
|
|
381
|
-
month9: '9 月',
|
|
382
|
-
month10: '10 月',
|
|
383
|
-
month11: '11 月',
|
|
384
|
-
month12: '12 月',
|
|
385
|
-
// week: '周次',
|
|
386
|
-
weeks: {
|
|
387
|
-
sun: '日',
|
|
388
|
-
mon: '一',
|
|
389
|
-
tue: '二',
|
|
390
|
-
wed: '三',
|
|
391
|
-
thu: '四',
|
|
392
|
-
fri: '五',
|
|
393
|
-
sat: '六'
|
|
394
|
-
},
|
|
395
|
-
months: {
|
|
396
|
-
jan: '一月',
|
|
397
|
-
feb: '二月',
|
|
398
|
-
mar: '三月',
|
|
399
|
-
apr: '四月',
|
|
400
|
-
may: '五月',
|
|
401
|
-
jun: '六月',
|
|
402
|
-
jul: '七月',
|
|
403
|
-
aug: '八月',
|
|
404
|
-
sep: '九月',
|
|
405
|
-
oct: '十月',
|
|
406
|
-
nov: '十一月',
|
|
407
|
-
dec: '十二月'
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
select: {
|
|
411
|
-
loading: '加载中',
|
|
412
|
-
noMatch: '无匹配数据',
|
|
413
|
-
noData: '无数据',
|
|
414
|
-
placeholder: '请选择'
|
|
415
|
-
},
|
|
416
|
-
cascader: {
|
|
417
|
-
noMatch: '无匹配数据',
|
|
418
|
-
loading: '加载中',
|
|
419
|
-
placeholder: '请选择',
|
|
420
|
-
noData: '暂无数据'
|
|
421
|
-
},
|
|
422
|
-
pagination: {
|
|
423
|
-
goto: '前往',
|
|
424
|
-
pagesize: '条/页',
|
|
425
|
-
total: '共 {total} 条',
|
|
426
|
-
pageClassifier: '页'
|
|
427
|
-
},
|
|
428
|
-
messagebox: {
|
|
429
|
-
title: '提示',
|
|
430
|
-
confirm: '确定',
|
|
431
|
-
cancel: '取消',
|
|
432
|
-
error: '输入的数据不合法!'
|
|
433
|
-
},
|
|
434
|
-
upload: {
|
|
435
|
-
deleteTip: '按 delete 键可删除',
|
|
436
|
-
delete: '删除',
|
|
437
|
-
preview: '查看图片',
|
|
438
|
-
continue: '继续上传'
|
|
439
|
-
},
|
|
440
|
-
table: {
|
|
441
|
-
emptyText: '暂无数据',
|
|
442
|
-
confirmFilter: '筛选',
|
|
443
|
-
resetFilter: '重置',
|
|
444
|
-
clearFilter: '全部',
|
|
445
|
-
sumText: '合计'
|
|
446
|
-
},
|
|
447
|
-
tree: {
|
|
448
|
-
emptyText: '暂无数据'
|
|
449
|
-
},
|
|
450
|
-
transfer: {
|
|
451
|
-
noMatch: '无匹配数据',
|
|
452
|
-
noData: '无数据',
|
|
453
|
-
titles: ['列表 1', '列表 2'],
|
|
454
|
-
filterPlaceholder: '请输入搜索内容',
|
|
455
|
-
noCheckedFormat: '共 {total} 项',
|
|
456
|
-
hasCheckedFormat: '已选 {checked}/{total} 项'
|
|
457
|
-
},
|
|
458
|
-
image: {
|
|
459
|
-
error: '加载失败'
|
|
460
|
-
},
|
|
461
|
-
pageHeader: {
|
|
462
|
-
title: '返回'
|
|
463
|
-
},
|
|
464
|
-
popconfirm: {
|
|
465
|
-
confirmButtonText: '确定',
|
|
466
|
-
cancelButtonText: '取消'
|
|
467
|
-
},
|
|
468
|
-
empty: {
|
|
469
|
-
description: '暂无数据'
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
});
|
|
473
|
-
// EXTERNAL MODULE: external "vue"
|
|
474
|
-
var external_vue_ = __webpack_require__(0);
|
|
475
|
-
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
476
|
-
|
|
477
|
-
// EXTERNAL MODULE: external "deepmerge"
|
|
478
|
-
var external_deepmerge_ = __webpack_require__(15);
|
|
479
|
-
var external_deepmerge_default = /*#__PURE__*/__webpack_require__.n(external_deepmerge_);
|
|
480
|
-
|
|
481
|
-
// EXTERNAL MODULE: ./src/utils/util.js
|
|
482
|
-
var util = __webpack_require__(3);
|
|
483
|
-
|
|
484
|
-
// CONCATENATED MODULE: ./src/locale/format.js
|
|
485
|
-
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; };
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
490
|
-
/**
|
|
491
|
-
* String format template
|
|
492
|
-
* - Inspired:
|
|
493
|
-
* https://github.com/Matt-Esch/string-template/index.js
|
|
494
|
-
*/
|
|
495
|
-
/* harmony default export */ var format = (function (Vue) {
|
|
496
|
-
/**
|
|
497
|
-
* template
|
|
498
|
-
*
|
|
499
|
-
* @param {String} string
|
|
500
|
-
* @param {Array} ...args
|
|
501
|
-
* @return {String}
|
|
502
|
-
*/
|
|
503
|
-
|
|
504
|
-
function template(string) {
|
|
505
|
-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
506
|
-
args[_key - 1] = arguments[_key];
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
if (args.length === 1 && _typeof(args[0]) === 'object') {
|
|
510
|
-
args = args[0];
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
if (!args || !args.hasOwnProperty) {
|
|
514
|
-
args = {};
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
return string.replace(RE_NARGS, function (match, prefix, i, index) {
|
|
518
|
-
var result = void 0;
|
|
519
|
-
|
|
520
|
-
if (string[index - 1] === '{' && string[index + match.length] === '}') {
|
|
521
|
-
return i;
|
|
522
|
-
} else {
|
|
523
|
-
result = Object(util["j" /* hasOwn */])(args, i) ? args[i] : null;
|
|
524
|
-
if (result === null || result === undefined) {
|
|
525
|
-
return '';
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
return result;
|
|
529
|
-
}
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
return template;
|
|
534
|
-
});
|
|
535
|
-
// CONCATENATED MODULE: ./src/locale/index.js
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
var locale_format = format(external_vue_default.a);
|
|
542
|
-
var lang = zh_CN;
|
|
543
|
-
var merged = false;
|
|
544
|
-
var locale_i18nHandler = function i18nHandler() {
|
|
545
|
-
var vuei18n = Object.getPrototypeOf(this || external_vue_default.a).$t;
|
|
546
|
-
if (typeof vuei18n === 'function' && !!external_vue_default.a.locale) {
|
|
547
|
-
if (!merged) {
|
|
548
|
-
merged = true;
|
|
549
|
-
external_vue_default.a.locale(external_vue_default.a.config.lang, external_deepmerge_default()(lang, external_vue_default.a.locale(external_vue_default.a.config.lang) || {}, { clone: true }));
|
|
550
|
-
}
|
|
551
|
-
return vuei18n.apply(this, arguments);
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
var t = function t(path, options) {
|
|
556
|
-
var value = locale_i18nHandler.apply(this, arguments);
|
|
557
|
-
if (value !== null && value !== undefined) return value;
|
|
558
|
-
|
|
559
|
-
var array = path.split('.');
|
|
560
|
-
var current = lang;
|
|
561
|
-
|
|
562
|
-
for (var i = 0, j = array.length; i < j; i++) {
|
|
563
|
-
var property = array[i];
|
|
564
|
-
value = current[property];
|
|
565
|
-
if (i === j - 1) return locale_format(value, options);
|
|
566
|
-
if (!value) return '';
|
|
567
|
-
current = value;
|
|
568
|
-
}
|
|
569
|
-
return '';
|
|
570
|
-
};
|
|
571
|
-
|
|
572
|
-
var use = function use(l) {
|
|
573
|
-
lang = l || lang;
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
var i18n = function i18n(fn) {
|
|
577
|
-
locale_i18nHandler = fn || locale_i18nHandler;
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
/* harmony default export */ var locale = ({ use: use, t: t, i18n: i18n });
|
|
581
|
-
|
|
582
|
-
/***/ }),
|
|
583
|
-
|
|
584
|
-
/***/ 12:
|
|
585
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
586
|
-
|
|
587
|
-
"use strict";
|
|
588
|
-
/* harmony import */ var element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
|
589
|
-
|
|
590
|
-
/**
|
|
591
|
-
* Show migrating guide in browser console.
|
|
592
|
-
*
|
|
593
|
-
* Usage:
|
|
594
|
-
* import Migrating from 'element-ui/src/mixins/migrating';
|
|
595
|
-
*
|
|
596
|
-
* mixins: [Migrating]
|
|
597
|
-
*
|
|
598
|
-
* add getMigratingConfig method for your component.
|
|
599
|
-
* getMigratingConfig() {
|
|
600
|
-
* return {
|
|
601
|
-
* props: {
|
|
602
|
-
* 'allow-no-selection': 'allow-no-selection is removed.',
|
|
603
|
-
* 'selection-mode': 'selection-mode is removed.'
|
|
604
|
-
* },
|
|
605
|
-
* events: {
|
|
606
|
-
* selectionchange: 'selectionchange is renamed to selection-change.'
|
|
607
|
-
* }
|
|
608
|
-
* };
|
|
609
|
-
* },
|
|
610
|
-
*/
|
|
611
|
-
/* harmony default export */ __webpack_exports__["a"] = ({
|
|
612
|
-
mounted: function mounted() {
|
|
613
|
-
if (true) return;
|
|
614
|
-
if (!this.$vnode) return;
|
|
615
|
-
|
|
616
|
-
var _getMigratingConfig = this.getMigratingConfig(),
|
|
617
|
-
_getMigratingConfig$p = _getMigratingConfig.props,
|
|
618
|
-
props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
|
|
619
|
-
_getMigratingConfig$e = _getMigratingConfig.events,
|
|
620
|
-
events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;
|
|
621
|
-
|
|
622
|
-
var _$vnode = this.$vnode,
|
|
623
|
-
data = _$vnode.data,
|
|
624
|
-
componentOptions = _$vnode.componentOptions;
|
|
625
|
-
|
|
626
|
-
var definedProps = data.attrs || {};
|
|
627
|
-
var definedEvents = componentOptions.listeners || {};
|
|
628
|
-
|
|
629
|
-
for (var propName in definedProps) {
|
|
630
|
-
propName = Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(propName); // compatible with camel case
|
|
631
|
-
if (props[propName]) {
|
|
632
|
-
console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
for (var eventName in definedEvents) {
|
|
637
|
-
eventName = Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(eventName); // compatible with camel case
|
|
638
|
-
if (events[eventName]) {
|
|
639
|
-
console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
},
|
|
643
|
-
|
|
644
|
-
methods: {
|
|
645
|
-
getMigratingConfig: function getMigratingConfig() {
|
|
646
|
-
return {
|
|
647
|
-
props: {},
|
|
648
|
-
events: {}
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
});
|
|
653
|
-
|
|
654
|
-
/***/ }),
|
|
655
|
-
|
|
656
|
-
/***/ 13:
|
|
657
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
658
|
-
|
|
659
|
-
"use strict";
|
|
660
|
-
/* harmony import */ var element_ui_src_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
/* harmony default export */ __webpack_exports__["a"] = ({
|
|
664
|
-
methods: {
|
|
665
|
-
t: function t() {
|
|
666
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
667
|
-
args[_key] = arguments[_key];
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
return element_ui_src_locale__WEBPACK_IMPORTED_MODULE_0__[/* t */ "a"].apply(this, args);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
});
|
|
674
|
-
|
|
675
|
-
/***/ }),
|
|
676
|
-
|
|
677
|
-
/***/ 15:
|
|
678
|
-
/***/ (function(module, exports) {
|
|
679
|
-
|
|
680
|
-
module.exports = require("deepmerge");
|
|
681
|
-
|
|
682
|
-
/***/ }),
|
|
683
|
-
|
|
684
|
-
/***/ 16:
|
|
685
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
686
|
-
|
|
687
|
-
"use strict";
|
|
688
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDef; });
|
|
689
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isKorean; });
|
|
690
|
-
function isDef(val) {
|
|
691
|
-
return val !== undefined && val !== null;
|
|
692
|
-
}
|
|
693
|
-
function isKorean(text) {
|
|
694
|
-
var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
|
|
695
|
-
return reg.test(text);
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
/***/ }),
|
|
699
|
-
|
|
700
|
-
/***/ 18:
|
|
701
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
702
|
-
|
|
703
|
-
"use strict";
|
|
704
|
-
// ESM COMPAT FLAG
|
|
705
|
-
__webpack_require__.r(__webpack_exports__);
|
|
706
|
-
|
|
707
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=af7512c8
|
|
708
|
-
var render = function render() {
|
|
709
|
-
var _vm = this,
|
|
710
|
-
_c = _vm._self._c
|
|
711
|
-
return _c(
|
|
712
|
-
"div",
|
|
713
|
-
{
|
|
714
|
-
class: [
|
|
715
|
-
_vm.type === "textarea" ? "el-textarea" : "el-input",
|
|
716
|
-
_vm.inputSize ? "el-input--" + _vm.inputSize : "",
|
|
717
|
-
{
|
|
718
|
-
"is-disabled": _vm.inputDisabled,
|
|
719
|
-
"is-exceed": _vm.inputExceed,
|
|
720
|
-
"el-input-group": _vm.$slots.prepend || _vm.$slots.append,
|
|
721
|
-
"el-input-group--append": _vm.$slots.append,
|
|
722
|
-
"el-input-group--prepend": _vm.$slots.prepend,
|
|
723
|
-
"el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
|
|
724
|
-
"el-input--suffix":
|
|
725
|
-
_vm.$slots.suffix ||
|
|
726
|
-
_vm.suffixIcon ||
|
|
727
|
-
_vm.clearable ||
|
|
728
|
-
_vm.showPassword,
|
|
729
|
-
},
|
|
730
|
-
],
|
|
731
|
-
on: {
|
|
732
|
-
mouseenter: function ($event) {
|
|
733
|
-
_vm.hovering = true
|
|
734
|
-
},
|
|
735
|
-
mouseleave: function ($event) {
|
|
736
|
-
_vm.hovering = false
|
|
737
|
-
},
|
|
738
|
-
},
|
|
739
|
-
},
|
|
740
|
-
[
|
|
741
|
-
_vm.type !== "textarea"
|
|
742
|
-
? [
|
|
743
|
-
_vm.$slots.prepend
|
|
744
|
-
? _c(
|
|
745
|
-
"div",
|
|
746
|
-
{ staticClass: "el-input-group__prepend" },
|
|
747
|
-
[_vm._t("prepend")],
|
|
748
|
-
2
|
|
749
|
-
)
|
|
750
|
-
: _vm._e(),
|
|
751
|
-
_vm.type !== "textarea"
|
|
752
|
-
? _c(
|
|
753
|
-
"input",
|
|
754
|
-
_vm._b(
|
|
755
|
-
{
|
|
756
|
-
ref: "input",
|
|
757
|
-
staticClass: "el-input__inner",
|
|
758
|
-
attrs: {
|
|
759
|
-
tabindex: _vm.tabindex,
|
|
760
|
-
type: _vm.showPassword
|
|
761
|
-
? _vm.passwordVisible
|
|
762
|
-
? "text"
|
|
763
|
-
: "password"
|
|
764
|
-
: _vm.type,
|
|
765
|
-
disabled: _vm.inputDisabled,
|
|
766
|
-
readonly: _vm.readonly,
|
|
767
|
-
autocomplete: _vm.autoComplete || _vm.autocomplete,
|
|
768
|
-
"aria-label": _vm.label,
|
|
769
|
-
},
|
|
770
|
-
on: {
|
|
771
|
-
compositionstart: _vm.handleCompositionStart,
|
|
772
|
-
compositionupdate: _vm.handleCompositionUpdate,
|
|
773
|
-
compositionend: _vm.handleCompositionEnd,
|
|
774
|
-
input: _vm.handleInput,
|
|
775
|
-
focus: _vm.handleFocus,
|
|
776
|
-
blur: _vm.handleBlur,
|
|
777
|
-
change: _vm.handleChange,
|
|
778
|
-
},
|
|
779
|
-
},
|
|
780
|
-
"input",
|
|
781
|
-
_vm.$attrs,
|
|
782
|
-
false
|
|
783
|
-
)
|
|
784
|
-
)
|
|
785
|
-
: _vm._e(),
|
|
786
|
-
_vm.$slots.prefix || _vm.prefixIcon
|
|
787
|
-
? _c(
|
|
788
|
-
"span",
|
|
789
|
-
{ staticClass: "el-input__prefix" },
|
|
790
|
-
[
|
|
791
|
-
_vm._t("prefix"),
|
|
792
|
-
_vm.prefixIcon
|
|
793
|
-
? _c("i", {
|
|
794
|
-
staticClass: "el-input__icon",
|
|
795
|
-
class: _vm.prefixIcon,
|
|
796
|
-
})
|
|
797
|
-
: _vm._e(),
|
|
798
|
-
],
|
|
799
|
-
2
|
|
800
|
-
)
|
|
801
|
-
: _vm._e(),
|
|
802
|
-
_vm.getSuffixVisible()
|
|
803
|
-
? _c("span", { staticClass: "el-input__suffix" }, [
|
|
804
|
-
_c(
|
|
805
|
-
"span",
|
|
806
|
-
{ staticClass: "el-input__suffix-inner" },
|
|
807
|
-
[
|
|
808
|
-
!_vm.showClear ||
|
|
809
|
-
!_vm.showPwdVisible ||
|
|
810
|
-
!_vm.isWordLimitVisible
|
|
811
|
-
? [
|
|
812
|
-
_vm._t("suffix"),
|
|
813
|
-
_vm.suffixIcon
|
|
814
|
-
? _c("i", {
|
|
815
|
-
staticClass: "el-input__icon",
|
|
816
|
-
class: _vm.suffixIcon,
|
|
817
|
-
})
|
|
818
|
-
: _vm._e(),
|
|
819
|
-
]
|
|
820
|
-
: _vm._e(),
|
|
821
|
-
_vm.showClear
|
|
822
|
-
? _c("i", {
|
|
823
|
-
staticClass:
|
|
824
|
-
"el-input__icon el-icon-circle-close el-input__clear",
|
|
825
|
-
on: {
|
|
826
|
-
mousedown: function ($event) {
|
|
827
|
-
$event.preventDefault()
|
|
828
|
-
},
|
|
829
|
-
click: _vm.clear,
|
|
830
|
-
},
|
|
831
|
-
})
|
|
832
|
-
: _vm._e(),
|
|
833
|
-
_vm.showPwdVisible
|
|
834
|
-
? _c("i", {
|
|
835
|
-
staticClass:
|
|
836
|
-
"el-input__icon el-icon-view el-input__clear",
|
|
837
|
-
on: { click: _vm.handlePasswordVisible },
|
|
838
|
-
})
|
|
839
|
-
: _vm._e(),
|
|
840
|
-
_vm.isWordLimitVisible
|
|
841
|
-
? _c("span", { staticClass: "el-input__count" }, [
|
|
842
|
-
_c(
|
|
843
|
-
"span",
|
|
844
|
-
{ staticClass: "el-input__count-inner" },
|
|
845
|
-
[
|
|
846
|
-
_vm._v(
|
|
847
|
-
"\n\t\t\t\t\t\t" +
|
|
848
|
-
_vm._s(_vm.textLength) +
|
|
849
|
-
"/" +
|
|
850
|
-
_vm._s(_vm.upperLimit) +
|
|
851
|
-
"\n\t\t\t\t\t"
|
|
852
|
-
),
|
|
853
|
-
]
|
|
854
|
-
),
|
|
855
|
-
])
|
|
856
|
-
: _vm._e(),
|
|
857
|
-
],
|
|
858
|
-
2
|
|
859
|
-
),
|
|
860
|
-
_vm.validateState
|
|
861
|
-
? _c("i", {
|
|
862
|
-
staticClass: "el-input__icon",
|
|
863
|
-
class: ["el-input__validateIcon", _vm.validateIcon],
|
|
864
|
-
})
|
|
865
|
-
: _vm._e(),
|
|
866
|
-
])
|
|
867
|
-
: _vm._e(),
|
|
868
|
-
_vm.$slots.append
|
|
869
|
-
? _c(
|
|
870
|
-
"div",
|
|
871
|
-
{ staticClass: "el-input-group__append" },
|
|
872
|
-
[_vm._t("append")],
|
|
873
|
-
2
|
|
874
|
-
)
|
|
875
|
-
: _vm._e(),
|
|
876
|
-
]
|
|
877
|
-
: _c(
|
|
878
|
-
"textarea",
|
|
879
|
-
_vm._b(
|
|
880
|
-
{
|
|
881
|
-
ref: "textarea",
|
|
882
|
-
staticClass: "el-textarea__inner",
|
|
883
|
-
style: _vm.textareaStyle,
|
|
884
|
-
attrs: {
|
|
885
|
-
tabindex: _vm.tabindex,
|
|
886
|
-
disabled: _vm.inputDisabled,
|
|
887
|
-
readonly: _vm.readonly,
|
|
888
|
-
autocomplete: _vm.autoComplete || _vm.autocomplete,
|
|
889
|
-
"aria-label": _vm.label,
|
|
890
|
-
},
|
|
891
|
-
on: {
|
|
892
|
-
compositionstart: _vm.handleCompositionStart,
|
|
893
|
-
compositionupdate: _vm.handleCompositionUpdate,
|
|
894
|
-
compositionend: _vm.handleCompositionEnd,
|
|
895
|
-
input: _vm.handleInput,
|
|
896
|
-
focus: _vm.handleFocus,
|
|
897
|
-
blur: _vm.handleBlur,
|
|
898
|
-
change: _vm.handleChange,
|
|
899
|
-
},
|
|
900
|
-
},
|
|
901
|
-
"textarea",
|
|
902
|
-
_vm.$attrs,
|
|
903
|
-
false
|
|
904
|
-
)
|
|
905
|
-
),
|
|
906
|
-
_vm.isWordLimitVisible && _vm.type === "textarea"
|
|
907
|
-
? _c("span", { staticClass: "el-input__count" }, [
|
|
908
|
-
_vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit)),
|
|
909
|
-
])
|
|
910
|
-
: _vm._e(),
|
|
911
|
-
],
|
|
912
|
-
2
|
|
913
|
-
)
|
|
914
|
-
}
|
|
915
|
-
var staticRenderFns = []
|
|
916
|
-
render._withStripped = true
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=af7512c8
|
|
920
|
-
|
|
921
|
-
// EXTERNAL MODULE: ./src/mixins/emitter.js
|
|
922
|
-
var emitter = __webpack_require__(6);
|
|
923
|
-
|
|
924
|
-
// EXTERNAL MODULE: ./src/mixins/migrating.js
|
|
925
|
-
var migrating = __webpack_require__(12);
|
|
926
|
-
|
|
927
|
-
// CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
|
|
928
|
-
var hiddenTextarea = void 0;
|
|
929
|
-
|
|
930
|
-
var HIDDEN_STYLE = '\n\theight:0 !important;\n\tvisibility:hidden !important;\n\toverflow:hidden !important;\n\tposition:absolute !important;\n\tz-index:-1000 !important;\n\ttop:0 !important;\n\tright:0 !important\n';
|
|
931
|
-
|
|
932
|
-
var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
|
|
933
|
-
|
|
934
|
-
function calculateNodeStyling(targetElement) {
|
|
935
|
-
var style = window.getComputedStyle(targetElement);
|
|
936
|
-
|
|
937
|
-
var boxSizing = style.getPropertyValue('box-sizing');
|
|
938
|
-
|
|
939
|
-
var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
|
|
940
|
-
|
|
941
|
-
var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
|
|
942
|
-
|
|
943
|
-
var contextStyle = CONTEXT_STYLE.map(function (name) {
|
|
944
|
-
return name + ':' + style.getPropertyValue(name);
|
|
945
|
-
}).join(';');
|
|
946
|
-
|
|
947
|
-
return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
function calcTextareaHeight(targetElement) {
|
|
951
|
-
var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
952
|
-
var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
953
|
-
|
|
954
|
-
if (!hiddenTextarea) {
|
|
955
|
-
hiddenTextarea = document.createElement('textarea');
|
|
956
|
-
document.body.appendChild(hiddenTextarea);
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
var _calculateNodeStyling = calculateNodeStyling(targetElement),
|
|
960
|
-
paddingSize = _calculateNodeStyling.paddingSize,
|
|
961
|
-
borderSize = _calculateNodeStyling.borderSize,
|
|
962
|
-
boxSizing = _calculateNodeStyling.boxSizing,
|
|
963
|
-
contextStyle = _calculateNodeStyling.contextStyle;
|
|
964
|
-
|
|
965
|
-
hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
|
|
966
|
-
hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
|
|
967
|
-
|
|
968
|
-
var height = hiddenTextarea.scrollHeight;
|
|
969
|
-
var result = {};
|
|
970
|
-
|
|
971
|
-
if (boxSizing === 'border-box') {
|
|
972
|
-
height = height + borderSize;
|
|
973
|
-
} else if (boxSizing === 'content-box') {
|
|
974
|
-
height = height - paddingSize;
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
hiddenTextarea.value = '';
|
|
978
|
-
var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
|
|
979
|
-
|
|
980
|
-
if (minRows !== null) {
|
|
981
|
-
var minHeight = singleRowHeight * minRows;
|
|
982
|
-
if (boxSizing === 'border-box') {
|
|
983
|
-
minHeight = minHeight + paddingSize + borderSize;
|
|
984
|
-
}
|
|
985
|
-
height = Math.max(minHeight, height);
|
|
986
|
-
result.minHeight = minHeight + 'px';
|
|
987
|
-
}
|
|
988
|
-
if (maxRows !== null) {
|
|
989
|
-
var maxHeight = singleRowHeight * maxRows;
|
|
990
|
-
if (boxSizing === 'border-box') {
|
|
991
|
-
maxHeight = maxHeight + paddingSize + borderSize;
|
|
992
|
-
}
|
|
993
|
-
height = Math.min(maxHeight, height);
|
|
994
|
-
}
|
|
995
|
-
result.height = height + 'px';
|
|
996
|
-
hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
|
|
997
|
-
hiddenTextarea = null;
|
|
998
|
-
return result;
|
|
999
|
-
};
|
|
1000
|
-
// EXTERNAL MODULE: ./src/utils/merge.js
|
|
1001
|
-
var merge = __webpack_require__(7);
|
|
1002
|
-
|
|
1003
|
-
// EXTERNAL MODULE: ./src/utils/shared.js
|
|
1004
|
-
var shared = __webpack_require__(16);
|
|
1005
|
-
|
|
1006
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
/* harmony default export */ var inputvue_type_script_lang_js = ({
|
|
1015
|
-
name: 'ElInput',
|
|
1016
|
-
|
|
1017
|
-
componentName: 'ElInput',
|
|
1018
|
-
|
|
1019
|
-
mixins: [emitter["a" /* default */], migrating["a" /* default */]],
|
|
1020
|
-
|
|
1021
|
-
inheritAttrs: false,
|
|
1022
|
-
|
|
1023
|
-
inject: {
|
|
1024
|
-
elForm: {
|
|
1025
|
-
default: ''
|
|
1026
|
-
},
|
|
1027
|
-
elFormItem: {
|
|
1028
|
-
default: ''
|
|
1029
|
-
}
|
|
1030
|
-
},
|
|
1031
|
-
|
|
1032
|
-
data: function data() {
|
|
1033
|
-
return {
|
|
1034
|
-
textareaCalcStyle: {},
|
|
1035
|
-
hovering: false,
|
|
1036
|
-
focused: false,
|
|
1037
|
-
isComposing: false,
|
|
1038
|
-
passwordVisible: false
|
|
1039
|
-
};
|
|
1040
|
-
},
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
props: {
|
|
1044
|
-
value: [String, Number],
|
|
1045
|
-
size: String,
|
|
1046
|
-
resize: String,
|
|
1047
|
-
form: String,
|
|
1048
|
-
disabled: Boolean,
|
|
1049
|
-
readonly: Boolean,
|
|
1050
|
-
type: {
|
|
1051
|
-
type: String,
|
|
1052
|
-
default: 'text'
|
|
1053
|
-
},
|
|
1054
|
-
autosize: {
|
|
1055
|
-
type: [Boolean, Object],
|
|
1056
|
-
default: false
|
|
1057
|
-
},
|
|
1058
|
-
autocomplete: {
|
|
1059
|
-
type: String,
|
|
1060
|
-
default: 'off'
|
|
1061
|
-
},
|
|
1062
|
-
/** @Deprecated in next major version */
|
|
1063
|
-
autoComplete: {
|
|
1064
|
-
type: String,
|
|
1065
|
-
validator: function validator(val) {
|
|
1066
|
-
false && false;
|
|
1067
|
-
return true;
|
|
1068
|
-
}
|
|
1069
|
-
},
|
|
1070
|
-
validateEvent: {
|
|
1071
|
-
type: Boolean,
|
|
1072
|
-
default: true
|
|
1073
|
-
},
|
|
1074
|
-
suffixIcon: String,
|
|
1075
|
-
prefixIcon: String,
|
|
1076
|
-
label: String,
|
|
1077
|
-
clearable: {
|
|
1078
|
-
type: Boolean,
|
|
1079
|
-
default: false
|
|
1080
|
-
},
|
|
1081
|
-
showPassword: {
|
|
1082
|
-
type: Boolean,
|
|
1083
|
-
default: false
|
|
1084
|
-
},
|
|
1085
|
-
showWordLimit: {
|
|
1086
|
-
type: Boolean,
|
|
1087
|
-
default: false
|
|
1088
|
-
},
|
|
1089
|
-
tabindex: String
|
|
1090
|
-
},
|
|
1091
|
-
|
|
1092
|
-
computed: {
|
|
1093
|
-
_elFormItemSize: function _elFormItemSize() {
|
|
1094
|
-
return (this.elFormItem || {}).elFormItemSize;
|
|
1095
|
-
},
|
|
1096
|
-
validateState: function validateState() {
|
|
1097
|
-
return this.elFormItem ? this.elFormItem.validateState : '';
|
|
1098
|
-
},
|
|
1099
|
-
needStatusIcon: function needStatusIcon() {
|
|
1100
|
-
return this.elForm ? this.elForm.statusIcon : false;
|
|
1101
|
-
},
|
|
1102
|
-
validateIcon: function validateIcon() {
|
|
1103
|
-
return {
|
|
1104
|
-
validating: 'el-icon-loading',
|
|
1105
|
-
success: 'el-icon-circle-check',
|
|
1106
|
-
error: 'el-icon-circle-close'
|
|
1107
|
-
}[this.validateState];
|
|
1108
|
-
},
|
|
1109
|
-
textareaStyle: function textareaStyle() {
|
|
1110
|
-
return Object(merge["a" /* default */])({}, this.textareaCalcStyle, { resize: this.resize });
|
|
1111
|
-
},
|
|
1112
|
-
inputSize: function inputSize() {
|
|
1113
|
-
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
1114
|
-
},
|
|
1115
|
-
inputDisabled: function inputDisabled() {
|
|
1116
|
-
return this.disabled || (this.elForm || {}).disabled;
|
|
1117
|
-
},
|
|
1118
|
-
nativeInputValue: function nativeInputValue() {
|
|
1119
|
-
return this.value === null || this.value === undefined ? '' : String(this.value);
|
|
1120
|
-
},
|
|
1121
|
-
showClear: function showClear() {
|
|
1122
|
-
return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
|
|
1123
|
-
},
|
|
1124
|
-
showPwdVisible: function showPwdVisible() {
|
|
1125
|
-
return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
|
|
1126
|
-
},
|
|
1127
|
-
isWordLimitVisible: function isWordLimitVisible() {
|
|
1128
|
-
return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
|
|
1129
|
-
},
|
|
1130
|
-
upperLimit: function upperLimit() {
|
|
1131
|
-
return this.$attrs.maxlength;
|
|
1132
|
-
},
|
|
1133
|
-
textLength: function textLength() {
|
|
1134
|
-
if (typeof this.value === 'number') {
|
|
1135
|
-
return String(this.value).length;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
return (this.value || '').length;
|
|
1139
|
-
},
|
|
1140
|
-
inputExceed: function inputExceed() {
|
|
1141
|
-
// show exceed style if length of initial value greater then maxlength
|
|
1142
|
-
return this.isWordLimitVisible && this.textLength > this.upperLimit;
|
|
1143
|
-
}
|
|
1144
|
-
},
|
|
1145
|
-
|
|
1146
|
-
watch: {
|
|
1147
|
-
value: function value(val) {
|
|
1148
|
-
this.$nextTick(this.resizeTextarea);
|
|
1149
|
-
if (this.validateEvent) {
|
|
1150
|
-
this.dispatch('ElFormItem', 'el.form.change', [val]);
|
|
1151
|
-
}
|
|
1152
|
-
},
|
|
1153
|
-
|
|
1154
|
-
// native input value is set explicitly
|
|
1155
|
-
// do not use v-model / :value in template
|
|
1156
|
-
// see: https://github.com/ElemeFE/element/issues/14521
|
|
1157
|
-
nativeInputValue: function nativeInputValue() {
|
|
1158
|
-
this.setNativeInputValue();
|
|
1159
|
-
},
|
|
1160
|
-
|
|
1161
|
-
// when change between <input> and <textarea>,
|
|
1162
|
-
// update DOM dependent value and styles
|
|
1163
|
-
// https://github.com/ElemeFE/element/issues/14857
|
|
1164
|
-
type: function type() {
|
|
1165
|
-
var _this = this;
|
|
1166
|
-
|
|
1167
|
-
this.$nextTick(function () {
|
|
1168
|
-
_this.setNativeInputValue();
|
|
1169
|
-
_this.resizeTextarea();
|
|
1170
|
-
_this.updateIconOffset();
|
|
1171
|
-
});
|
|
1172
|
-
}
|
|
1173
|
-
},
|
|
1174
|
-
|
|
1175
|
-
methods: {
|
|
1176
|
-
focus: function focus() {
|
|
1177
|
-
this.getInput().focus();
|
|
1178
|
-
},
|
|
1179
|
-
blur: function blur() {
|
|
1180
|
-
this.getInput().blur();
|
|
1181
|
-
},
|
|
1182
|
-
getMigratingConfig: function getMigratingConfig() {
|
|
1183
|
-
return {
|
|
1184
|
-
props: {
|
|
1185
|
-
'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
|
|
1186
|
-
'on-icon-click': 'on-icon-click is removed.'
|
|
1187
|
-
},
|
|
1188
|
-
events: {
|
|
1189
|
-
'click': 'click is removed.'
|
|
1190
|
-
}
|
|
1191
|
-
};
|
|
1192
|
-
},
|
|
1193
|
-
handleBlur: function handleBlur(event) {
|
|
1194
|
-
this.focused = false;
|
|
1195
|
-
this.$emit('blur', event);
|
|
1196
|
-
if (this.validateEvent) {
|
|
1197
|
-
this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
|
|
1198
|
-
}
|
|
1199
|
-
},
|
|
1200
|
-
select: function select() {
|
|
1201
|
-
this.getInput().select();
|
|
1202
|
-
},
|
|
1203
|
-
resizeTextarea: function resizeTextarea() {
|
|
1204
|
-
if (this.$isServer) return;
|
|
1205
|
-
var autosize = this.autosize,
|
|
1206
|
-
type = this.type;
|
|
1207
|
-
|
|
1208
|
-
if (type !== 'textarea') return;
|
|
1209
|
-
if (!autosize) {
|
|
1210
|
-
this.textareaCalcStyle = {
|
|
1211
|
-
minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
|
|
1212
|
-
};
|
|
1213
|
-
return;
|
|
1214
|
-
}
|
|
1215
|
-
var minRows = autosize.minRows;
|
|
1216
|
-
var maxRows = autosize.maxRows;
|
|
1217
|
-
|
|
1218
|
-
this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
|
|
1219
|
-
},
|
|
1220
|
-
setNativeInputValue: function setNativeInputValue() {
|
|
1221
|
-
var input = this.getInput();
|
|
1222
|
-
if (!input) return;
|
|
1223
|
-
if (input.value === this.nativeInputValue) return;
|
|
1224
|
-
input.value = this.nativeInputValue;
|
|
1225
|
-
},
|
|
1226
|
-
handleFocus: function handleFocus(event) {
|
|
1227
|
-
this.focused = true;
|
|
1228
|
-
this.$emit('focus', event);
|
|
1229
|
-
},
|
|
1230
|
-
handleCompositionStart: function handleCompositionStart(event) {
|
|
1231
|
-
this.$emit('compositionstart', event);
|
|
1232
|
-
this.isComposing = true;
|
|
1233
|
-
},
|
|
1234
|
-
handleCompositionUpdate: function handleCompositionUpdate(event) {
|
|
1235
|
-
this.$emit('compositionupdate', event);
|
|
1236
|
-
var text = event.target.value;
|
|
1237
|
-
var lastCharacter = text[text.length - 1] || '';
|
|
1238
|
-
this.isComposing = !Object(shared["b" /* isKorean */])(lastCharacter);
|
|
1239
|
-
},
|
|
1240
|
-
handleCompositionEnd: function handleCompositionEnd(event) {
|
|
1241
|
-
this.$emit('compositionend', event);
|
|
1242
|
-
if (this.isComposing) {
|
|
1243
|
-
this.isComposing = false;
|
|
1244
|
-
this.handleInput(event);
|
|
1245
|
-
}
|
|
1246
|
-
},
|
|
1247
|
-
handleInput: function handleInput(event) {
|
|
1248
|
-
// should not emit input during composition
|
|
1249
|
-
// see: https://github.com/ElemeFE/element/issues/10516
|
|
1250
|
-
if (this.isComposing) return;
|
|
1251
|
-
|
|
1252
|
-
// hack for https://github.com/ElemeFE/element/issues/8548
|
|
1253
|
-
// should remove the following line when we don't support IE
|
|
1254
|
-
if (event.target.value === this.nativeInputValue) return;
|
|
1255
|
-
|
|
1256
|
-
this.$emit('input', event.target.value);
|
|
1257
|
-
|
|
1258
|
-
// ensure native input value is controlled
|
|
1259
|
-
// see: https://github.com/ElemeFE/element/issues/12850
|
|
1260
|
-
this.$nextTick(this.setNativeInputValue);
|
|
1261
|
-
},
|
|
1262
|
-
handleChange: function handleChange(event) {
|
|
1263
|
-
this.$emit('change', event.target.value);
|
|
1264
|
-
},
|
|
1265
|
-
calcIconOffset: function calcIconOffset(place) {
|
|
1266
|
-
var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
|
|
1267
|
-
if (!elList.length) return;
|
|
1268
|
-
var el = null;
|
|
1269
|
-
for (var i = 0; i < elList.length; i++) {
|
|
1270
|
-
if (elList[i].parentNode === this.$el) {
|
|
1271
|
-
el = elList[i];
|
|
1272
|
-
break;
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
if (!el) return;
|
|
1276
|
-
var pendantMap = {
|
|
1277
|
-
suffix: 'append',
|
|
1278
|
-
prefix: 'prepend'
|
|
1279
|
-
};
|
|
1280
|
-
|
|
1281
|
-
var pendant = pendantMap[place];
|
|
1282
|
-
if (this.$slots[pendant]) {
|
|
1283
|
-
el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
|
|
1284
|
-
} else {
|
|
1285
|
-
el.removeAttribute('style');
|
|
1286
|
-
}
|
|
1287
|
-
},
|
|
1288
|
-
updateIconOffset: function updateIconOffset() {
|
|
1289
|
-
this.calcIconOffset('prefix');
|
|
1290
|
-
this.calcIconOffset('suffix');
|
|
1291
|
-
},
|
|
1292
|
-
clear: function clear() {
|
|
1293
|
-
this.$emit('input', '');
|
|
1294
|
-
this.$emit('change', '');
|
|
1295
|
-
this.$emit('clear');
|
|
1296
|
-
},
|
|
1297
|
-
handlePasswordVisible: function handlePasswordVisible() {
|
|
1298
|
-
var _this2 = this;
|
|
1299
|
-
|
|
1300
|
-
this.passwordVisible = !this.passwordVisible;
|
|
1301
|
-
this.$nextTick(function () {
|
|
1302
|
-
_this2.focus();
|
|
1303
|
-
});
|
|
1304
|
-
},
|
|
1305
|
-
getInput: function getInput() {
|
|
1306
|
-
return this.$refs.input || this.$refs.textarea;
|
|
1307
|
-
},
|
|
1308
|
-
getSuffixVisible: function getSuffixVisible() {
|
|
1309
|
-
return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
|
|
1310
|
-
}
|
|
1311
|
-
},
|
|
1312
|
-
|
|
1313
|
-
created: function created() {
|
|
1314
|
-
this.$on('inputSelect', this.select);
|
|
1315
|
-
},
|
|
1316
|
-
mounted: function mounted() {
|
|
1317
|
-
this.setNativeInputValue();
|
|
1318
|
-
this.resizeTextarea();
|
|
1319
|
-
this.updateIconOffset();
|
|
1320
|
-
},
|
|
1321
|
-
updated: function updated() {
|
|
1322
|
-
this.$nextTick(this.updateIconOffset);
|
|
1323
|
-
}
|
|
1324
|
-
});
|
|
1325
|
-
// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js
|
|
1326
|
-
/* harmony default export */ var src_inputvue_type_script_lang_js = (inputvue_type_script_lang_js);
|
|
1327
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
1328
|
-
var componentNormalizer = __webpack_require__(2);
|
|
1329
|
-
|
|
1330
|
-
// CONCATENATED MODULE: ./packages/input/src/input.vue
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
/* normalize component */
|
|
1337
|
-
|
|
1338
|
-
var component = Object(componentNormalizer["a" /* default */])(
|
|
1339
|
-
src_inputvue_type_script_lang_js,
|
|
1340
|
-
render,
|
|
1341
|
-
staticRenderFns,
|
|
1342
|
-
false,
|
|
1343
|
-
null,
|
|
1344
|
-
null,
|
|
1345
|
-
null
|
|
1346
|
-
|
|
1347
|
-
)
|
|
1348
|
-
|
|
1349
|
-
/* harmony default export */ var input = (component.exports);
|
|
1350
|
-
// CONCATENATED MODULE: ./packages/input/index.js
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
/* istanbul ignore next */
|
|
1354
|
-
input.install = function (Vue) {
|
|
1355
|
-
Vue.component(input.name, input);
|
|
1356
|
-
};
|
|
1357
|
-
|
|
1358
|
-
/* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
|
|
1359
|
-
|
|
1360
|
-
/***/ }),
|
|
1361
|
-
|
|
1362
|
-
/***/ 2:
|
|
1363
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1364
92
|
|
|
1365
93
|
"use strict";
|
|
@@ -1464,696 +192,70 @@ function normalizeComponent(
|
|
|
1464
192
|
|
|
1465
193
|
/***/ }),
|
|
1466
194
|
|
|
1467
|
-
/***/
|
|
1468
|
-
/***/ (function(module,
|
|
1469
|
-
|
|
1470
|
-
"use strict";
|
|
1471
|
-
// ESM COMPAT FLAG
|
|
1472
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1473
|
-
|
|
1474
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=7105114a
|
|
1475
|
-
var render = function render() {
|
|
1476
|
-
var _vm = this,
|
|
1477
|
-
_c = _vm._self._c
|
|
1478
|
-
return _c(
|
|
1479
|
-
"button",
|
|
1480
|
-
{
|
|
1481
|
-
staticClass: "el-button",
|
|
1482
|
-
class: [
|
|
1483
|
-
_vm.type ? "el-button--" + _vm.type : "",
|
|
1484
|
-
_vm.buttonSize ? "el-button--" + _vm.buttonSize : "",
|
|
1485
|
-
{
|
|
1486
|
-
"is-disabled": _vm.buttonDisabled,
|
|
1487
|
-
"is-loading": _vm.loading,
|
|
1488
|
-
"is-plain": _vm.plain,
|
|
1489
|
-
"is-round": _vm.round,
|
|
1490
|
-
"is-circle": _vm.circle,
|
|
1491
|
-
},
|
|
1492
|
-
],
|
|
1493
|
-
attrs: {
|
|
1494
|
-
disabled: _vm.buttonDisabled || _vm.loading,
|
|
1495
|
-
autofocus: _vm.autofocus,
|
|
1496
|
-
type: _vm.nativeType,
|
|
1497
|
-
},
|
|
1498
|
-
on: { click: _vm.handleClick },
|
|
1499
|
-
},
|
|
1500
|
-
[
|
|
1501
|
-
_vm.loading ? _c("i", { staticClass: "el-icon-loading" }) : _vm._e(),
|
|
1502
|
-
_vm.icon && !_vm.loading ? _c("i", { class: _vm.icon }) : _vm._e(),
|
|
1503
|
-
_vm.$slots.default ? _c("span", [_vm._t("default")], 2) : _vm._e(),
|
|
1504
|
-
]
|
|
1505
|
-
)
|
|
1506
|
-
}
|
|
1507
|
-
var staticRenderFns = []
|
|
1508
|
-
render._withStripped = true
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=7105114a
|
|
1512
|
-
|
|
1513
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=script&lang=js
|
|
1514
|
-
|
|
1515
|
-
/* harmony default export */ var buttonvue_type_script_lang_js = ({
|
|
1516
|
-
name: 'ElButton',
|
|
1517
|
-
|
|
1518
|
-
inject: {
|
|
1519
|
-
elForm: {
|
|
1520
|
-
default: ''
|
|
1521
|
-
},
|
|
1522
|
-
elFormItem: {
|
|
1523
|
-
default: ''
|
|
1524
|
-
}
|
|
1525
|
-
},
|
|
1526
|
-
|
|
1527
|
-
props: {
|
|
1528
|
-
type: {
|
|
1529
|
-
type: String,
|
|
1530
|
-
default: 'default'
|
|
1531
|
-
},
|
|
1532
|
-
size: String,
|
|
1533
|
-
icon: {
|
|
1534
|
-
type: String,
|
|
1535
|
-
default: ''
|
|
1536
|
-
},
|
|
1537
|
-
nativeType: {
|
|
1538
|
-
type: String,
|
|
1539
|
-
default: 'button'
|
|
1540
|
-
},
|
|
1541
|
-
loading: Boolean,
|
|
1542
|
-
disabled: Boolean,
|
|
1543
|
-
plain: Boolean,
|
|
1544
|
-
autofocus: Boolean,
|
|
1545
|
-
round: Boolean,
|
|
1546
|
-
circle: Boolean
|
|
1547
|
-
},
|
|
1548
|
-
|
|
1549
|
-
computed: {
|
|
1550
|
-
_elFormItemSize: function _elFormItemSize() {
|
|
1551
|
-
return (this.elFormItem || {}).elFormItemSize;
|
|
1552
|
-
},
|
|
1553
|
-
buttonSize: function buttonSize() {
|
|
1554
|
-
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
1555
|
-
},
|
|
1556
|
-
buttonDisabled: function buttonDisabled() {
|
|
1557
|
-
return this.$options.propsData.hasOwnProperty('disabled') ? this.disabled : (this.elForm || {}).disabled;
|
|
1558
|
-
}
|
|
1559
|
-
},
|
|
1560
|
-
|
|
1561
|
-
methods: {
|
|
1562
|
-
handleClick: function handleClick(evt) {
|
|
1563
|
-
this.$emit('click', evt);
|
|
1564
|
-
}
|
|
1565
|
-
}
|
|
1566
|
-
});
|
|
1567
|
-
// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js
|
|
1568
|
-
/* harmony default export */ var src_buttonvue_type_script_lang_js = (buttonvue_type_script_lang_js);
|
|
1569
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
1570
|
-
var componentNormalizer = __webpack_require__(2);
|
|
1571
|
-
|
|
1572
|
-
// CONCATENATED MODULE: ./packages/button/src/button.vue
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
/* normalize component */
|
|
1579
|
-
|
|
1580
|
-
var component = Object(componentNormalizer["a" /* default */])(
|
|
1581
|
-
src_buttonvue_type_script_lang_js,
|
|
1582
|
-
render,
|
|
1583
|
-
staticRenderFns,
|
|
1584
|
-
false,
|
|
1585
|
-
null,
|
|
1586
|
-
null,
|
|
1587
|
-
null
|
|
1588
|
-
|
|
1589
|
-
)
|
|
1590
|
-
|
|
1591
|
-
/* harmony default export */ var src_button = (component.exports);
|
|
1592
|
-
// CONCATENATED MODULE: ./packages/button/index.js
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
/* istanbul ignore next */
|
|
1596
|
-
src_button.install = function (Vue) {
|
|
1597
|
-
Vue.component(src_button.name, src_button);
|
|
1598
|
-
};
|
|
195
|
+
/***/ 10:
|
|
196
|
+
/***/ (function(module, exports) {
|
|
1599
197
|
|
|
1600
|
-
|
|
198
|
+
module.exports = require("element-ui/lib/input");
|
|
1601
199
|
|
|
1602
200
|
/***/ }),
|
|
1603
201
|
|
|
1604
|
-
/***/
|
|
1605
|
-
/***/ (function(module,
|
|
1606
|
-
|
|
1607
|
-
"use strict";
|
|
1608
|
-
var aria = aria || {};
|
|
1609
|
-
|
|
1610
|
-
aria.Utils = aria.Utils || {};
|
|
1611
|
-
|
|
1612
|
-
/**
|
|
1613
|
-
* @desc Set focus on descendant nodes until the first focusable element is
|
|
1614
|
-
* found.
|
|
1615
|
-
* @param element
|
|
1616
|
-
* DOM node for which to find the first focusable descendant.
|
|
1617
|
-
* @returns
|
|
1618
|
-
* true if a focusable element is found and focus is set.
|
|
1619
|
-
*/
|
|
1620
|
-
aria.Utils.focusFirstDescendant = function (element) {
|
|
1621
|
-
for (var i = 0; i < element.childNodes.length; i++) {
|
|
1622
|
-
var child = element.childNodes[i];
|
|
1623
|
-
if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
|
|
1624
|
-
return true;
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
return false;
|
|
1628
|
-
};
|
|
1629
|
-
|
|
1630
|
-
/**
|
|
1631
|
-
* @desc Find the last descendant node that is focusable.
|
|
1632
|
-
* @param element
|
|
1633
|
-
* DOM node for which to find the last focusable descendant.
|
|
1634
|
-
* @returns
|
|
1635
|
-
* true if a focusable element is found and focus is set.
|
|
1636
|
-
*/
|
|
1637
|
-
|
|
1638
|
-
aria.Utils.focusLastDescendant = function (element) {
|
|
1639
|
-
for (var i = element.childNodes.length - 1; i >= 0; i--) {
|
|
1640
|
-
var child = element.childNodes[i];
|
|
1641
|
-
if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
|
|
1642
|
-
return true;
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
return false;
|
|
1646
|
-
};
|
|
1647
|
-
|
|
1648
|
-
/**
|
|
1649
|
-
* @desc Set Attempt to set focus on the current node.
|
|
1650
|
-
* @param element
|
|
1651
|
-
* The node to attempt to focus on.
|
|
1652
|
-
* @returns
|
|
1653
|
-
* true if element is focused.
|
|
1654
|
-
*/
|
|
1655
|
-
aria.Utils.attemptFocus = function (element) {
|
|
1656
|
-
if (!aria.Utils.isFocusable(element)) {
|
|
1657
|
-
return false;
|
|
1658
|
-
}
|
|
1659
|
-
aria.Utils.IgnoreUtilFocusChanges = true;
|
|
1660
|
-
try {
|
|
1661
|
-
element.focus();
|
|
1662
|
-
} catch (e) {}
|
|
1663
|
-
aria.Utils.IgnoreUtilFocusChanges = false;
|
|
1664
|
-
return document.activeElement === element;
|
|
1665
|
-
};
|
|
1666
|
-
|
|
1667
|
-
aria.Utils.isFocusable = function (element) {
|
|
1668
|
-
if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
|
|
1669
|
-
return true;
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
if (element.disabled) {
|
|
1673
|
-
return false;
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
switch (element.nodeName) {
|
|
1677
|
-
case 'A':
|
|
1678
|
-
return !!element.href && element.rel !== 'ignore';
|
|
1679
|
-
case 'INPUT':
|
|
1680
|
-
return element.type !== 'hidden' && element.type !== 'file';
|
|
1681
|
-
case 'BUTTON':
|
|
1682
|
-
case 'SELECT':
|
|
1683
|
-
case 'TEXTAREA':
|
|
1684
|
-
return true;
|
|
1685
|
-
default:
|
|
1686
|
-
return false;
|
|
1687
|
-
}
|
|
1688
|
-
};
|
|
1689
|
-
|
|
1690
|
-
/**
|
|
1691
|
-
* 触发一个事件
|
|
1692
|
-
* mouseenter, mouseleave, mouseover, keyup, change, click 等
|
|
1693
|
-
* @param {Element} elm
|
|
1694
|
-
* @param {String} name
|
|
1695
|
-
* @param {*} opts
|
|
1696
|
-
*/
|
|
1697
|
-
aria.Utils.triggerEvent = function (elm, name) {
|
|
1698
|
-
var eventName = void 0;
|
|
1699
|
-
|
|
1700
|
-
if (/^mouse|click/.test(name)) {
|
|
1701
|
-
eventName = 'MouseEvents';
|
|
1702
|
-
} else if (/^key/.test(name)) {
|
|
1703
|
-
eventName = 'KeyboardEvent';
|
|
1704
|
-
} else {
|
|
1705
|
-
eventName = 'HTMLEvents';
|
|
1706
|
-
}
|
|
1707
|
-
var evt = document.createEvent(eventName);
|
|
1708
|
-
|
|
1709
|
-
for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1710
|
-
opts[_key - 2] = arguments[_key];
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
evt.initEvent.apply(evt, [name].concat(opts));
|
|
1714
|
-
elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
|
|
1715
|
-
|
|
1716
|
-
return elm;
|
|
1717
|
-
};
|
|
1718
|
-
|
|
1719
|
-
aria.Utils.keys = {
|
|
1720
|
-
tab: 9,
|
|
1721
|
-
enter: 13,
|
|
1722
|
-
space: 32,
|
|
1723
|
-
left: 37,
|
|
1724
|
-
up: 38,
|
|
1725
|
-
right: 39,
|
|
1726
|
-
down: 40,
|
|
1727
|
-
esc: 27
|
|
1728
|
-
};
|
|
202
|
+
/***/ 13:
|
|
203
|
+
/***/ (function(module, exports) {
|
|
1729
204
|
|
|
1730
|
-
|
|
205
|
+
module.exports = require("element-ui/lib/button");
|
|
1731
206
|
|
|
1732
207
|
/***/ }),
|
|
1733
208
|
|
|
1734
|
-
/***/
|
|
1735
|
-
/***/ (function(module,
|
|
1736
|
-
|
|
1737
|
-
"use strict";
|
|
1738
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
|
|
1739
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
|
|
1740
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
|
|
1741
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
|
|
1742
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
|
|
1743
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
|
|
1744
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
|
|
1745
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
|
|
1746
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
|
|
1747
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
|
|
1748
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
|
|
1749
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
|
|
1750
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
|
|
1751
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
|
|
1752
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
|
|
1753
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
|
|
1754
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
|
|
1755
|
-
/* unused harmony export looseEqual */
|
|
1756
|
-
/* unused harmony export arrayEquals */
|
|
1757
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
|
|
1758
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
|
|
1759
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
|
|
1760
|
-
/* unused harmony export objToArray */
|
|
1761
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
|
|
1762
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
1763
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
1764
|
-
/* harmony import */ var element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
1765
|
-
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; };
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1771
|
-
|
|
1772
|
-
function noop() {};
|
|
1773
|
-
|
|
1774
|
-
function hasOwn(obj, key) {
|
|
1775
|
-
return hasOwnProperty.call(obj, key);
|
|
1776
|
-
};
|
|
1777
|
-
|
|
1778
|
-
function extend(to, _from) {
|
|
1779
|
-
for (var key in _from) {
|
|
1780
|
-
to[key] = _from[key];
|
|
1781
|
-
}
|
|
1782
|
-
return to;
|
|
1783
|
-
};
|
|
1784
|
-
|
|
1785
|
-
function toObject(arr) {
|
|
1786
|
-
var res = {};
|
|
1787
|
-
for (var i = 0; i < arr.length; i++) {
|
|
1788
|
-
if (arr[i]) {
|
|
1789
|
-
extend(res, arr[i]);
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
return res;
|
|
1793
|
-
};
|
|
1794
|
-
|
|
1795
|
-
var getValueByPath = function getValueByPath(object, prop) {
|
|
1796
|
-
prop = prop || '';
|
|
1797
|
-
var paths = prop.split('.');
|
|
1798
|
-
var current = object;
|
|
1799
|
-
var result = null;
|
|
1800
|
-
for (var i = 0, j = paths.length; i < j; i++) {
|
|
1801
|
-
var path = paths[i];
|
|
1802
|
-
if (!current) break;
|
|
1803
|
-
|
|
1804
|
-
if (i === j - 1) {
|
|
1805
|
-
result = current[path];
|
|
1806
|
-
break;
|
|
1807
|
-
}
|
|
1808
|
-
current = current[path];
|
|
1809
|
-
}
|
|
1810
|
-
return result;
|
|
1811
|
-
};
|
|
1812
|
-
|
|
1813
|
-
function getPropByPath(obj, path, strict) {
|
|
1814
|
-
var tempObj = obj;
|
|
1815
|
-
path = path.replace(/\[(\w+)\]/g, '.$1');
|
|
1816
|
-
path = path.replace(/^\./, '');
|
|
1817
|
-
|
|
1818
|
-
var keyArr = path.split('.');
|
|
1819
|
-
var i = 0;
|
|
1820
|
-
for (var len = keyArr.length; i < len - 1; ++i) {
|
|
1821
|
-
if (!tempObj && !strict) break;
|
|
1822
|
-
var key = keyArr[i];
|
|
1823
|
-
if (key in tempObj) {
|
|
1824
|
-
tempObj = tempObj[key];
|
|
1825
|
-
} else {
|
|
1826
|
-
if (strict) {
|
|
1827
|
-
throw new Error('please transfer a valid prop path to form item!');
|
|
1828
|
-
}
|
|
1829
|
-
break;
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
return {
|
|
1833
|
-
o: tempObj,
|
|
1834
|
-
k: keyArr[i],
|
|
1835
|
-
v: tempObj ? tempObj[keyArr[i]] : null
|
|
1836
|
-
};
|
|
1837
|
-
};
|
|
1838
|
-
|
|
1839
|
-
var generateId = function generateId() {
|
|
1840
|
-
return Math.floor(Math.random() * 10000);
|
|
1841
|
-
};
|
|
1842
|
-
|
|
1843
|
-
var valueEquals = function valueEquals(a, b) {
|
|
1844
|
-
// see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
|
|
1845
|
-
if (a === b) return true;
|
|
1846
|
-
if (!(a instanceof Array)) return false;
|
|
1847
|
-
if (!(b instanceof Array)) return false;
|
|
1848
|
-
if (a.length !== b.length) return false;
|
|
1849
|
-
for (var i = 0; i !== a.length; ++i) {
|
|
1850
|
-
if (a[i] !== b[i]) return false;
|
|
1851
|
-
}
|
|
1852
|
-
return true;
|
|
1853
|
-
};
|
|
1854
|
-
|
|
1855
|
-
var escapeRegexpString = function escapeRegexpString() {
|
|
1856
|
-
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
1857
|
-
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
|
|
1858
|
-
};
|
|
1859
|
-
|
|
1860
|
-
// TODO: use native Array.find, Array.findIndex when IE support is dropped
|
|
1861
|
-
var arrayFindIndex = function arrayFindIndex(arr, pred) {
|
|
1862
|
-
for (var i = 0; i !== arr.length; ++i) {
|
|
1863
|
-
if (pred(arr[i])) {
|
|
1864
|
-
return i;
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
return -1;
|
|
1868
|
-
};
|
|
1869
|
-
|
|
1870
|
-
var arrayFind = function arrayFind(arr, pred) {
|
|
1871
|
-
var idx = arrayFindIndex(arr, pred);
|
|
1872
|
-
return idx !== -1 ? arr[idx] : undefined;
|
|
1873
|
-
};
|
|
1874
|
-
|
|
1875
|
-
// coerce truthy value to array
|
|
1876
|
-
var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
|
|
1877
|
-
if (Array.isArray(val)) {
|
|
1878
|
-
return val;
|
|
1879
|
-
} else if (val) {
|
|
1880
|
-
return [val];
|
|
1881
|
-
} else {
|
|
1882
|
-
return [];
|
|
1883
|
-
}
|
|
1884
|
-
};
|
|
1885
|
-
|
|
1886
|
-
var isIE = function isIE() {
|
|
1887
|
-
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
1888
|
-
};
|
|
1889
|
-
|
|
1890
|
-
var isEdge = function isEdge() {
|
|
1891
|
-
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
|
|
1892
|
-
};
|
|
1893
|
-
|
|
1894
|
-
var isFirefox = function isFirefox() {
|
|
1895
|
-
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
1896
|
-
};
|
|
1897
|
-
|
|
1898
|
-
var autoprefixer = function autoprefixer(style) {
|
|
1899
|
-
if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
|
|
1900
|
-
var rules = ['transform', 'transition', 'animation'];
|
|
1901
|
-
var prefixes = ['ms-', 'webkit-'];
|
|
1902
|
-
rules.forEach(function (rule) {
|
|
1903
|
-
var value = style[rule];
|
|
1904
|
-
if (rule && value) {
|
|
1905
|
-
prefixes.forEach(function (prefix) {
|
|
1906
|
-
style[prefix + rule] = value;
|
|
1907
|
-
});
|
|
1908
|
-
}
|
|
1909
|
-
});
|
|
1910
|
-
return style;
|
|
1911
|
-
};
|
|
1912
|
-
|
|
1913
|
-
var kebabCase = function kebabCase(str) {
|
|
1914
|
-
var hyphenateRE = /([^-])([A-Z])/g;
|
|
1915
|
-
return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
|
|
1916
|
-
};
|
|
1917
|
-
|
|
1918
|
-
var capitalize = function capitalize(str) {
|
|
1919
|
-
if (!Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
|
|
1920
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
1921
|
-
};
|
|
1922
|
-
|
|
1923
|
-
var looseEqual = function looseEqual(a, b) {
|
|
1924
|
-
var isObjectA = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
|
|
1925
|
-
var isObjectB = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
|
|
1926
|
-
if (isObjectA && isObjectB) {
|
|
1927
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
1928
|
-
} else if (!isObjectA && !isObjectB) {
|
|
1929
|
-
return String(a) === String(b);
|
|
1930
|
-
} else {
|
|
1931
|
-
return false;
|
|
1932
|
-
}
|
|
1933
|
-
};
|
|
1934
|
-
|
|
1935
|
-
var arrayEquals = function arrayEquals(arrayA, arrayB) {
|
|
1936
|
-
arrayA = arrayA || [];
|
|
1937
|
-
arrayB = arrayB || [];
|
|
1938
|
-
|
|
1939
|
-
if (arrayA.length !== arrayB.length) {
|
|
1940
|
-
return false;
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
for (var i = 0; i < arrayA.length; i++) {
|
|
1944
|
-
if (!looseEqual(arrayA[i], arrayB[i])) {
|
|
1945
|
-
return false;
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
return true;
|
|
1950
|
-
};
|
|
1951
|
-
|
|
1952
|
-
var isEqual = function isEqual(value1, value2) {
|
|
1953
|
-
if (Array.isArray(value1) && Array.isArray(value2)) {
|
|
1954
|
-
return arrayEquals(value1, value2);
|
|
1955
|
-
}
|
|
1956
|
-
return looseEqual(value1, value2);
|
|
1957
|
-
};
|
|
1958
|
-
|
|
1959
|
-
var isEmpty = function isEmpty(val) {
|
|
1960
|
-
// null or undefined
|
|
1961
|
-
if (val == null) return true;
|
|
1962
|
-
|
|
1963
|
-
if (typeof val === 'boolean') return false;
|
|
1964
|
-
|
|
1965
|
-
if (typeof val === 'number') return !val;
|
|
1966
|
-
|
|
1967
|
-
if (val instanceof Error) return val.message === '';
|
|
1968
|
-
|
|
1969
|
-
switch (Object.prototype.toString.call(val)) {
|
|
1970
|
-
// String or Array
|
|
1971
|
-
case '[object String]':
|
|
1972
|
-
case '[object Array]':
|
|
1973
|
-
return !val.length;
|
|
1974
|
-
|
|
1975
|
-
// Map or Set or File
|
|
1976
|
-
case '[object File]':
|
|
1977
|
-
case '[object Map]':
|
|
1978
|
-
case '[object Set]':
|
|
1979
|
-
{
|
|
1980
|
-
return !val.size;
|
|
1981
|
-
}
|
|
1982
|
-
// Plain Object
|
|
1983
|
-
case '[object Object]':
|
|
1984
|
-
{
|
|
1985
|
-
return !Object.keys(val).length;
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
return false;
|
|
1990
|
-
};
|
|
1991
|
-
|
|
1992
|
-
function rafThrottle(fn) {
|
|
1993
|
-
var locked = false;
|
|
1994
|
-
return function () {
|
|
1995
|
-
var _this = this;
|
|
1996
|
-
|
|
1997
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
1998
|
-
args[_key] = arguments[_key];
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
if (locked) return;
|
|
2002
|
-
locked = true;
|
|
2003
|
-
window.requestAnimationFrame(function (_) {
|
|
2004
|
-
fn.apply(_this, args);
|
|
2005
|
-
locked = false;
|
|
2006
|
-
});
|
|
2007
|
-
};
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
function objToArray(obj) {
|
|
2011
|
-
if (Array.isArray(obj)) {
|
|
2012
|
-
return obj;
|
|
2013
|
-
}
|
|
2014
|
-
return isEmpty(obj) ? [] : [obj];
|
|
2015
|
-
}
|
|
209
|
+
/***/ 14:
|
|
210
|
+
/***/ (function(module, exports) {
|
|
2016
211
|
|
|
2017
|
-
|
|
2018
|
-
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
|
|
2019
|
-
};
|
|
212
|
+
module.exports = require("element-ui/lib/utils/popup");
|
|
2020
213
|
|
|
2021
214
|
/***/ }),
|
|
2022
215
|
|
|
2023
|
-
/***/
|
|
2024
|
-
/***/ (function(module,
|
|
2025
|
-
|
|
2026
|
-
"use strict";
|
|
2027
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isVNode; });
|
|
2028
|
-
/* harmony import */ var element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
|
2029
|
-
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; };
|
|
2030
|
-
|
|
2031
|
-
|
|
216
|
+
/***/ 2:
|
|
217
|
+
/***/ (function(module, exports) {
|
|
2032
218
|
|
|
2033
|
-
|
|
2034
|
-
return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "j"])(node, 'componentOptions');
|
|
2035
|
-
};
|
|
219
|
+
module.exports = require("element-ui/lib/utils/dom");
|
|
2036
220
|
|
|
2037
221
|
/***/ }),
|
|
2038
222
|
|
|
2039
|
-
/***/
|
|
2040
|
-
/***/ (function(module,
|
|
2041
|
-
|
|
2042
|
-
"use strict";
|
|
2043
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
|
|
2044
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
|
|
2045
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
|
|
2046
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
|
|
2047
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
|
|
2048
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
|
|
2049
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
2050
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
2051
|
-
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; };
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
function isString(obj) {
|
|
2056
|
-
return Object.prototype.toString.call(obj) === '[object String]';
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
function isObject(obj) {
|
|
2060
|
-
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
2061
|
-
}
|
|
223
|
+
/***/ 20:
|
|
224
|
+
/***/ (function(module, exports) {
|
|
2062
225
|
|
|
2063
|
-
|
|
2064
|
-
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
2065
|
-
}
|
|
226
|
+
module.exports = require("element-ui/lib/locale");
|
|
2066
227
|
|
|
2067
|
-
|
|
2068
|
-
* - Inspired:
|
|
2069
|
-
* https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
|
|
2070
|
-
*/
|
|
2071
|
-
var isFunction = function isFunction(functionToCheck) {
|
|
2072
|
-
var getType = {};
|
|
2073
|
-
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
2074
|
-
};
|
|
228
|
+
/***/ }),
|
|
2075
229
|
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
return typeof obj === 'function' || false;
|
|
2079
|
-
};
|
|
2080
|
-
}
|
|
230
|
+
/***/ 23:
|
|
231
|
+
/***/ (function(module, exports) {
|
|
2081
232
|
|
|
233
|
+
module.exports = require("element-ui/lib/utils/vdom");
|
|
2082
234
|
|
|
235
|
+
/***/ }),
|
|
2083
236
|
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
};
|
|
237
|
+
/***/ 49:
|
|
238
|
+
/***/ (function(module, exports) {
|
|
2087
239
|
|
|
2088
|
-
|
|
2089
|
-
return val !== undefined && val !== null;
|
|
2090
|
-
};
|
|
240
|
+
module.exports = require("element-ui/lib/utils/aria-dialog");
|
|
2091
241
|
|
|
2092
242
|
/***/ }),
|
|
2093
243
|
|
|
2094
244
|
/***/ 6:
|
|
2095
|
-
/***/ (function(module,
|
|
2096
|
-
|
|
2097
|
-
"use strict";
|
|
2098
|
-
function _broadcast(componentName, eventName, params) {
|
|
2099
|
-
this.$children.forEach(function (child) {
|
|
2100
|
-
var name = child.$options.componentName;
|
|
2101
|
-
|
|
2102
|
-
if (name === componentName) {
|
|
2103
|
-
child.$emit.apply(child, [eventName].concat(params));
|
|
2104
|
-
} else {
|
|
2105
|
-
_broadcast.apply(child, [componentName, eventName].concat([params]));
|
|
2106
|
-
}
|
|
2107
|
-
});
|
|
2108
|
-
}
|
|
2109
|
-
/* harmony default export */ __webpack_exports__["a"] = ({
|
|
2110
|
-
methods: {
|
|
2111
|
-
dispatch: function dispatch(componentName, eventName, params) {
|
|
2112
|
-
var parent = this.$parent || this.$root;
|
|
2113
|
-
var name = parent.$options.componentName;
|
|
2114
|
-
|
|
2115
|
-
while (parent && (!name || name !== componentName)) {
|
|
2116
|
-
parent = parent.$parent;
|
|
245
|
+
/***/ (function(module, exports) {
|
|
2117
246
|
|
|
2118
|
-
|
|
2119
|
-
name = parent.$options.componentName;
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
if (parent) {
|
|
2123
|
-
parent.$emit.apply(parent, [eventName].concat(params));
|
|
2124
|
-
}
|
|
2125
|
-
},
|
|
2126
|
-
broadcast: function broadcast(componentName, eventName, params) {
|
|
2127
|
-
_broadcast.call(this, componentName, eventName, params);
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
|
-
});
|
|
247
|
+
module.exports = require("element-ui/lib/mixins/locale");
|
|
2131
248
|
|
|
2132
249
|
/***/ }),
|
|
2133
250
|
|
|
2134
|
-
/***/ 7:
|
|
2135
|
-
/***/ (function(module,
|
|
2136
|
-
|
|
2137
|
-
"use strict";
|
|
2138
|
-
/* harmony default export */ __webpack_exports__["a"] = (function (target) {
|
|
2139
|
-
for (var i = 1, j = arguments.length; i < j; i++) {
|
|
2140
|
-
var source = arguments[i] || {};
|
|
2141
|
-
for (var prop in source) {
|
|
2142
|
-
if (source.hasOwnProperty(prop)) {
|
|
2143
|
-
var value = source[prop];
|
|
2144
|
-
if (value !== undefined) {
|
|
2145
|
-
target[prop] = value;
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
}
|
|
251
|
+
/***/ 7:
|
|
252
|
+
/***/ (function(module, exports) {
|
|
2150
253
|
|
|
2151
|
-
|
|
2152
|
-
});;
|
|
254
|
+
module.exports = require("vue");
|
|
2153
255
|
|
|
2154
256
|
/***/ }),
|
|
2155
257
|
|
|
2156
|
-
/***/
|
|
258
|
+
/***/ 83:
|
|
2157
259
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2158
260
|
|
|
2159
261
|
"use strict";
|
|
@@ -2161,7 +263,7 @@ function _broadcast(componentName, eventName, params) {
|
|
|
2161
263
|
__webpack_require__.r(__webpack_exports__);
|
|
2162
264
|
|
|
2163
265
|
// EXTERNAL MODULE: external "vue"
|
|
2164
|
-
var external_vue_ = __webpack_require__(
|
|
266
|
+
var external_vue_ = __webpack_require__(7);
|
|
2165
267
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
2166
268
|
|
|
2167
269
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/main.vue?vue&type=template&id=cb66f6ce
|
|
@@ -2453,124 +555,32 @@ render._withStripped = true
|
|
|
2453
555
|
|
|
2454
556
|
// CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=template&id=cb66f6ce
|
|
2455
557
|
|
|
2456
|
-
// EXTERNAL MODULE:
|
|
2457
|
-
var
|
|
2458
|
-
|
|
2459
|
-
// EXTERNAL MODULE: ./src/mixins/locale.js
|
|
2460
|
-
var locale = __webpack_require__(13);
|
|
2461
|
-
|
|
2462
|
-
// EXTERNAL MODULE: ./packages/input/index.js + 6 modules
|
|
2463
|
-
var input = __webpack_require__(18);
|
|
2464
|
-
|
|
2465
|
-
// EXTERNAL MODULE: ./packages/button/index.js + 5 modules
|
|
2466
|
-
var packages_button = __webpack_require__(27);
|
|
2467
|
-
|
|
2468
|
-
// EXTERNAL MODULE: ./src/utils/dom.js
|
|
2469
|
-
var dom = __webpack_require__(1);
|
|
2470
|
-
|
|
2471
|
-
// EXTERNAL MODULE: ./src/locale/index.js + 2 modules
|
|
2472
|
-
var src_locale = __webpack_require__(11);
|
|
2473
|
-
|
|
2474
|
-
// EXTERNAL MODULE: ./src/utils/aria-utils.js
|
|
2475
|
-
var aria_utils = __webpack_require__(28);
|
|
2476
|
-
|
|
2477
|
-
// CONCATENATED MODULE: ./src/utils/aria-dialog.js
|
|
2478
|
-
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; };
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
/**
|
|
2483
|
-
* @constructor
|
|
2484
|
-
* @desc Dialog object providing modal focus management.
|
|
2485
|
-
*
|
|
2486
|
-
* Assumptions: The element serving as the dialog container is present in the
|
|
2487
|
-
* DOM and hidden. The dialog container has role='dialog'.
|
|
2488
|
-
*
|
|
2489
|
-
* @param dialogId
|
|
2490
|
-
* The ID of the element serving as the dialog container.
|
|
2491
|
-
* @param focusAfterClosed
|
|
2492
|
-
* Either the DOM node or the ID of the DOM node to focus when the
|
|
2493
|
-
* dialog closes.
|
|
2494
|
-
* @param focusFirst
|
|
2495
|
-
* Optional parameter containing either the DOM node or the ID of the
|
|
2496
|
-
* DOM node to focus when the dialog opens. If not specified, the
|
|
2497
|
-
* first focusable element in the dialog will receive focus.
|
|
2498
|
-
*/
|
|
2499
|
-
var aria = aria || {};
|
|
2500
|
-
var tabEvent;
|
|
2501
|
-
|
|
2502
|
-
aria.Dialog = function (dialog, focusAfterClosed, focusFirst) {
|
|
2503
|
-
var _this = this;
|
|
2504
|
-
|
|
2505
|
-
this.dialogNode = dialog;
|
|
2506
|
-
if (this.dialogNode === null || this.dialogNode.getAttribute('role') !== 'dialog') {
|
|
2507
|
-
throw new Error('Dialog() requires a DOM element with ARIA role of dialog.');
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
if (typeof focusAfterClosed === 'string') {
|
|
2511
|
-
this.focusAfterClosed = document.getElementById(focusAfterClosed);
|
|
2512
|
-
} else if ((typeof focusAfterClosed === 'undefined' ? 'undefined' : _typeof(focusAfterClosed)) === 'object') {
|
|
2513
|
-
this.focusAfterClosed = focusAfterClosed;
|
|
2514
|
-
} else {
|
|
2515
|
-
this.focusAfterClosed = null;
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
|
-
if (typeof focusFirst === 'string') {
|
|
2519
|
-
this.focusFirst = document.getElementById(focusFirst);
|
|
2520
|
-
} else if ((typeof focusFirst === 'undefined' ? 'undefined' : _typeof(focusFirst)) === 'object') {
|
|
2521
|
-
this.focusFirst = focusFirst;
|
|
2522
|
-
} else {
|
|
2523
|
-
this.focusFirst = null;
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
if (this.focusFirst) {
|
|
2527
|
-
this.focusFirst.focus();
|
|
2528
|
-
} else {
|
|
2529
|
-
aria_utils["a" /* default */].focusFirstDescendant(this.dialogNode);
|
|
2530
|
-
}
|
|
558
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/popup"
|
|
559
|
+
var popup_ = __webpack_require__(14);
|
|
560
|
+
var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
|
|
2531
561
|
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
};
|
|
2536
|
-
this.addListeners();
|
|
2537
|
-
};
|
|
562
|
+
// EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
|
|
563
|
+
var locale_ = __webpack_require__(6);
|
|
564
|
+
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
|
|
2538
565
|
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
566
|
+
// EXTERNAL MODULE: external "element-ui/lib/input"
|
|
567
|
+
var input_ = __webpack_require__(10);
|
|
568
|
+
var input_default = /*#__PURE__*/__webpack_require__.n(input_);
|
|
2542
569
|
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
570
|
+
// EXTERNAL MODULE: external "element-ui/lib/button"
|
|
571
|
+
var button_ = __webpack_require__(13);
|
|
572
|
+
var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
2546
573
|
|
|
2547
|
-
|
|
2548
|
-
|
|
574
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/dom"
|
|
575
|
+
var dom_ = __webpack_require__(2);
|
|
2549
576
|
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
setTimeout(function () {
|
|
2553
|
-
_this2.focusAfterClosed.focus();
|
|
2554
|
-
});
|
|
2555
|
-
}
|
|
2556
|
-
};
|
|
577
|
+
// EXTERNAL MODULE: external "element-ui/lib/locale"
|
|
578
|
+
var lib_locale_ = __webpack_require__(20);
|
|
2557
579
|
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
}
|
|
2562
|
-
if (this.dialogNode.contains(event.target)) {
|
|
2563
|
-
this.lastFocus = event.target;
|
|
2564
|
-
} else {
|
|
2565
|
-
aria_utils["a" /* default */].focusFirstDescendant(this.dialogNode);
|
|
2566
|
-
if (this.lastFocus === document.activeElement) {
|
|
2567
|
-
aria_utils["a" /* default */].focusLastDescendant(this.dialogNode);
|
|
2568
|
-
}
|
|
2569
|
-
this.lastFocus = document.activeElement;
|
|
2570
|
-
}
|
|
2571
|
-
};
|
|
580
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/aria-dialog"
|
|
581
|
+
var aria_dialog_ = __webpack_require__(49);
|
|
582
|
+
var aria_dialog_default = /*#__PURE__*/__webpack_require__.n(aria_dialog_);
|
|
2572
583
|
|
|
2573
|
-
/* harmony default export */ var aria_dialog = (aria.Dialog);
|
|
2574
584
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/main.vue?vue&type=script&lang=js
|
|
2575
585
|
|
|
2576
586
|
|
|
@@ -2590,7 +600,7 @@ var typeMap = {
|
|
|
2590
600
|
};
|
|
2591
601
|
|
|
2592
602
|
/* harmony default export */ var mainvue_type_script_lang_js = ({
|
|
2593
|
-
mixins: [
|
|
603
|
+
mixins: [popup_default.a, locale_default.a],
|
|
2594
604
|
|
|
2595
605
|
props: {
|
|
2596
606
|
modal: {
|
|
@@ -2623,8 +633,8 @@ var typeMap = {
|
|
|
2623
633
|
},
|
|
2624
634
|
|
|
2625
635
|
components: {
|
|
2626
|
-
ElInput:
|
|
2627
|
-
ElButton:
|
|
636
|
+
ElInput: input_default.a,
|
|
637
|
+
ElButton: button_default.a
|
|
2628
638
|
},
|
|
2629
639
|
|
|
2630
640
|
computed: {
|
|
@@ -2697,27 +707,27 @@ var typeMap = {
|
|
|
2697
707
|
if (this.$type === 'prompt') {
|
|
2698
708
|
var inputPattern = this.inputPattern;
|
|
2699
709
|
if (inputPattern && !inputPattern.test(this.inputValue || '')) {
|
|
2700
|
-
this.editorErrorMessage = this.inputErrorMessage || Object(
|
|
2701
|
-
Object(
|
|
710
|
+
this.editorErrorMessage = this.inputErrorMessage || Object(lib_locale_["t"])('el.messagebox.error');
|
|
711
|
+
Object(dom_["addClass"])(this.getInputElement(), 'invalid');
|
|
2702
712
|
return false;
|
|
2703
713
|
}
|
|
2704
714
|
var inputValidator = this.inputValidator;
|
|
2705
715
|
if (typeof inputValidator === 'function') {
|
|
2706
716
|
var validateResult = inputValidator(this.inputValue);
|
|
2707
717
|
if (validateResult === false) {
|
|
2708
|
-
this.editorErrorMessage = this.inputErrorMessage || Object(
|
|
2709
|
-
Object(
|
|
718
|
+
this.editorErrorMessage = this.inputErrorMessage || Object(lib_locale_["t"])('el.messagebox.error');
|
|
719
|
+
Object(dom_["addClass"])(this.getInputElement(), 'invalid');
|
|
2710
720
|
return false;
|
|
2711
721
|
}
|
|
2712
722
|
if (typeof validateResult === 'string') {
|
|
2713
723
|
this.editorErrorMessage = validateResult;
|
|
2714
|
-
Object(
|
|
724
|
+
Object(dom_["addClass"])(this.getInputElement(), 'invalid');
|
|
2715
725
|
return false;
|
|
2716
726
|
}
|
|
2717
727
|
}
|
|
2718
728
|
}
|
|
2719
729
|
this.editorErrorMessage = '';
|
|
2720
|
-
Object(
|
|
730
|
+
Object(dom_["removeClass"])(this.getInputElement(), 'invalid');
|
|
2721
731
|
return true;
|
|
2722
732
|
},
|
|
2723
733
|
getFirstFocus: function getFirstFocus() {
|
|
@@ -2759,7 +769,7 @@ var typeMap = {
|
|
|
2759
769
|
});
|
|
2760
770
|
}
|
|
2761
771
|
this.focusAfterClosed = document.activeElement;
|
|
2762
|
-
messageBox = new
|
|
772
|
+
messageBox = new aria_dialog_default.a(this.$el, this.focusAfterClosed, this.getFirstFocus());
|
|
2763
773
|
}
|
|
2764
774
|
|
|
2765
775
|
// prompt
|
|
@@ -2772,7 +782,7 @@ var typeMap = {
|
|
|
2772
782
|
}, 500);
|
|
2773
783
|
} else {
|
|
2774
784
|
this.editorErrorMessage = '';
|
|
2775
|
-
Object(
|
|
785
|
+
Object(dom_["removeClass"])(this.getInputElement(), 'invalid');
|
|
2776
786
|
}
|
|
2777
787
|
}
|
|
2778
788
|
},
|
|
@@ -2831,7 +841,7 @@ var typeMap = {
|
|
|
2831
841
|
// CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=script&lang=js
|
|
2832
842
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
2833
843
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
2834
|
-
var componentNormalizer = __webpack_require__(
|
|
844
|
+
var componentNormalizer = __webpack_require__(0);
|
|
2835
845
|
|
|
2836
846
|
// CONCATENATED MODULE: ./packages/message-box/src/main.vue
|
|
2837
847
|
|
|
@@ -2853,14 +863,15 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
2853
863
|
)
|
|
2854
864
|
|
|
2855
865
|
/* harmony default export */ var main = (component.exports);
|
|
2856
|
-
// EXTERNAL MODULE:
|
|
2857
|
-
var
|
|
866
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/merge"
|
|
867
|
+
var merge_ = __webpack_require__(9);
|
|
868
|
+
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
2858
869
|
|
|
2859
|
-
// EXTERNAL MODULE:
|
|
2860
|
-
var
|
|
870
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/vdom"
|
|
871
|
+
var vdom_ = __webpack_require__(23);
|
|
2861
872
|
|
|
2862
873
|
// CONCATENATED MODULE: ./packages/message-box/src/main.js
|
|
2863
|
-
var
|
|
874
|
+
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; };
|
|
2864
875
|
|
|
2865
876
|
var defaults = {
|
|
2866
877
|
title: null,
|
|
@@ -2965,7 +976,7 @@ var main_showNextMsg = function showNextMsg() {
|
|
|
2965
976
|
oldCb(action, instance);
|
|
2966
977
|
showNextMsg();
|
|
2967
978
|
};
|
|
2968
|
-
if (Object(
|
|
979
|
+
if (Object(vdom_["isVNode"])(instance.message)) {
|
|
2969
980
|
instance.$slots.default = [instance.message];
|
|
2970
981
|
instance.message = null;
|
|
2971
982
|
} else {
|
|
@@ -2987,7 +998,7 @@ var main_showNextMsg = function showNextMsg() {
|
|
|
2987
998
|
|
|
2988
999
|
var main_MessageBox = function MessageBox(options, callback) {
|
|
2989
1000
|
if (external_vue_default.a.prototype.$isServer) return;
|
|
2990
|
-
if (typeof options === 'string' || Object(
|
|
1001
|
+
if (typeof options === 'string' || Object(vdom_["isVNode"])(options)) {
|
|
2991
1002
|
options = {
|
|
2992
1003
|
message: options
|
|
2993
1004
|
};
|
|
@@ -3002,7 +1013,7 @@ var main_MessageBox = function MessageBox(options, callback) {
|
|
|
3002
1013
|
return new Promise(function (resolve, reject) {
|
|
3003
1014
|
// eslint-disable-line
|
|
3004
1015
|
msgQueue.push({
|
|
3005
|
-
options:
|
|
1016
|
+
options: merge_default()({}, defaults, MessageBox.defaults, options),
|
|
3006
1017
|
callback: callback,
|
|
3007
1018
|
resolve: resolve,
|
|
3008
1019
|
reject: reject
|
|
@@ -3012,7 +1023,7 @@ var main_MessageBox = function MessageBox(options, callback) {
|
|
|
3012
1023
|
});
|
|
3013
1024
|
} else {
|
|
3014
1025
|
msgQueue.push({
|
|
3015
|
-
options:
|
|
1026
|
+
options: merge_default()({}, defaults, MessageBox.defaults, options),
|
|
3016
1027
|
callback: callback
|
|
3017
1028
|
});
|
|
3018
1029
|
|
|
@@ -3025,13 +1036,13 @@ main_MessageBox.setDefaults = function (defaults) {
|
|
|
3025
1036
|
};
|
|
3026
1037
|
|
|
3027
1038
|
main_MessageBox.alert = function (message, title, options) {
|
|
3028
|
-
if ((typeof title === 'undefined' ? 'undefined' :
|
|
1039
|
+
if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
|
|
3029
1040
|
options = title;
|
|
3030
1041
|
title = '';
|
|
3031
1042
|
} else if (title === undefined) {
|
|
3032
1043
|
title = '';
|
|
3033
1044
|
}
|
|
3034
|
-
return main_MessageBox(
|
|
1045
|
+
return main_MessageBox(merge_default()({
|
|
3035
1046
|
title: title,
|
|
3036
1047
|
message: message,
|
|
3037
1048
|
$type: 'alert',
|
|
@@ -3041,13 +1052,13 @@ main_MessageBox.alert = function (message, title, options) {
|
|
|
3041
1052
|
};
|
|
3042
1053
|
|
|
3043
1054
|
main_MessageBox.confirm = function (message, title, options) {
|
|
3044
|
-
if ((typeof title === 'undefined' ? 'undefined' :
|
|
1055
|
+
if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
|
|
3045
1056
|
options = title;
|
|
3046
1057
|
title = '';
|
|
3047
1058
|
} else if (title === undefined) {
|
|
3048
1059
|
title = '';
|
|
3049
1060
|
}
|
|
3050
|
-
return main_MessageBox(
|
|
1061
|
+
return main_MessageBox(merge_default()({
|
|
3051
1062
|
title: title,
|
|
3052
1063
|
message: message,
|
|
3053
1064
|
$type: 'confirm',
|
|
@@ -3056,13 +1067,13 @@ main_MessageBox.confirm = function (message, title, options) {
|
|
|
3056
1067
|
};
|
|
3057
1068
|
|
|
3058
1069
|
main_MessageBox.prompt = function (message, title, options) {
|
|
3059
|
-
if ((typeof title === 'undefined' ? 'undefined' :
|
|
1070
|
+
if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
|
|
3060
1071
|
options = title;
|
|
3061
1072
|
title = '';
|
|
3062
1073
|
} else if (title === undefined) {
|
|
3063
1074
|
title = '';
|
|
3064
1075
|
}
|
|
3065
|
-
return main_MessageBox(
|
|
1076
|
+
return main_MessageBox(merge_default()({
|
|
3066
1077
|
title: title,
|
|
3067
1078
|
message: message,
|
|
3068
1079
|
showCancelButton: true,
|
|
@@ -3086,478 +1097,10 @@ main_MessageBox.close = function () {
|
|
|
3086
1097
|
|
|
3087
1098
|
/***/ }),
|
|
3088
1099
|
|
|
3089
|
-
/***/ 8:
|
|
3090
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3091
|
-
|
|
3092
|
-
"use strict";
|
|
3093
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
3094
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
var scrollBarWidth = void 0;
|
|
3098
|
-
|
|
3099
|
-
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
|
3100
|
-
if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
|
|
3101
|
-
if (scrollBarWidth !== undefined) return scrollBarWidth;
|
|
3102
|
-
|
|
3103
|
-
var outer = document.createElement('div');
|
|
3104
|
-
outer.className = 'el-scrollbar__wrap';
|
|
3105
|
-
outer.style.visibility = 'hidden';
|
|
3106
|
-
outer.style.width = '100px';
|
|
3107
|
-
outer.style.position = 'absolute';
|
|
3108
|
-
outer.style.top = '-9999px';
|
|
3109
|
-
document.body.appendChild(outer);
|
|
3110
|
-
|
|
3111
|
-
var widthNoScroll = outer.offsetWidth;
|
|
3112
|
-
outer.style.overflow = 'scroll';
|
|
3113
|
-
|
|
3114
|
-
var inner = document.createElement('div');
|
|
3115
|
-
inner.style.width = '100%';
|
|
3116
|
-
outer.appendChild(inner);
|
|
3117
|
-
|
|
3118
|
-
var widthWithScroll = inner.offsetWidth;
|
|
3119
|
-
outer.parentNode.removeChild(outer);
|
|
3120
|
-
scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
3121
|
-
|
|
3122
|
-
return scrollBarWidth;
|
|
3123
|
-
});;
|
|
3124
|
-
|
|
3125
|
-
/***/ }),
|
|
3126
|
-
|
|
3127
1100
|
/***/ 9:
|
|
3128
|
-
/***/ (function(module,
|
|
3129
|
-
|
|
3130
|
-
"use strict";
|
|
3131
|
-
|
|
3132
|
-
// EXPORTS
|
|
3133
|
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
|
|
3134
|
-
|
|
3135
|
-
// EXTERNAL MODULE: external "vue"
|
|
3136
|
-
var external_vue_ = __webpack_require__(0);
|
|
3137
|
-
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
3138
|
-
|
|
3139
|
-
// EXTERNAL MODULE: ./src/utils/merge.js
|
|
3140
|
-
var merge = __webpack_require__(7);
|
|
3141
|
-
|
|
3142
|
-
// EXTERNAL MODULE: ./src/utils/dom.js
|
|
3143
|
-
var utils_dom = __webpack_require__(1);
|
|
3144
|
-
|
|
3145
|
-
// CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
var hasModal = false;
|
|
3150
|
-
var hasInitZIndex = false;
|
|
3151
|
-
var popup_manager_zIndex = void 0;
|
|
3152
|
-
|
|
3153
|
-
var popup_manager_getModal = function getModal() {
|
|
3154
|
-
if (external_vue_default.a.prototype.$isServer) return;
|
|
3155
|
-
var modalDom = PopupManager.modalDom;
|
|
3156
|
-
if (modalDom) {
|
|
3157
|
-
hasModal = true;
|
|
3158
|
-
} else {
|
|
3159
|
-
hasModal = false;
|
|
3160
|
-
modalDom = document.createElement('div');
|
|
3161
|
-
PopupManager.modalDom = modalDom;
|
|
3162
|
-
|
|
3163
|
-
modalDom.addEventListener('touchmove', function (event) {
|
|
3164
|
-
event.preventDefault();
|
|
3165
|
-
event.stopPropagation();
|
|
3166
|
-
});
|
|
3167
|
-
|
|
3168
|
-
modalDom.addEventListener('click', function () {
|
|
3169
|
-
PopupManager.doOnModalClick && PopupManager.doOnModalClick();
|
|
3170
|
-
});
|
|
3171
|
-
}
|
|
3172
|
-
|
|
3173
|
-
return modalDom;
|
|
3174
|
-
};
|
|
3175
|
-
|
|
3176
|
-
var instances = {};
|
|
3177
|
-
|
|
3178
|
-
var PopupManager = {
|
|
3179
|
-
modalFade: true,
|
|
3180
|
-
|
|
3181
|
-
getInstance: function getInstance(id) {
|
|
3182
|
-
return instances[id];
|
|
3183
|
-
},
|
|
3184
|
-
|
|
3185
|
-
register: function register(id, instance) {
|
|
3186
|
-
if (id && instance) {
|
|
3187
|
-
instances[id] = instance;
|
|
3188
|
-
}
|
|
3189
|
-
},
|
|
3190
|
-
|
|
3191
|
-
deregister: function deregister(id) {
|
|
3192
|
-
if (id) {
|
|
3193
|
-
instances[id] = null;
|
|
3194
|
-
delete instances[id];
|
|
3195
|
-
}
|
|
3196
|
-
},
|
|
3197
|
-
|
|
3198
|
-
nextZIndex: function nextZIndex() {
|
|
3199
|
-
return PopupManager.zIndex++;
|
|
3200
|
-
},
|
|
3201
|
-
|
|
3202
|
-
modalStack: [],
|
|
3203
|
-
|
|
3204
|
-
doOnModalClick: function doOnModalClick() {
|
|
3205
|
-
var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
3206
|
-
if (!topItem) return;
|
|
3207
|
-
|
|
3208
|
-
var instance = PopupManager.getInstance(topItem.id);
|
|
3209
|
-
if (instance && instance.closeOnClickModal) {
|
|
3210
|
-
instance.close();
|
|
3211
|
-
}
|
|
3212
|
-
},
|
|
3213
|
-
|
|
3214
|
-
openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
|
|
3215
|
-
if (external_vue_default.a.prototype.$isServer) return;
|
|
3216
|
-
if (!id || zIndex === undefined) return;
|
|
3217
|
-
this.modalFade = modalFade;
|
|
3218
|
-
|
|
3219
|
-
var modalStack = this.modalStack;
|
|
3220
|
-
|
|
3221
|
-
for (var i = 0, j = modalStack.length; i < j; i++) {
|
|
3222
|
-
var item = modalStack[i];
|
|
3223
|
-
if (item.id === id) {
|
|
3224
|
-
return;
|
|
3225
|
-
}
|
|
3226
|
-
}
|
|
3227
|
-
|
|
3228
|
-
var modalDom = popup_manager_getModal();
|
|
3229
|
-
|
|
3230
|
-
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
|
|
3231
|
-
if (this.modalFade && !hasModal) {
|
|
3232
|
-
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
|
|
3233
|
-
}
|
|
3234
|
-
if (modalClass) {
|
|
3235
|
-
var classArr = modalClass.trim().split(/\s+/);
|
|
3236
|
-
classArr.forEach(function (item) {
|
|
3237
|
-
return Object(utils_dom["a" /* addClass */])(modalDom, item);
|
|
3238
|
-
});
|
|
3239
|
-
}
|
|
3240
|
-
setTimeout(function () {
|
|
3241
|
-
Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
|
|
3242
|
-
}, 200);
|
|
3243
|
-
|
|
3244
|
-
if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
|
|
3245
|
-
dom.parentNode.appendChild(modalDom);
|
|
3246
|
-
} else {
|
|
3247
|
-
document.body.appendChild(modalDom);
|
|
3248
|
-
}
|
|
3249
|
-
|
|
3250
|
-
if (zIndex) {
|
|
3251
|
-
modalDom.style.zIndex = zIndex;
|
|
3252
|
-
}
|
|
3253
|
-
modalDom.tabIndex = 0;
|
|
3254
|
-
modalDom.style.display = '';
|
|
3255
|
-
|
|
3256
|
-
this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
|
|
3257
|
-
},
|
|
3258
|
-
|
|
3259
|
-
closeModal: function closeModal(id) {
|
|
3260
|
-
var modalStack = this.modalStack;
|
|
3261
|
-
var modalDom = popup_manager_getModal();
|
|
3262
|
-
|
|
3263
|
-
if (modalStack.length > 0) {
|
|
3264
|
-
var topItem = modalStack[modalStack.length - 1];
|
|
3265
|
-
if (topItem.id === id) {
|
|
3266
|
-
if (topItem.modalClass) {
|
|
3267
|
-
var classArr = topItem.modalClass.trim().split(/\s+/);
|
|
3268
|
-
classArr.forEach(function (item) {
|
|
3269
|
-
return Object(utils_dom["i" /* removeClass */])(modalDom, item);
|
|
3270
|
-
});
|
|
3271
|
-
}
|
|
3272
|
-
|
|
3273
|
-
modalStack.pop();
|
|
3274
|
-
if (modalStack.length > 0) {
|
|
3275
|
-
modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
|
|
3276
|
-
}
|
|
3277
|
-
} else {
|
|
3278
|
-
for (var i = modalStack.length - 1; i >= 0; i--) {
|
|
3279
|
-
if (modalStack[i].id === id) {
|
|
3280
|
-
modalStack.splice(i, 1);
|
|
3281
|
-
break;
|
|
3282
|
-
}
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
|
-
}
|
|
3286
|
-
|
|
3287
|
-
if (modalStack.length === 0) {
|
|
3288
|
-
if (this.modalFade) {
|
|
3289
|
-
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
|
|
3290
|
-
}
|
|
3291
|
-
setTimeout(function () {
|
|
3292
|
-
if (modalStack.length === 0) {
|
|
3293
|
-
if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
|
|
3294
|
-
modalDom.style.display = 'none';
|
|
3295
|
-
PopupManager.modalDom = undefined;
|
|
3296
|
-
}
|
|
3297
|
-
Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
|
|
3298
|
-
}, 200);
|
|
3299
|
-
}
|
|
3300
|
-
}
|
|
3301
|
-
};
|
|
3302
|
-
|
|
3303
|
-
Object.defineProperty(PopupManager, 'zIndex', {
|
|
3304
|
-
configurable: true,
|
|
3305
|
-
get: function get() {
|
|
3306
|
-
if (!hasInitZIndex) {
|
|
3307
|
-
popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
|
|
3308
|
-
hasInitZIndex = true;
|
|
3309
|
-
}
|
|
3310
|
-
return popup_manager_zIndex;
|
|
3311
|
-
},
|
|
3312
|
-
set: function set(value) {
|
|
3313
|
-
popup_manager_zIndex = value;
|
|
3314
|
-
}
|
|
3315
|
-
});
|
|
3316
|
-
|
|
3317
|
-
var popup_manager_getTopPopup = function getTopPopup() {
|
|
3318
|
-
if (external_vue_default.a.prototype.$isServer) return;
|
|
3319
|
-
if (PopupManager.modalStack.length > 0) {
|
|
3320
|
-
var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
3321
|
-
if (!topPopup) return;
|
|
3322
|
-
var instance = PopupManager.getInstance(topPopup.id);
|
|
3323
|
-
|
|
3324
|
-
return instance;
|
|
3325
|
-
}
|
|
3326
|
-
};
|
|
3327
|
-
|
|
3328
|
-
if (!external_vue_default.a.prototype.$isServer) {
|
|
3329
|
-
// handle `esc` key when the popup is shown
|
|
3330
|
-
window.addEventListener('keydown', function (event) {
|
|
3331
|
-
if (event.keyCode === 27) {
|
|
3332
|
-
var topPopup = popup_manager_getTopPopup();
|
|
3333
|
-
|
|
3334
|
-
if (topPopup && topPopup.closeOnPressEscape) {
|
|
3335
|
-
topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
|
|
3336
|
-
}
|
|
3337
|
-
}
|
|
3338
|
-
});
|
|
3339
|
-
}
|
|
3340
|
-
|
|
3341
|
-
/* harmony default export */ var popup_manager = (PopupManager);
|
|
3342
|
-
// EXTERNAL MODULE: ./src/utils/scrollbar-width.js
|
|
3343
|
-
var scrollbar_width = __webpack_require__(8);
|
|
3344
|
-
|
|
3345
|
-
// CONCATENATED MODULE: ./src/utils/popup/index.js
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
var idSeed = 1;
|
|
3353
|
-
|
|
3354
|
-
var scrollBarWidth = void 0;
|
|
3355
|
-
|
|
3356
|
-
/* harmony default export */ var popup = __webpack_exports__["b"] = ({
|
|
3357
|
-
props: {
|
|
3358
|
-
visible: {
|
|
3359
|
-
type: Boolean,
|
|
3360
|
-
default: false
|
|
3361
|
-
},
|
|
3362
|
-
openDelay: {},
|
|
3363
|
-
closeDelay: {},
|
|
3364
|
-
zIndex: {},
|
|
3365
|
-
modal: {
|
|
3366
|
-
type: Boolean,
|
|
3367
|
-
default: false
|
|
3368
|
-
},
|
|
3369
|
-
modalFade: {
|
|
3370
|
-
type: Boolean,
|
|
3371
|
-
default: true
|
|
3372
|
-
},
|
|
3373
|
-
modalClass: {},
|
|
3374
|
-
modalAppendToBody: {
|
|
3375
|
-
type: Boolean,
|
|
3376
|
-
default: false
|
|
3377
|
-
},
|
|
3378
|
-
lockScroll: {
|
|
3379
|
-
type: Boolean,
|
|
3380
|
-
default: true
|
|
3381
|
-
},
|
|
3382
|
-
closeOnPressEscape: {
|
|
3383
|
-
type: Boolean,
|
|
3384
|
-
default: false
|
|
3385
|
-
},
|
|
3386
|
-
closeOnClickModal: {
|
|
3387
|
-
type: Boolean,
|
|
3388
|
-
default: false
|
|
3389
|
-
}
|
|
3390
|
-
},
|
|
3391
|
-
|
|
3392
|
-
beforeMount: function beforeMount() {
|
|
3393
|
-
this._popupId = 'popup-' + idSeed++;
|
|
3394
|
-
popup_manager.register(this._popupId, this);
|
|
3395
|
-
},
|
|
3396
|
-
beforeDestroy: function beforeDestroy() {
|
|
3397
|
-
popup_manager.deregister(this._popupId);
|
|
3398
|
-
popup_manager.closeModal(this._popupId);
|
|
3399
|
-
|
|
3400
|
-
this.restoreBodyStyle();
|
|
3401
|
-
},
|
|
3402
|
-
data: function data() {
|
|
3403
|
-
return {
|
|
3404
|
-
opened: false,
|
|
3405
|
-
bodyPaddingRight: null,
|
|
3406
|
-
computedBodyPaddingRight: 0,
|
|
3407
|
-
withoutHiddenClass: true,
|
|
3408
|
-
rendered: false
|
|
3409
|
-
};
|
|
3410
|
-
},
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
watch: {
|
|
3414
|
-
visible: function visible(val) {
|
|
3415
|
-
var _this = this;
|
|
3416
|
-
|
|
3417
|
-
if (val) {
|
|
3418
|
-
if (this._opening) return;
|
|
3419
|
-
if (!this.rendered) {
|
|
3420
|
-
this.rendered = true;
|
|
3421
|
-
external_vue_default.a.nextTick(function () {
|
|
3422
|
-
_this.open();
|
|
3423
|
-
});
|
|
3424
|
-
} else {
|
|
3425
|
-
this.open();
|
|
3426
|
-
}
|
|
3427
|
-
} else {
|
|
3428
|
-
this.close();
|
|
3429
|
-
}
|
|
3430
|
-
}
|
|
3431
|
-
},
|
|
3432
|
-
|
|
3433
|
-
methods: {
|
|
3434
|
-
open: function open(options) {
|
|
3435
|
-
var _this2 = this;
|
|
3436
|
-
|
|
3437
|
-
if (!this.rendered) {
|
|
3438
|
-
this.rendered = true;
|
|
3439
|
-
}
|
|
3440
|
-
|
|
3441
|
-
var props = Object(merge["a" /* default */])({}, this.$props || this, options);
|
|
3442
|
-
|
|
3443
|
-
if (this._closeTimer) {
|
|
3444
|
-
clearTimeout(this._closeTimer);
|
|
3445
|
-
this._closeTimer = null;
|
|
3446
|
-
}
|
|
3447
|
-
clearTimeout(this._openTimer);
|
|
3448
|
-
|
|
3449
|
-
var openDelay = Number(props.openDelay);
|
|
3450
|
-
if (openDelay > 0) {
|
|
3451
|
-
this._openTimer = setTimeout(function () {
|
|
3452
|
-
_this2._openTimer = null;
|
|
3453
|
-
_this2.doOpen(props);
|
|
3454
|
-
}, openDelay);
|
|
3455
|
-
} else {
|
|
3456
|
-
this.doOpen(props);
|
|
3457
|
-
}
|
|
3458
|
-
},
|
|
3459
|
-
doOpen: function doOpen(props) {
|
|
3460
|
-
if (this.$isServer) return;
|
|
3461
|
-
if (this.willOpen && !this.willOpen()) return;
|
|
3462
|
-
if (this.opened) return;
|
|
3463
|
-
|
|
3464
|
-
this._opening = true;
|
|
3465
|
-
|
|
3466
|
-
var dom = this.$el;
|
|
3467
|
-
|
|
3468
|
-
var modal = props.modal;
|
|
3469
|
-
|
|
3470
|
-
var zIndex = props.zIndex;
|
|
3471
|
-
if (zIndex) {
|
|
3472
|
-
popup_manager.zIndex = zIndex;
|
|
3473
|
-
}
|
|
3474
|
-
|
|
3475
|
-
if (modal) {
|
|
3476
|
-
if (this._closing) {
|
|
3477
|
-
popup_manager.closeModal(this._popupId);
|
|
3478
|
-
this._closing = false;
|
|
3479
|
-
}
|
|
3480
|
-
popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
|
|
3481
|
-
if (props.lockScroll) {
|
|
3482
|
-
this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
|
|
3483
|
-
if (this.withoutHiddenClass) {
|
|
3484
|
-
this.bodyPaddingRight = document.body.style.paddingRight;
|
|
3485
|
-
this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
|
|
3486
|
-
}
|
|
3487
|
-
scrollBarWidth = Object(scrollbar_width["a" /* default */])();
|
|
3488
|
-
var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
|
|
3489
|
-
var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
|
|
3490
|
-
if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
|
|
3491
|
-
document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
|
|
3492
|
-
}
|
|
3493
|
-
Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
|
|
3494
|
-
}
|
|
3495
|
-
}
|
|
3496
|
-
|
|
3497
|
-
if (getComputedStyle(dom).position === 'static') {
|
|
3498
|
-
dom.style.position = 'absolute';
|
|
3499
|
-
}
|
|
3500
|
-
|
|
3501
|
-
dom.style.zIndex = popup_manager.nextZIndex();
|
|
3502
|
-
this.opened = true;
|
|
3503
|
-
|
|
3504
|
-
this.onOpen && this.onOpen();
|
|
3505
|
-
|
|
3506
|
-
this.doAfterOpen();
|
|
3507
|
-
},
|
|
3508
|
-
doAfterOpen: function doAfterOpen() {
|
|
3509
|
-
this._opening = false;
|
|
3510
|
-
},
|
|
3511
|
-
close: function close() {
|
|
3512
|
-
var _this3 = this;
|
|
3513
|
-
|
|
3514
|
-
if (this.willClose && !this.willClose()) return;
|
|
3515
|
-
|
|
3516
|
-
if (this._openTimer !== null) {
|
|
3517
|
-
clearTimeout(this._openTimer);
|
|
3518
|
-
this._openTimer = null;
|
|
3519
|
-
}
|
|
3520
|
-
clearTimeout(this._closeTimer);
|
|
3521
|
-
|
|
3522
|
-
var closeDelay = Number(this.closeDelay);
|
|
3523
|
-
|
|
3524
|
-
if (closeDelay > 0) {
|
|
3525
|
-
this._closeTimer = setTimeout(function () {
|
|
3526
|
-
_this3._closeTimer = null;
|
|
3527
|
-
_this3.doClose();
|
|
3528
|
-
}, closeDelay);
|
|
3529
|
-
} else {
|
|
3530
|
-
this.doClose();
|
|
3531
|
-
}
|
|
3532
|
-
},
|
|
3533
|
-
doClose: function doClose() {
|
|
3534
|
-
this._closing = true;
|
|
3535
|
-
|
|
3536
|
-
this.onClose && this.onClose();
|
|
3537
|
-
|
|
3538
|
-
if (this.lockScroll) {
|
|
3539
|
-
setTimeout(this.restoreBodyStyle, 200);
|
|
3540
|
-
}
|
|
3541
|
-
|
|
3542
|
-
this.opened = false;
|
|
3543
|
-
|
|
3544
|
-
this.doAfterClose();
|
|
3545
|
-
},
|
|
3546
|
-
doAfterClose: function doAfterClose() {
|
|
3547
|
-
popup_manager.closeModal(this._popupId);
|
|
3548
|
-
this._closing = false;
|
|
3549
|
-
},
|
|
3550
|
-
restoreBodyStyle: function restoreBodyStyle() {
|
|
3551
|
-
if (this.modal && this.withoutHiddenClass) {
|
|
3552
|
-
document.body.style.paddingRight = this.bodyPaddingRight;
|
|
3553
|
-
Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
|
|
3554
|
-
}
|
|
3555
|
-
this.withoutHiddenClass = true;
|
|
3556
|
-
}
|
|
3557
|
-
}
|
|
3558
|
-
});
|
|
3559
|
-
|
|
1101
|
+
/***/ (function(module, exports) {
|
|
3560
1102
|
|
|
1103
|
+
module.exports = require("element-ui/lib/utils/merge");
|
|
3561
1104
|
|
|
3562
1105
|
/***/ })
|
|
3563
1106
|
|