cy-element-ui 1.0.48 → 1.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/lib/alert.js +108 -108
  2. package/lib/aside.js +77 -77
  3. package/lib/autocomplete.js +5199 -360
  4. package/lib/avatar.js +4 -4
  5. package/lib/backtop.js +192 -101
  6. package/lib/badge.js +108 -108
  7. package/lib/breadcrumb-item.js +108 -108
  8. package/lib/breadcrumb.js +94 -94
  9. package/lib/button-group.js +4 -4
  10. package/lib/button.js +4 -4
  11. package/lib/calendar.js +1734 -137
  12. package/lib/card.js +96 -96
  13. package/lib/carousel-item.js +452 -108
  14. package/lib/carousel.js +1256 -105
  15. package/lib/cascader-panel.js +3524 -191
  16. package/lib/cascader.js +8077 -717
  17. package/lib/checkbox-button.js +151 -119
  18. package/lib/checkbox-group.js +47 -15
  19. package/lib/checkbox.js +47 -15
  20. package/lib/col.js +2 -2
  21. package/lib/collapse-item.js +815 -110
  22. package/lib/collapse.js +108 -108
  23. package/lib/color-picker.js +4705 -828
  24. package/lib/container.js +88 -88
  25. package/lib/date-picker.js +10735 -4739
  26. package/lib/descriptions-item.js +2 -2
  27. package/lib/descriptions.js +63 -8
  28. package/lib/dialog.js +1200 -22
  29. package/lib/divider.js +104 -104
  30. package/lib/drawer.js +875 -105
  31. package/lib/dropdown-item.js +128 -96
  32. package/lib/dropdown-menu.js +2301 -99
  33. package/lib/dropdown.js +990 -54
  34. package/lib/element-ui.common.js +31058 -13663
  35. package/lib/empty.js +793 -99
  36. package/lib/fileUpload.js +2542 -26
  37. package/lib/footer.js +77 -77
  38. package/lib/form-item.js +3305 -202
  39. package/lib/form.js +129 -115
  40. package/lib/header.js +77 -77
  41. package/lib/icon.js +67 -67
  42. package/lib/image.js +1662 -146
  43. package/lib/index.js +1 -1
  44. package/lib/infinite-scroll.js +435 -26
  45. package/lib/input-number.js +1421 -32
  46. package/lib/input.js +509 -37
  47. package/lib/link.js +4 -4
  48. package/lib/loading.js +886 -149
  49. package/lib/main.js +64 -64
  50. package/lib/menu-item-group.js +103 -103
  51. package/lib/menu-item.js +3140 -137
  52. package/lib/menu.js +959 -268
  53. package/lib/message-box.js +2743 -188
  54. package/lib/message.js +1196 -118
  55. package/lib/notification.js +1196 -119
  56. package/lib/option-group.js +151 -119
  57. package/lib/option.js +392 -16
  58. package/lib/page-header.js +781 -87
  59. package/lib/pagination.js +7747 -646
  60. package/lib/popconfirm.js +3606 -219
  61. package/lib/popover.js +2604 -79
  62. package/lib/progress.js +4 -4
  63. package/lib/radio-button.js +151 -119
  64. package/lib/radio-group.js +151 -119
  65. package/lib/radio.js +47 -15
  66. package/lib/rate.js +756 -113
  67. package/lib/result.js +108 -108
  68. package/lib/row.js +2 -2
  69. package/lib/scrollbar.js +1813 -41
  70. package/lib/select.js +5547 -209
  71. package/lib/selectDisplayInput.js +4 -4
  72. package/lib/skeleton-item.js +108 -108
  73. package/lib/skeleton.js +108 -108
  74. package/lib/slider.js +4768 -530
  75. package/lib/spinner.js +100 -100
  76. package/lib/statistic.js +9600 -112
  77. package/lib/step.js +108 -108
  78. package/lib/steps.js +514 -99
  79. package/lib/subTitle.js +91 -91
  80. package/lib/submenu.js +2397 -76
  81. package/lib/switch.js +582 -127
  82. package/lib/tab-pane.js +108 -108
  83. package/lib/tabDialog.js +1630 -104
  84. package/lib/table-column.js +1115 -267
  85. package/lib/table.js +7067 -1253
  86. package/lib/tabs.js +1615 -113
  87. package/lib/tag.js +4 -4
  88. package/lib/time-picker.js +6481 -589
  89. package/lib/time-select.js +6334 -407
  90. package/lib/timeline-item.js +108 -108
  91. package/lib/timeline.js +4 -4
  92. package/lib/tooltip.js +2688 -44
  93. package/lib/transfer.js +2238 -146
  94. package/lib/tree.js +1563 -148
  95. package/lib/treeSelect.js +3421 -106
  96. package/lib/upload.js +1198 -31
  97. package/package.json +1 -1
  98. package/src/index.js +1 -1
@@ -82,198 +82,722 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 83);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 152);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
90
  /***/ 0:
91
+ /***/ (function(module, exports) {
92
+
93
+ module.exports = require("vue");
94
+
95
+ /***/ }),
96
+
97
+ /***/ 1:
91
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
99
 
93
100
  "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
106
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
107
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
108
+ /* unused harmony export setStyle */
109
+ /* unused harmony export isScroll */
110
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
111
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
112
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
113
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
114
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
96
115
 
97
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
- // This module is a runtime utility for cleaner component module output and will
99
- // be included in the final webpack user bundle.
116
+ /* istanbul ignore next */
100
117
 
101
- function normalizeComponent(
102
- scriptExports,
103
- render,
104
- staticRenderFns,
105
- functionalTemplate,
106
- injectStyles,
107
- scopeId,
108
- moduleIdentifier /* server only */,
109
- shadowMode /* vue-cli only */
110
- ) {
111
- // Vue.extend constructor export interop
112
- var options =
113
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
114
118
 
115
- // render functions
116
- if (render) {
117
- options.render = render
118
- options.staticRenderFns = staticRenderFns
119
- options._compiled = true
120
- }
121
119
 
122
- // functional template
123
- if (functionalTemplate) {
124
- options.functional = true
125
- }
120
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
121
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
122
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
123
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
126
124
 
127
- // scopedId
128
- if (scopeId) {
129
- options._scopeId = 'data-v-' + scopeId
130
- }
125
+ /* istanbul ignore next */
126
+ var trim = function trim(string) {
127
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
128
+ };
129
+ /* istanbul ignore next */
130
+ var camelCase = function camelCase(name) {
131
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
132
+ return offset ? letter.toUpperCase() : letter;
133
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
134
+ };
131
135
 
132
- var hook
133
- if (moduleIdentifier) {
134
- // server build
135
- hook = function (context) {
136
- // 2.3 injection
137
- context =
138
- context || // cached call
139
- (this.$vnode && this.$vnode.ssrContext) || // stateful
140
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
141
- // 2.2 with runInNewContext: true
142
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
143
- context = __VUE_SSR_CONTEXT__
144
- }
145
- // inject component styles
146
- if (injectStyles) {
147
- injectStyles.call(this, context)
148
- }
149
- // register component module identifier for async chunk inferrence
150
- if (context && context._registeredComponents) {
151
- context._registeredComponents.add(moduleIdentifier)
152
- }
153
- }
154
- // used by ssr in case component is cached and beforeCreate
155
- // never gets called
156
- options._ssrRegister = hook
157
- } else if (injectStyles) {
158
- hook = shadowMode
159
- ? function () {
160
- injectStyles.call(
161
- this,
162
- (options.functional ? this.parent : this).$root.$options.shadowRoot
163
- )
164
- }
165
- : injectStyles
166
- }
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
+ }();
167
169
 
168
- if (hook) {
169
- if (options.functional) {
170
- // for template-only hot-reload because in that case the render fn doesn't
171
- // go through the normalizer
172
- options._injectStyles = hook
173
- // register for functional component in vue file
174
- var originalRender = options.render
175
- options.render = function renderWithStyleInjection(h, context) {
176
- hook.call(context)
177
- return originalRender(h, context)
178
- }
179
- } else {
180
- // inject component registration as beforeCreate hook
181
- var existing = options.beforeCreate
182
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
183
- }
184
- }
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
+ };
185
180
 
186
- return {
187
- exports: scriptExports,
188
- options: options
189
- }
190
- }
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
191
 
192
+ /* istanbul ignore next */
193
+ function addClass(el, cls) {
194
+ if (!el) return;
195
+ var curClass = el.className;
196
+ var classes = (cls || '').split(' ');
192
197
 
193
- /***/ }),
198
+ for (var i = 0, j = classes.length; i < j; i++) {
199
+ var clsName = classes[i];
200
+ if (!clsName) continue;
194
201
 
195
- /***/ 10:
196
- /***/ (function(module, exports) {
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
+ };
197
212
 
198
- module.exports = require("element-ui/lib/input");
213
+ /* istanbul ignore next */
214
+ function removeClass(el, cls) {
215
+ if (!el || !cls) return;
216
+ var classes = cls.split(' ');
217
+ var curClass = ' ' + el.className + ' ';
199
218
 
200
- /***/ }),
219
+ for (var i = 0, j = classes.length; i < j; i++) {
220
+ var clsName = classes[i];
221
+ if (!clsName) continue;
201
222
 
202
- /***/ 13:
203
- /***/ (function(module, exports) {
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
+ };
204
233
 
205
- module.exports = require("element-ui/lib/button");
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
+ };
206
270
 
207
- /***/ }),
271
+ /* istanbul ignore next */
272
+ function setStyle(element, styleName, value) {
273
+ if (!element || !styleName) return;
208
274
 
209
- /***/ 14:
210
- /***/ (function(module, exports) {
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
+ };
211
290
 
212
- module.exports = require("element-ui/lib/utils/popup");
291
+ var isScroll = function isScroll(el, vertical) {
292
+ if (isServer) return;
213
293
 
214
- /***/ }),
294
+ var determinedDirection = vertical !== null && vertical !== undefined;
295
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
215
296
 
216
- /***/ 2:
217
- /***/ (function(module, exports) {
297
+ return overflow.match(/(scroll|auto|overlay)/);
298
+ };
218
299
 
219
- module.exports = require("element-ui/lib/utils/dom");
300
+ var getScrollContainer = function getScrollContainer(el, vertical) {
301
+ if (isServer) return;
220
302
 
221
- /***/ }),
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
+ }
222
313
 
223
- /***/ 20:
224
- /***/ (function(module, exports) {
314
+ return parent;
315
+ };
225
316
 
226
- module.exports = require("element-ui/lib/locale");
317
+ var isInContainer = function isInContainer(el, container) {
318
+ if (isServer || !el || !container) return false;
227
319
 
228
- /***/ }),
320
+ var elRect = el.getBoundingClientRect();
321
+ var containerRect = void 0;
229
322
 
230
- /***/ 23:
231
- /***/ (function(module, exports) {
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
+ }
232
333
 
233
- module.exports = require("element-ui/lib/utils/vdom");
334
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
335
+ };
234
336
 
235
337
  /***/ }),
236
338
 
237
- /***/ 49:
238
- /***/ (function(module, exports) {
339
+ /***/ 11:
340
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
239
341
 
240
- module.exports = require("element-ui/lib/utils/aria-dialog");
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: ./node_modules/deepmerge/dist/cjs.js
478
+ var cjs = __webpack_require__(15);
479
+ var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
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; };
241
486
 
242
- /***/ }),
243
487
 
244
- /***/ 6:
245
- /***/ (function(module, exports) {
246
488
 
247
- module.exports = require("element-ui/lib/mixins/locale");
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, cjs_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 });
248
581
 
249
582
  /***/ }),
250
583
 
251
- /***/ 7:
252
- /***/ (function(module, exports) {
584
+ /***/ 12:
585
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
253
586
 
254
- module.exports = require("vue");
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
+ });
255
653
 
256
654
  /***/ }),
257
655
 
258
- /***/ 83:
656
+ /***/ 13:
259
657
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
260
658
 
261
659
  "use strict";
262
- // ESM COMPAT FLAG
263
- __webpack_require__.r(__webpack_exports__);
660
+ /* harmony import */ var element_ui_src_locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
264
661
 
265
- // EXTERNAL MODULE: external "vue"
266
- var external_vue_ = __webpack_require__(7);
267
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
268
662
 
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
270
- var render = function render() {
271
- var _vm = this,
272
- _c = _vm._self._c
273
- return _c("transition", { attrs: { name: "msgbox-fade" } }, [
274
- _c(
275
- "div",
276
- {
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, __webpack_require__) {
679
+
680
+ "use strict";
681
+
682
+
683
+ var isMergeableObject = function isMergeableObject(value) {
684
+ return isNonNullObject(value)
685
+ && !isSpecial(value)
686
+ };
687
+
688
+ function isNonNullObject(value) {
689
+ return !!value && typeof value === 'object'
690
+ }
691
+
692
+ function isSpecial(value) {
693
+ var stringValue = Object.prototype.toString.call(value);
694
+
695
+ return stringValue === '[object RegExp]'
696
+ || stringValue === '[object Date]'
697
+ || isReactElement(value)
698
+ }
699
+
700
+ // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
701
+ var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
702
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
703
+
704
+ function isReactElement(value) {
705
+ return value.$$typeof === REACT_ELEMENT_TYPE
706
+ }
707
+
708
+ function emptyTarget(val) {
709
+ return Array.isArray(val) ? [] : {}
710
+ }
711
+
712
+ function cloneIfNecessary(value, optionsArgument) {
713
+ var clone = optionsArgument && optionsArgument.clone === true;
714
+ return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
715
+ }
716
+
717
+ function defaultArrayMerge(target, source, optionsArgument) {
718
+ var destination = target.slice();
719
+ source.forEach(function(e, i) {
720
+ if (typeof destination[i] === 'undefined') {
721
+ destination[i] = cloneIfNecessary(e, optionsArgument);
722
+ } else if (isMergeableObject(e)) {
723
+ destination[i] = deepmerge(target[i], e, optionsArgument);
724
+ } else if (target.indexOf(e) === -1) {
725
+ destination.push(cloneIfNecessary(e, optionsArgument));
726
+ }
727
+ });
728
+ return destination
729
+ }
730
+
731
+ function mergeObject(target, source, optionsArgument) {
732
+ var destination = {};
733
+ if (isMergeableObject(target)) {
734
+ Object.keys(target).forEach(function(key) {
735
+ destination[key] = cloneIfNecessary(target[key], optionsArgument);
736
+ });
737
+ }
738
+ Object.keys(source).forEach(function(key) {
739
+ if (!isMergeableObject(source[key]) || !target[key]) {
740
+ destination[key] = cloneIfNecessary(source[key], optionsArgument);
741
+ } else {
742
+ destination[key] = deepmerge(target[key], source[key], optionsArgument);
743
+ }
744
+ });
745
+ return destination
746
+ }
747
+
748
+ function deepmerge(target, source, optionsArgument) {
749
+ var sourceIsArray = Array.isArray(source);
750
+ var targetIsArray = Array.isArray(target);
751
+ var options = optionsArgument || { arrayMerge: defaultArrayMerge };
752
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
753
+
754
+ if (!sourceAndTargetTypesMatch) {
755
+ return cloneIfNecessary(source, optionsArgument)
756
+ } else if (sourceIsArray) {
757
+ var arrayMerge = options.arrayMerge || defaultArrayMerge;
758
+ return arrayMerge(target, source, optionsArgument)
759
+ } else {
760
+ return mergeObject(target, source, optionsArgument)
761
+ }
762
+ }
763
+
764
+ deepmerge.all = function deepmergeAll(array, optionsArgument) {
765
+ if (!Array.isArray(array) || array.length < 2) {
766
+ throw new Error('first argument should be an array with at least two elements')
767
+ }
768
+
769
+ // we are sure there are at least 2 values, so it is safe to have no initial value
770
+ return array.reduce(function(prev, next) {
771
+ return deepmerge(prev, next, optionsArgument)
772
+ })
773
+ };
774
+
775
+ var deepmerge_1 = deepmerge;
776
+
777
+ module.exports = deepmerge_1;
778
+
779
+
780
+ /***/ }),
781
+
782
+ /***/ 152:
783
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
784
+
785
+ "use strict";
786
+ // ESM COMPAT FLAG
787
+ __webpack_require__.r(__webpack_exports__);
788
+
789
+ // EXTERNAL MODULE: external "vue"
790
+ var external_vue_ = __webpack_require__(0);
791
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
792
+
793
+ // 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
794
+ var render = function render() {
795
+ var _vm = this,
796
+ _c = _vm._self._c
797
+ return _c("transition", { attrs: { name: "msgbox-fade" } }, [
798
+ _c(
799
+ "div",
800
+ {
277
801
  directives: [
278
802
  {
279
803
  name: "show",
@@ -555,32 +1079,124 @@ render._withStripped = true
555
1079
 
556
1080
  // CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=template&id=cb66f6ce
557
1081
 
558
- // EXTERNAL MODULE: external "element-ui/lib/utils/popup"
559
- var popup_ = __webpack_require__(14);
560
- var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
1082
+ // EXTERNAL MODULE: ./src/utils/popup/index.js + 1 modules
1083
+ var popup = __webpack_require__(9);
561
1084
 
562
- // EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
563
- var locale_ = __webpack_require__(6);
564
- var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
1085
+ // EXTERNAL MODULE: ./src/mixins/locale.js
1086
+ var locale = __webpack_require__(13);
565
1087
 
566
- // EXTERNAL MODULE: external "element-ui/lib/input"
567
- var input_ = __webpack_require__(10);
568
- var input_default = /*#__PURE__*/__webpack_require__.n(input_);
1088
+ // EXTERNAL MODULE: ./packages/input/index.js + 6 modules
1089
+ var input = __webpack_require__(20);
569
1090
 
570
- // EXTERNAL MODULE: external "element-ui/lib/button"
571
- var button_ = __webpack_require__(13);
572
- var button_default = /*#__PURE__*/__webpack_require__.n(button_);
1091
+ // EXTERNAL MODULE: ./packages/button/index.js + 5 modules
1092
+ var packages_button = __webpack_require__(28);
573
1093
 
574
- // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
575
- var dom_ = __webpack_require__(2);
1094
+ // EXTERNAL MODULE: ./src/utils/dom.js
1095
+ var dom = __webpack_require__(1);
576
1096
 
577
- // EXTERNAL MODULE: external "element-ui/lib/locale"
578
- var lib_locale_ = __webpack_require__(20);
1097
+ // EXTERNAL MODULE: ./src/locale/index.js + 2 modules
1098
+ var src_locale = __webpack_require__(11);
579
1099
 
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_);
1100
+ // EXTERNAL MODULE: ./src/utils/aria-utils.js
1101
+ var aria_utils = __webpack_require__(30);
583
1102
 
1103
+ // CONCATENATED MODULE: ./src/utils/aria-dialog.js
1104
+ 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; };
1105
+
1106
+
1107
+
1108
+ /**
1109
+ * @constructor
1110
+ * @desc Dialog object providing modal focus management.
1111
+ *
1112
+ * Assumptions: The element serving as the dialog container is present in the
1113
+ * DOM and hidden. The dialog container has role='dialog'.
1114
+ *
1115
+ * @param dialogId
1116
+ * The ID of the element serving as the dialog container.
1117
+ * @param focusAfterClosed
1118
+ * Either the DOM node or the ID of the DOM node to focus when the
1119
+ * dialog closes.
1120
+ * @param focusFirst
1121
+ * Optional parameter containing either the DOM node or the ID of the
1122
+ * DOM node to focus when the dialog opens. If not specified, the
1123
+ * first focusable element in the dialog will receive focus.
1124
+ */
1125
+ var aria = aria || {};
1126
+ var tabEvent;
1127
+
1128
+ aria.Dialog = function (dialog, focusAfterClosed, focusFirst) {
1129
+ var _this = this;
1130
+
1131
+ this.dialogNode = dialog;
1132
+ if (this.dialogNode === null || this.dialogNode.getAttribute('role') !== 'dialog') {
1133
+ throw new Error('Dialog() requires a DOM element with ARIA role of dialog.');
1134
+ }
1135
+
1136
+ if (typeof focusAfterClosed === 'string') {
1137
+ this.focusAfterClosed = document.getElementById(focusAfterClosed);
1138
+ } else if ((typeof focusAfterClosed === 'undefined' ? 'undefined' : _typeof(focusAfterClosed)) === 'object') {
1139
+ this.focusAfterClosed = focusAfterClosed;
1140
+ } else {
1141
+ this.focusAfterClosed = null;
1142
+ }
1143
+
1144
+ if (typeof focusFirst === 'string') {
1145
+ this.focusFirst = document.getElementById(focusFirst);
1146
+ } else if ((typeof focusFirst === 'undefined' ? 'undefined' : _typeof(focusFirst)) === 'object') {
1147
+ this.focusFirst = focusFirst;
1148
+ } else {
1149
+ this.focusFirst = null;
1150
+ }
1151
+
1152
+ if (this.focusFirst) {
1153
+ this.focusFirst.focus();
1154
+ } else {
1155
+ aria_utils["a" /* default */].focusFirstDescendant(this.dialogNode);
1156
+ }
1157
+
1158
+ this.lastFocus = document.activeElement;
1159
+ tabEvent = function tabEvent(e) {
1160
+ _this.trapFocus(e);
1161
+ };
1162
+ this.addListeners();
1163
+ };
1164
+
1165
+ aria.Dialog.prototype.addListeners = function () {
1166
+ document.addEventListener('focus', tabEvent, true);
1167
+ };
1168
+
1169
+ aria.Dialog.prototype.removeListeners = function () {
1170
+ document.removeEventListener('focus', tabEvent, true);
1171
+ };
1172
+
1173
+ aria.Dialog.prototype.closeDialog = function () {
1174
+ var _this2 = this;
1175
+
1176
+ this.removeListeners();
1177
+ if (this.focusAfterClosed) {
1178
+ setTimeout(function () {
1179
+ _this2.focusAfterClosed.focus();
1180
+ });
1181
+ }
1182
+ };
1183
+
1184
+ aria.Dialog.prototype.trapFocus = function (event) {
1185
+ if (aria_utils["a" /* default */].IgnoreUtilFocusChanges) {
1186
+ return;
1187
+ }
1188
+ if (this.dialogNode.contains(event.target)) {
1189
+ this.lastFocus = event.target;
1190
+ } else {
1191
+ aria_utils["a" /* default */].focusFirstDescendant(this.dialogNode);
1192
+ if (this.lastFocus === document.activeElement) {
1193
+ aria_utils["a" /* default */].focusLastDescendant(this.dialogNode);
1194
+ }
1195
+ this.lastFocus = document.activeElement;
1196
+ }
1197
+ };
1198
+
1199
+ /* harmony default export */ var aria_dialog = (aria.Dialog);
584
1200
  // 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
585
1201
 
586
1202
 
@@ -600,7 +1216,7 @@ var typeMap = {
600
1216
  };
601
1217
 
602
1218
  /* harmony default export */ var mainvue_type_script_lang_js = ({
603
- mixins: [popup_default.a, locale_default.a],
1219
+ mixins: [popup["b" /* default */], locale["a" /* default */]],
604
1220
 
605
1221
  props: {
606
1222
  modal: {
@@ -633,8 +1249,8 @@ var typeMap = {
633
1249
  },
634
1250
 
635
1251
  components: {
636
- ElInput: input_default.a,
637
- ElButton: button_default.a
1252
+ ElInput: input["default"],
1253
+ ElButton: packages_button["default"]
638
1254
  },
639
1255
 
640
1256
  computed: {
@@ -707,27 +1323,27 @@ var typeMap = {
707
1323
  if (this.$type === 'prompt') {
708
1324
  var inputPattern = this.inputPattern;
709
1325
  if (inputPattern && !inputPattern.test(this.inputValue || '')) {
710
- this.editorErrorMessage = this.inputErrorMessage || Object(lib_locale_["t"])('el.messagebox.error');
711
- Object(dom_["addClass"])(this.getInputElement(), 'invalid');
1326
+ this.editorErrorMessage = this.inputErrorMessage || Object(src_locale["a" /* t */])('el.messagebox.error');
1327
+ Object(dom["a" /* addClass */])(this.getInputElement(), 'invalid');
712
1328
  return false;
713
1329
  }
714
1330
  var inputValidator = this.inputValidator;
715
1331
  if (typeof inputValidator === 'function') {
716
1332
  var validateResult = inputValidator(this.inputValue);
717
1333
  if (validateResult === false) {
718
- this.editorErrorMessage = this.inputErrorMessage || Object(lib_locale_["t"])('el.messagebox.error');
719
- Object(dom_["addClass"])(this.getInputElement(), 'invalid');
1334
+ this.editorErrorMessage = this.inputErrorMessage || Object(src_locale["a" /* t */])('el.messagebox.error');
1335
+ Object(dom["a" /* addClass */])(this.getInputElement(), 'invalid');
720
1336
  return false;
721
1337
  }
722
1338
  if (typeof validateResult === 'string') {
723
1339
  this.editorErrorMessage = validateResult;
724
- Object(dom_["addClass"])(this.getInputElement(), 'invalid');
1340
+ Object(dom["a" /* addClass */])(this.getInputElement(), 'invalid');
725
1341
  return false;
726
1342
  }
727
1343
  }
728
1344
  }
729
1345
  this.editorErrorMessage = '';
730
- Object(dom_["removeClass"])(this.getInputElement(), 'invalid');
1346
+ Object(dom["i" /* removeClass */])(this.getInputElement(), 'invalid');
731
1347
  return true;
732
1348
  },
733
1349
  getFirstFocus: function getFirstFocus() {
@@ -769,7 +1385,7 @@ var typeMap = {
769
1385
  });
770
1386
  }
771
1387
  this.focusAfterClosed = document.activeElement;
772
- messageBox = new aria_dialog_default.a(this.$el, this.focusAfterClosed, this.getFirstFocus());
1388
+ messageBox = new aria_dialog(this.$el, this.focusAfterClosed, this.getFirstFocus());
773
1389
  }
774
1390
 
775
1391
  // prompt
@@ -782,7 +1398,7 @@ var typeMap = {
782
1398
  }, 500);
783
1399
  } else {
784
1400
  this.editorErrorMessage = '';
785
- Object(dom_["removeClass"])(this.getInputElement(), 'invalid');
1401
+ Object(dom["i" /* removeClass */])(this.getInputElement(), 'invalid');
786
1402
  }
787
1403
  }
788
1404
  },
@@ -841,7 +1457,7 @@ var typeMap = {
841
1457
  // CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=script&lang=js
842
1458
  /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
843
1459
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
844
- var componentNormalizer = __webpack_require__(0);
1460
+ var componentNormalizer = __webpack_require__(2);
845
1461
 
846
1462
  // CONCATENATED MODULE: ./packages/message-box/src/main.vue
847
1463
 
@@ -863,15 +1479,14 @@ var component = Object(componentNormalizer["a" /* default */])(
863
1479
  )
864
1480
 
865
1481
  /* harmony default export */ var main = (component.exports);
866
- // EXTERNAL MODULE: external "element-ui/lib/utils/merge"
867
- var merge_ = __webpack_require__(9);
868
- var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
1482
+ // EXTERNAL MODULE: ./src/utils/merge.js
1483
+ var merge = __webpack_require__(7);
869
1484
 
870
- // EXTERNAL MODULE: external "element-ui/lib/utils/vdom"
871
- var vdom_ = __webpack_require__(23);
1485
+ // EXTERNAL MODULE: ./src/utils/vdom.js
1486
+ var vdom = __webpack_require__(38);
872
1487
 
873
1488
  // CONCATENATED MODULE: ./packages/message-box/src/main.js
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; };
1489
+ var main_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; };
875
1490
 
876
1491
  var defaults = {
877
1492
  title: null,
@@ -976,7 +1591,7 @@ var main_showNextMsg = function showNextMsg() {
976
1591
  oldCb(action, instance);
977
1592
  showNextMsg();
978
1593
  };
979
- if (Object(vdom_["isVNode"])(instance.message)) {
1594
+ if (Object(vdom["a" /* isVNode */])(instance.message)) {
980
1595
  instance.$slots.default = [instance.message];
981
1596
  instance.message = null;
982
1597
  } else {
@@ -998,7 +1613,7 @@ var main_showNextMsg = function showNextMsg() {
998
1613
 
999
1614
  var main_MessageBox = function MessageBox(options, callback) {
1000
1615
  if (external_vue_default.a.prototype.$isServer) return;
1001
- if (typeof options === 'string' || Object(vdom_["isVNode"])(options)) {
1616
+ if (typeof options === 'string' || Object(vdom["a" /* isVNode */])(options)) {
1002
1617
  options = {
1003
1618
  message: options
1004
1619
  };
@@ -1013,7 +1628,7 @@ var main_MessageBox = function MessageBox(options, callback) {
1013
1628
  return new Promise(function (resolve, reject) {
1014
1629
  // eslint-disable-line
1015
1630
  msgQueue.push({
1016
- options: merge_default()({}, defaults, MessageBox.defaults, options),
1631
+ options: Object(merge["a" /* default */])({}, defaults, MessageBox.defaults, options),
1017
1632
  callback: callback,
1018
1633
  resolve: resolve,
1019
1634
  reject: reject
@@ -1023,7 +1638,7 @@ var main_MessageBox = function MessageBox(options, callback) {
1023
1638
  });
1024
1639
  } else {
1025
1640
  msgQueue.push({
1026
- options: merge_default()({}, defaults, MessageBox.defaults, options),
1641
+ options: Object(merge["a" /* default */])({}, defaults, MessageBox.defaults, options),
1027
1642
  callback: callback
1028
1643
  });
1029
1644
 
@@ -1036,13 +1651,13 @@ main_MessageBox.setDefaults = function (defaults) {
1036
1651
  };
1037
1652
 
1038
1653
  main_MessageBox.alert = function (message, title, options) {
1039
- if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
1654
+ if ((typeof title === 'undefined' ? 'undefined' : main_typeof(title)) === 'object') {
1040
1655
  options = title;
1041
1656
  title = '';
1042
1657
  } else if (title === undefined) {
1043
1658
  title = '';
1044
1659
  }
1045
- return main_MessageBox(merge_default()({
1660
+ return main_MessageBox(Object(merge["a" /* default */])({
1046
1661
  title: title,
1047
1662
  message: message,
1048
1663
  $type: 'alert',
@@ -1052,13 +1667,13 @@ main_MessageBox.alert = function (message, title, options) {
1052
1667
  };
1053
1668
 
1054
1669
  main_MessageBox.confirm = function (message, title, options) {
1055
- if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
1670
+ if ((typeof title === 'undefined' ? 'undefined' : main_typeof(title)) === 'object') {
1056
1671
  options = title;
1057
1672
  title = '';
1058
1673
  } else if (title === undefined) {
1059
1674
  title = '';
1060
1675
  }
1061
- return main_MessageBox(merge_default()({
1676
+ return main_MessageBox(Object(merge["a" /* default */])({
1062
1677
  title: title,
1063
1678
  message: message,
1064
1679
  $type: 'confirm',
@@ -1067,13 +1682,13 @@ main_MessageBox.confirm = function (message, title, options) {
1067
1682
  };
1068
1683
 
1069
1684
  main_MessageBox.prompt = function (message, title, options) {
1070
- if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
1685
+ if ((typeof title === 'undefined' ? 'undefined' : main_typeof(title)) === 'object') {
1071
1686
  options = title;
1072
1687
  title = '';
1073
1688
  } else if (title === undefined) {
1074
1689
  title = '';
1075
1690
  }
1076
- return main_MessageBox(merge_default()({
1691
+ return main_MessageBox(Object(merge["a" /* default */])({
1077
1692
  title: title,
1078
1693
  message: message,
1079
1694
  showCancelButton: true,
@@ -1097,10 +1712,1950 @@ main_MessageBox.close = function () {
1097
1712
 
1098
1713
  /***/ }),
1099
1714
 
1100
- /***/ 9:
1101
- /***/ (function(module, exports) {
1715
+ /***/ 18:
1716
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1717
+
1718
+ "use strict";
1719
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDef; });
1720
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isKorean; });
1721
+ function isDef(val) {
1722
+ return val !== undefined && val !== null;
1723
+ }
1724
+ function isKorean(text) {
1725
+ var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
1726
+ return reg.test(text);
1727
+ }
1728
+
1729
+ /***/ }),
1730
+
1731
+ /***/ 2:
1732
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1733
+
1734
+ "use strict";
1735
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
1736
+ /* globals __VUE_SSR_CONTEXT__ */
1737
+
1738
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
1739
+ // This module is a runtime utility for cleaner component module output and will
1740
+ // be included in the final webpack user bundle.
1741
+
1742
+ function normalizeComponent(
1743
+ scriptExports,
1744
+ render,
1745
+ staticRenderFns,
1746
+ functionalTemplate,
1747
+ injectStyles,
1748
+ scopeId,
1749
+ moduleIdentifier /* server only */,
1750
+ shadowMode /* vue-cli only */
1751
+ ) {
1752
+ // Vue.extend constructor export interop
1753
+ var options =
1754
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
1755
+
1756
+ // render functions
1757
+ if (render) {
1758
+ options.render = render
1759
+ options.staticRenderFns = staticRenderFns
1760
+ options._compiled = true
1761
+ }
1762
+
1763
+ // functional template
1764
+ if (functionalTemplate) {
1765
+ options.functional = true
1766
+ }
1767
+
1768
+ // scopedId
1769
+ if (scopeId) {
1770
+ options._scopeId = 'data-v-' + scopeId
1771
+ }
1772
+
1773
+ var hook
1774
+ if (moduleIdentifier) {
1775
+ // server build
1776
+ hook = function (context) {
1777
+ // 2.3 injection
1778
+ context =
1779
+ context || // cached call
1780
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
1781
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
1782
+ // 2.2 with runInNewContext: true
1783
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1784
+ context = __VUE_SSR_CONTEXT__
1785
+ }
1786
+ // inject component styles
1787
+ if (injectStyles) {
1788
+ injectStyles.call(this, context)
1789
+ }
1790
+ // register component module identifier for async chunk inferrence
1791
+ if (context && context._registeredComponents) {
1792
+ context._registeredComponents.add(moduleIdentifier)
1793
+ }
1794
+ }
1795
+ // used by ssr in case component is cached and beforeCreate
1796
+ // never gets called
1797
+ options._ssrRegister = hook
1798
+ } else if (injectStyles) {
1799
+ hook = shadowMode
1800
+ ? function () {
1801
+ injectStyles.call(
1802
+ this,
1803
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
1804
+ )
1805
+ }
1806
+ : injectStyles
1807
+ }
1808
+
1809
+ if (hook) {
1810
+ if (options.functional) {
1811
+ // for template-only hot-reload because in that case the render fn doesn't
1812
+ // go through the normalizer
1813
+ options._injectStyles = hook
1814
+ // register for functional component in vue file
1815
+ var originalRender = options.render
1816
+ options.render = function renderWithStyleInjection(h, context) {
1817
+ hook.call(context)
1818
+ return originalRender(h, context)
1819
+ }
1820
+ } else {
1821
+ // inject component registration as beforeCreate hook
1822
+ var existing = options.beforeCreate
1823
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
1824
+ }
1825
+ }
1826
+
1827
+ return {
1828
+ exports: scriptExports,
1829
+ options: options
1830
+ }
1831
+ }
1832
+
1833
+
1834
+ /***/ }),
1835
+
1836
+ /***/ 20:
1837
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1838
+
1839
+ "use strict";
1840
+ // ESM COMPAT FLAG
1841
+ __webpack_require__.r(__webpack_exports__);
1842
+
1843
+ // 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
1844
+ var render = function render() {
1845
+ var _vm = this,
1846
+ _c = _vm._self._c
1847
+ return _c(
1848
+ "div",
1849
+ {
1850
+ class: [
1851
+ _vm.type === "textarea" ? "el-textarea" : "el-input",
1852
+ _vm.inputSize ? "el-input--" + _vm.inputSize : "",
1853
+ {
1854
+ "is-disabled": _vm.inputDisabled,
1855
+ "is-exceed": _vm.inputExceed,
1856
+ "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
1857
+ "el-input-group--append": _vm.$slots.append,
1858
+ "el-input-group--prepend": _vm.$slots.prepend,
1859
+ "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
1860
+ "el-input--suffix":
1861
+ _vm.$slots.suffix ||
1862
+ _vm.suffixIcon ||
1863
+ _vm.clearable ||
1864
+ _vm.showPassword,
1865
+ },
1866
+ ],
1867
+ on: {
1868
+ mouseenter: function ($event) {
1869
+ _vm.hovering = true
1870
+ },
1871
+ mouseleave: function ($event) {
1872
+ _vm.hovering = false
1873
+ },
1874
+ },
1875
+ },
1876
+ [
1877
+ _vm.type !== "textarea"
1878
+ ? [
1879
+ _vm.$slots.prepend
1880
+ ? _c(
1881
+ "div",
1882
+ { staticClass: "el-input-group__prepend" },
1883
+ [_vm._t("prepend")],
1884
+ 2
1885
+ )
1886
+ : _vm._e(),
1887
+ _vm.type !== "textarea"
1888
+ ? _c(
1889
+ "input",
1890
+ _vm._b(
1891
+ {
1892
+ ref: "input",
1893
+ staticClass: "el-input__inner",
1894
+ attrs: {
1895
+ tabindex: _vm.tabindex,
1896
+ type: _vm.showPassword
1897
+ ? _vm.passwordVisible
1898
+ ? "text"
1899
+ : "password"
1900
+ : _vm.type,
1901
+ disabled: _vm.inputDisabled,
1902
+ readonly: _vm.readonly,
1903
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
1904
+ "aria-label": _vm.label,
1905
+ },
1906
+ on: {
1907
+ compositionstart: _vm.handleCompositionStart,
1908
+ compositionupdate: _vm.handleCompositionUpdate,
1909
+ compositionend: _vm.handleCompositionEnd,
1910
+ input: _vm.handleInput,
1911
+ focus: _vm.handleFocus,
1912
+ blur: _vm.handleBlur,
1913
+ change: _vm.handleChange,
1914
+ },
1915
+ },
1916
+ "input",
1917
+ _vm.$attrs,
1918
+ false
1919
+ )
1920
+ )
1921
+ : _vm._e(),
1922
+ _vm.$slots.prefix || _vm.prefixIcon
1923
+ ? _c(
1924
+ "span",
1925
+ { staticClass: "el-input__prefix" },
1926
+ [
1927
+ _vm._t("prefix"),
1928
+ _vm.prefixIcon
1929
+ ? _c("i", {
1930
+ staticClass: "el-input__icon",
1931
+ class: _vm.prefixIcon,
1932
+ })
1933
+ : _vm._e(),
1934
+ ],
1935
+ 2
1936
+ )
1937
+ : _vm._e(),
1938
+ _vm.getSuffixVisible()
1939
+ ? _c("span", { staticClass: "el-input__suffix" }, [
1940
+ _c(
1941
+ "span",
1942
+ { staticClass: "el-input__suffix-inner" },
1943
+ [
1944
+ !_vm.showClear ||
1945
+ !_vm.showPwdVisible ||
1946
+ !_vm.isWordLimitVisible
1947
+ ? [
1948
+ _vm._t("suffix"),
1949
+ _vm.suffixIcon
1950
+ ? _c("i", {
1951
+ staticClass: "el-input__icon",
1952
+ class: _vm.suffixIcon,
1953
+ })
1954
+ : _vm._e(),
1955
+ ]
1956
+ : _vm._e(),
1957
+ _vm.showClear
1958
+ ? _c("i", {
1959
+ staticClass:
1960
+ "el-input__icon el-icon-circle-close el-input__clear",
1961
+ on: {
1962
+ mousedown: function ($event) {
1963
+ $event.preventDefault()
1964
+ },
1965
+ click: _vm.clear,
1966
+ },
1967
+ })
1968
+ : _vm._e(),
1969
+ _vm.showPwdVisible
1970
+ ? _c("i", {
1971
+ staticClass:
1972
+ "el-input__icon el-icon-view el-input__clear",
1973
+ on: { click: _vm.handlePasswordVisible },
1974
+ })
1975
+ : _vm._e(),
1976
+ _vm.isWordLimitVisible
1977
+ ? _c("span", { staticClass: "el-input__count" }, [
1978
+ _c(
1979
+ "span",
1980
+ { staticClass: "el-input__count-inner" },
1981
+ [
1982
+ _vm._v(
1983
+ "\n\t\t\t\t\t\t" +
1984
+ _vm._s(_vm.textLength) +
1985
+ "/" +
1986
+ _vm._s(_vm.upperLimit) +
1987
+ "\n\t\t\t\t\t"
1988
+ ),
1989
+ ]
1990
+ ),
1991
+ ])
1992
+ : _vm._e(),
1993
+ ],
1994
+ 2
1995
+ ),
1996
+ _vm.validateState
1997
+ ? _c("i", {
1998
+ staticClass: "el-input__icon",
1999
+ class: ["el-input__validateIcon", _vm.validateIcon],
2000
+ })
2001
+ : _vm._e(),
2002
+ ])
2003
+ : _vm._e(),
2004
+ _vm.$slots.append
2005
+ ? _c(
2006
+ "div",
2007
+ { staticClass: "el-input-group__append" },
2008
+ [_vm._t("append")],
2009
+ 2
2010
+ )
2011
+ : _vm._e(),
2012
+ ]
2013
+ : _c(
2014
+ "textarea",
2015
+ _vm._b(
2016
+ {
2017
+ ref: "textarea",
2018
+ staticClass: "el-textarea__inner",
2019
+ style: _vm.textareaStyle,
2020
+ attrs: {
2021
+ tabindex: _vm.tabindex,
2022
+ disabled: _vm.inputDisabled,
2023
+ readonly: _vm.readonly,
2024
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
2025
+ "aria-label": _vm.label,
2026
+ },
2027
+ on: {
2028
+ compositionstart: _vm.handleCompositionStart,
2029
+ compositionupdate: _vm.handleCompositionUpdate,
2030
+ compositionend: _vm.handleCompositionEnd,
2031
+ input: _vm.handleInput,
2032
+ focus: _vm.handleFocus,
2033
+ blur: _vm.handleBlur,
2034
+ change: _vm.handleChange,
2035
+ },
2036
+ },
2037
+ "textarea",
2038
+ _vm.$attrs,
2039
+ false
2040
+ )
2041
+ ),
2042
+ _vm.isWordLimitVisible && _vm.type === "textarea"
2043
+ ? _c("span", { staticClass: "el-input__count" }, [
2044
+ _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit)),
2045
+ ])
2046
+ : _vm._e(),
2047
+ ],
2048
+ 2
2049
+ )
2050
+ }
2051
+ var staticRenderFns = []
2052
+ render._withStripped = true
2053
+
2054
+
2055
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=af7512c8
2056
+
2057
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
2058
+ var emitter = __webpack_require__(6);
2059
+
2060
+ // EXTERNAL MODULE: ./src/mixins/migrating.js
2061
+ var migrating = __webpack_require__(12);
2062
+
2063
+ // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
2064
+ var hiddenTextarea = void 0;
2065
+
2066
+ 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';
2067
+
2068
+ 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'];
2069
+
2070
+ function calculateNodeStyling(targetElement) {
2071
+ var style = window.getComputedStyle(targetElement);
2072
+
2073
+ var boxSizing = style.getPropertyValue('box-sizing');
2074
+
2075
+ var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
2076
+
2077
+ var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
2078
+
2079
+ var contextStyle = CONTEXT_STYLE.map(function (name) {
2080
+ return name + ':' + style.getPropertyValue(name);
2081
+ }).join(';');
2082
+
2083
+ return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
2084
+ }
2085
+
2086
+ function calcTextareaHeight(targetElement) {
2087
+ var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
2088
+ var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
2089
+
2090
+ if (!hiddenTextarea) {
2091
+ hiddenTextarea = document.createElement('textarea');
2092
+ document.body.appendChild(hiddenTextarea);
2093
+ }
2094
+
2095
+ var _calculateNodeStyling = calculateNodeStyling(targetElement),
2096
+ paddingSize = _calculateNodeStyling.paddingSize,
2097
+ borderSize = _calculateNodeStyling.borderSize,
2098
+ boxSizing = _calculateNodeStyling.boxSizing,
2099
+ contextStyle = _calculateNodeStyling.contextStyle;
2100
+
2101
+ hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
2102
+ hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
2103
+
2104
+ var height = hiddenTextarea.scrollHeight;
2105
+ var result = {};
2106
+
2107
+ if (boxSizing === 'border-box') {
2108
+ height = height + borderSize;
2109
+ } else if (boxSizing === 'content-box') {
2110
+ height = height - paddingSize;
2111
+ }
2112
+
2113
+ hiddenTextarea.value = '';
2114
+ var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
2115
+
2116
+ if (minRows !== null) {
2117
+ var minHeight = singleRowHeight * minRows;
2118
+ if (boxSizing === 'border-box') {
2119
+ minHeight = minHeight + paddingSize + borderSize;
2120
+ }
2121
+ height = Math.max(minHeight, height);
2122
+ result.minHeight = minHeight + 'px';
2123
+ }
2124
+ if (maxRows !== null) {
2125
+ var maxHeight = singleRowHeight * maxRows;
2126
+ if (boxSizing === 'border-box') {
2127
+ maxHeight = maxHeight + paddingSize + borderSize;
2128
+ }
2129
+ height = Math.min(maxHeight, height);
2130
+ }
2131
+ result.height = height + 'px';
2132
+ hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
2133
+ hiddenTextarea = null;
2134
+ return result;
2135
+ };
2136
+ // EXTERNAL MODULE: ./src/utils/merge.js
2137
+ var merge = __webpack_require__(7);
2138
+
2139
+ // EXTERNAL MODULE: ./src/utils/shared.js
2140
+ var shared = __webpack_require__(18);
2141
+
2142
+ // 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
2143
+
2144
+
2145
+
2146
+
2147
+
2148
+
2149
+
2150
+ /* harmony default export */ var inputvue_type_script_lang_js = ({
2151
+ name: 'ElInput',
2152
+
2153
+ componentName: 'ElInput',
2154
+
2155
+ mixins: [emitter["a" /* default */], migrating["a" /* default */]],
2156
+
2157
+ inheritAttrs: false,
2158
+
2159
+ inject: {
2160
+ elForm: {
2161
+ default: ''
2162
+ },
2163
+ elFormItem: {
2164
+ default: ''
2165
+ }
2166
+ },
2167
+
2168
+ data: function data() {
2169
+ return {
2170
+ textareaCalcStyle: {},
2171
+ hovering: false,
2172
+ focused: false,
2173
+ isComposing: false,
2174
+ passwordVisible: false
2175
+ };
2176
+ },
2177
+
2178
+
2179
+ props: {
2180
+ value: [String, Number],
2181
+ size: String,
2182
+ resize: String,
2183
+ form: String,
2184
+ disabled: Boolean,
2185
+ readonly: Boolean,
2186
+ type: {
2187
+ type: String,
2188
+ default: 'text'
2189
+ },
2190
+ autosize: {
2191
+ type: [Boolean, Object],
2192
+ default: false
2193
+ },
2194
+ autocomplete: {
2195
+ type: String,
2196
+ default: 'off'
2197
+ },
2198
+ /** @Deprecated in next major version */
2199
+ autoComplete: {
2200
+ type: String,
2201
+ validator: function validator(val) {
2202
+ false && false;
2203
+ return true;
2204
+ }
2205
+ },
2206
+ validateEvent: {
2207
+ type: Boolean,
2208
+ default: true
2209
+ },
2210
+ suffixIcon: String,
2211
+ prefixIcon: String,
2212
+ label: String,
2213
+ clearable: {
2214
+ type: Boolean,
2215
+ default: false
2216
+ },
2217
+ showPassword: {
2218
+ type: Boolean,
2219
+ default: false
2220
+ },
2221
+ showWordLimit: {
2222
+ type: Boolean,
2223
+ default: false
2224
+ },
2225
+ tabindex: String
2226
+ },
2227
+
2228
+ computed: {
2229
+ _elFormItemSize: function _elFormItemSize() {
2230
+ return (this.elFormItem || {}).elFormItemSize;
2231
+ },
2232
+ validateState: function validateState() {
2233
+ return this.elFormItem ? this.elFormItem.validateState : '';
2234
+ },
2235
+ needStatusIcon: function needStatusIcon() {
2236
+ return this.elForm ? this.elForm.statusIcon : false;
2237
+ },
2238
+ validateIcon: function validateIcon() {
2239
+ return {
2240
+ validating: 'el-icon-loading',
2241
+ success: 'el-icon-circle-check',
2242
+ error: 'el-icon-circle-close'
2243
+ }[this.validateState];
2244
+ },
2245
+ textareaStyle: function textareaStyle() {
2246
+ return Object(merge["a" /* default */])({}, this.textareaCalcStyle, { resize: this.resize });
2247
+ },
2248
+ inputSize: function inputSize() {
2249
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
2250
+ },
2251
+ inputDisabled: function inputDisabled() {
2252
+ return this.disabled || (this.elForm || {}).disabled;
2253
+ },
2254
+ nativeInputValue: function nativeInputValue() {
2255
+ return this.value === null || this.value === undefined ? '' : String(this.value);
2256
+ },
2257
+ showClear: function showClear() {
2258
+ return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
2259
+ },
2260
+ showPwdVisible: function showPwdVisible() {
2261
+ return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
2262
+ },
2263
+ isWordLimitVisible: function isWordLimitVisible() {
2264
+ return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
2265
+ },
2266
+ upperLimit: function upperLimit() {
2267
+ return this.$attrs.maxlength;
2268
+ },
2269
+ textLength: function textLength() {
2270
+ if (typeof this.value === 'number') {
2271
+ return String(this.value).length;
2272
+ }
2273
+
2274
+ return (this.value || '').length;
2275
+ },
2276
+ inputExceed: function inputExceed() {
2277
+ // show exceed style if length of initial value greater then maxlength
2278
+ return this.isWordLimitVisible && this.textLength > this.upperLimit;
2279
+ }
2280
+ },
2281
+
2282
+ watch: {
2283
+ value: function value(val) {
2284
+ this.$nextTick(this.resizeTextarea);
2285
+ if (this.validateEvent) {
2286
+ this.dispatch('ElFormItem', 'el.form.change', [val]);
2287
+ }
2288
+ },
2289
+
2290
+ // native input value is set explicitly
2291
+ // do not use v-model / :value in template
2292
+ // see: https://github.com/ElemeFE/element/issues/14521
2293
+ nativeInputValue: function nativeInputValue() {
2294
+ this.setNativeInputValue();
2295
+ },
2296
+
2297
+ // when change between <input> and <textarea>,
2298
+ // update DOM dependent value and styles
2299
+ // https://github.com/ElemeFE/element/issues/14857
2300
+ type: function type() {
2301
+ var _this = this;
2302
+
2303
+ this.$nextTick(function () {
2304
+ _this.setNativeInputValue();
2305
+ _this.resizeTextarea();
2306
+ _this.updateIconOffset();
2307
+ });
2308
+ }
2309
+ },
2310
+
2311
+ methods: {
2312
+ focus: function focus() {
2313
+ this.getInput().focus();
2314
+ },
2315
+ blur: function blur() {
2316
+ this.getInput().blur();
2317
+ },
2318
+ getMigratingConfig: function getMigratingConfig() {
2319
+ return {
2320
+ props: {
2321
+ 'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
2322
+ 'on-icon-click': 'on-icon-click is removed.'
2323
+ },
2324
+ events: {
2325
+ 'click': 'click is removed.'
2326
+ }
2327
+ };
2328
+ },
2329
+ handleBlur: function handleBlur(event) {
2330
+ this.focused = false;
2331
+ this.$emit('blur', event);
2332
+ if (this.validateEvent) {
2333
+ this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
2334
+ }
2335
+ },
2336
+ select: function select() {
2337
+ this.getInput().select();
2338
+ },
2339
+ resizeTextarea: function resizeTextarea() {
2340
+ if (this.$isServer) return;
2341
+ var autosize = this.autosize,
2342
+ type = this.type;
2343
+
2344
+ if (type !== 'textarea') return;
2345
+ if (!autosize) {
2346
+ this.textareaCalcStyle = {
2347
+ minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
2348
+ };
2349
+ return;
2350
+ }
2351
+ var minRows = autosize.minRows;
2352
+ var maxRows = autosize.maxRows;
2353
+
2354
+ this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
2355
+ },
2356
+ setNativeInputValue: function setNativeInputValue() {
2357
+ var input = this.getInput();
2358
+ if (!input) return;
2359
+ if (input.value === this.nativeInputValue) return;
2360
+ input.value = this.nativeInputValue;
2361
+ },
2362
+ handleFocus: function handleFocus(event) {
2363
+ this.focused = true;
2364
+ this.$emit('focus', event);
2365
+ },
2366
+ handleCompositionStart: function handleCompositionStart(event) {
2367
+ this.$emit('compositionstart', event);
2368
+ this.isComposing = true;
2369
+ },
2370
+ handleCompositionUpdate: function handleCompositionUpdate(event) {
2371
+ this.$emit('compositionupdate', event);
2372
+ var text = event.target.value;
2373
+ var lastCharacter = text[text.length - 1] || '';
2374
+ this.isComposing = !Object(shared["b" /* isKorean */])(lastCharacter);
2375
+ },
2376
+ handleCompositionEnd: function handleCompositionEnd(event) {
2377
+ this.$emit('compositionend', event);
2378
+ if (this.isComposing) {
2379
+ this.isComposing = false;
2380
+ this.handleInput(event);
2381
+ }
2382
+ },
2383
+ handleInput: function handleInput(event) {
2384
+ // should not emit input during composition
2385
+ // see: https://github.com/ElemeFE/element/issues/10516
2386
+ if (this.isComposing) return;
2387
+
2388
+ // hack for https://github.com/ElemeFE/element/issues/8548
2389
+ // should remove the following line when we don't support IE
2390
+ if (event.target.value === this.nativeInputValue) return;
2391
+
2392
+ this.$emit('input', event.target.value);
2393
+
2394
+ // ensure native input value is controlled
2395
+ // see: https://github.com/ElemeFE/element/issues/12850
2396
+ this.$nextTick(this.setNativeInputValue);
2397
+ },
2398
+ handleChange: function handleChange(event) {
2399
+ this.$emit('change', event.target.value);
2400
+ },
2401
+ calcIconOffset: function calcIconOffset(place) {
2402
+ var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
2403
+ if (!elList.length) return;
2404
+ var el = null;
2405
+ for (var i = 0; i < elList.length; i++) {
2406
+ if (elList[i].parentNode === this.$el) {
2407
+ el = elList[i];
2408
+ break;
2409
+ }
2410
+ }
2411
+ if (!el) return;
2412
+ var pendantMap = {
2413
+ suffix: 'append',
2414
+ prefix: 'prepend'
2415
+ };
2416
+
2417
+ var pendant = pendantMap[place];
2418
+ if (this.$slots[pendant]) {
2419
+ el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
2420
+ } else {
2421
+ el.removeAttribute('style');
2422
+ }
2423
+ },
2424
+ updateIconOffset: function updateIconOffset() {
2425
+ this.calcIconOffset('prefix');
2426
+ this.calcIconOffset('suffix');
2427
+ },
2428
+ clear: function clear() {
2429
+ this.$emit('input', '');
2430
+ this.$emit('change', '');
2431
+ this.$emit('clear');
2432
+ },
2433
+ handlePasswordVisible: function handlePasswordVisible() {
2434
+ var _this2 = this;
2435
+
2436
+ this.passwordVisible = !this.passwordVisible;
2437
+ this.$nextTick(function () {
2438
+ _this2.focus();
2439
+ });
2440
+ },
2441
+ getInput: function getInput() {
2442
+ return this.$refs.input || this.$refs.textarea;
2443
+ },
2444
+ getSuffixVisible: function getSuffixVisible() {
2445
+ return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
2446
+ }
2447
+ },
2448
+
2449
+ created: function created() {
2450
+ this.$on('inputSelect', this.select);
2451
+ },
2452
+ mounted: function mounted() {
2453
+ this.setNativeInputValue();
2454
+ this.resizeTextarea();
2455
+ this.updateIconOffset();
2456
+ },
2457
+ updated: function updated() {
2458
+ this.$nextTick(this.updateIconOffset);
2459
+ }
2460
+ });
2461
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js
2462
+ /* harmony default export */ var src_inputvue_type_script_lang_js = (inputvue_type_script_lang_js);
2463
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2464
+ var componentNormalizer = __webpack_require__(2);
2465
+
2466
+ // CONCATENATED MODULE: ./packages/input/src/input.vue
2467
+
2468
+
2469
+
2470
+
2471
+
2472
+ /* normalize component */
2473
+
2474
+ var component = Object(componentNormalizer["a" /* default */])(
2475
+ src_inputvue_type_script_lang_js,
2476
+ render,
2477
+ staticRenderFns,
2478
+ false,
2479
+ null,
2480
+ null,
2481
+ null
2482
+
2483
+ )
2484
+
2485
+ /* harmony default export */ var input = (component.exports);
2486
+ // CONCATENATED MODULE: ./packages/input/index.js
2487
+
2488
+
2489
+ /* istanbul ignore next */
2490
+ input.install = function (Vue) {
2491
+ Vue.component(input.name, input);
2492
+ };
2493
+
2494
+ /* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
2495
+
2496
+ /***/ }),
2497
+
2498
+ /***/ 28:
2499
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2500
+
2501
+ "use strict";
2502
+ // ESM COMPAT FLAG
2503
+ __webpack_require__.r(__webpack_exports__);
2504
+
2505
+ // 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
2506
+ var render = function render() {
2507
+ var _vm = this,
2508
+ _c = _vm._self._c
2509
+ return _c(
2510
+ "button",
2511
+ {
2512
+ staticClass: "el-button",
2513
+ class: [
2514
+ _vm.type ? "el-button--" + _vm.type : "",
2515
+ _vm.buttonSize ? "el-button--" + _vm.buttonSize : "",
2516
+ {
2517
+ "is-disabled": _vm.buttonDisabled,
2518
+ "is-loading": _vm.loading,
2519
+ "is-plain": _vm.plain,
2520
+ "is-round": _vm.round,
2521
+ "is-circle": _vm.circle,
2522
+ },
2523
+ ],
2524
+ attrs: {
2525
+ disabled: _vm.buttonDisabled || _vm.loading,
2526
+ autofocus: _vm.autofocus,
2527
+ type: _vm.nativeType,
2528
+ },
2529
+ on: { click: _vm.handleClick },
2530
+ },
2531
+ [
2532
+ _vm.loading ? _c("i", { staticClass: "el-icon-loading" }) : _vm._e(),
2533
+ _vm.icon && !_vm.loading ? _c("i", { class: _vm.icon }) : _vm._e(),
2534
+ _vm.$slots.default ? _c("span", [_vm._t("default")], 2) : _vm._e(),
2535
+ ]
2536
+ )
2537
+ }
2538
+ var staticRenderFns = []
2539
+ render._withStripped = true
2540
+
2541
+
2542
+ // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=7105114a
2543
+
2544
+ // 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
2545
+
2546
+ /* harmony default export */ var buttonvue_type_script_lang_js = ({
2547
+ name: 'ElButton',
2548
+
2549
+ inject: {
2550
+ elForm: {
2551
+ default: ''
2552
+ },
2553
+ elFormItem: {
2554
+ default: ''
2555
+ }
2556
+ },
2557
+
2558
+ props: {
2559
+ type: {
2560
+ type: String,
2561
+ default: 'default'
2562
+ },
2563
+ size: String,
2564
+ icon: {
2565
+ type: String,
2566
+ default: ''
2567
+ },
2568
+ nativeType: {
2569
+ type: String,
2570
+ default: 'button'
2571
+ },
2572
+ loading: Boolean,
2573
+ disabled: Boolean,
2574
+ plain: Boolean,
2575
+ autofocus: Boolean,
2576
+ round: Boolean,
2577
+ circle: Boolean
2578
+ },
2579
+
2580
+ computed: {
2581
+ _elFormItemSize: function _elFormItemSize() {
2582
+ return (this.elFormItem || {}).elFormItemSize;
2583
+ },
2584
+ buttonSize: function buttonSize() {
2585
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
2586
+ },
2587
+ buttonDisabled: function buttonDisabled() {
2588
+ return this.$options.propsData.hasOwnProperty('disabled') ? this.disabled : (this.elForm || {}).disabled;
2589
+ }
2590
+ },
2591
+
2592
+ methods: {
2593
+ handleClick: function handleClick(evt) {
2594
+ this.$emit('click', evt);
2595
+ }
2596
+ }
2597
+ });
2598
+ // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js
2599
+ /* harmony default export */ var src_buttonvue_type_script_lang_js = (buttonvue_type_script_lang_js);
2600
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2601
+ var componentNormalizer = __webpack_require__(2);
2602
+
2603
+ // CONCATENATED MODULE: ./packages/button/src/button.vue
2604
+
2605
+
2606
+
2607
+
2608
+
2609
+ /* normalize component */
2610
+
2611
+ var component = Object(componentNormalizer["a" /* default */])(
2612
+ src_buttonvue_type_script_lang_js,
2613
+ render,
2614
+ staticRenderFns,
2615
+ false,
2616
+ null,
2617
+ null,
2618
+ null
2619
+
2620
+ )
2621
+
2622
+ /* harmony default export */ var src_button = (component.exports);
2623
+ // CONCATENATED MODULE: ./packages/button/index.js
2624
+
2625
+
2626
+ /* istanbul ignore next */
2627
+ src_button.install = function (Vue) {
2628
+ Vue.component(src_button.name, src_button);
2629
+ };
2630
+
2631
+ /* harmony default export */ var packages_button = __webpack_exports__["default"] = (src_button);
2632
+
2633
+ /***/ }),
2634
+
2635
+ /***/ 3:
2636
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2637
+
2638
+ "use strict";
2639
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
2640
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
2641
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
2642
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
2643
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
2644
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
2645
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
2646
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
2647
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
2648
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
2649
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
2650
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
2651
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
2652
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
2653
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
2654
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
2655
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
2656
+ /* unused harmony export looseEqual */
2657
+ /* unused harmony export arrayEquals */
2658
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
2659
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
2660
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
2661
+ /* unused harmony export objToArray */
2662
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
2663
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2664
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
2665
+ /* harmony import */ var element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
2666
+ 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; };
2667
+
2668
+
2669
+
2670
+
2671
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2672
+
2673
+ function noop() {};
2674
+
2675
+ function hasOwn(obj, key) {
2676
+ return hasOwnProperty.call(obj, key);
2677
+ };
2678
+
2679
+ function extend(to, _from) {
2680
+ for (var key in _from) {
2681
+ to[key] = _from[key];
2682
+ }
2683
+ return to;
2684
+ };
2685
+
2686
+ function toObject(arr) {
2687
+ var res = {};
2688
+ for (var i = 0; i < arr.length; i++) {
2689
+ if (arr[i]) {
2690
+ extend(res, arr[i]);
2691
+ }
2692
+ }
2693
+ return res;
2694
+ };
2695
+
2696
+ var getValueByPath = function getValueByPath(object, prop) {
2697
+ prop = prop || '';
2698
+ var paths = prop.split('.');
2699
+ var current = object;
2700
+ var result = null;
2701
+ for (var i = 0, j = paths.length; i < j; i++) {
2702
+ var path = paths[i];
2703
+ if (!current) break;
2704
+
2705
+ if (i === j - 1) {
2706
+ result = current[path];
2707
+ break;
2708
+ }
2709
+ current = current[path];
2710
+ }
2711
+ return result;
2712
+ };
2713
+
2714
+ function getPropByPath(obj, path, strict) {
2715
+ var tempObj = obj;
2716
+ path = path.replace(/\[(\w+)\]/g, '.$1');
2717
+ path = path.replace(/^\./, '');
2718
+
2719
+ var keyArr = path.split('.');
2720
+ var i = 0;
2721
+ for (var len = keyArr.length; i < len - 1; ++i) {
2722
+ if (!tempObj && !strict) break;
2723
+ var key = keyArr[i];
2724
+ if (key in tempObj) {
2725
+ tempObj = tempObj[key];
2726
+ } else {
2727
+ if (strict) {
2728
+ throw new Error('please transfer a valid prop path to form item!');
2729
+ }
2730
+ break;
2731
+ }
2732
+ }
2733
+ return {
2734
+ o: tempObj,
2735
+ k: keyArr[i],
2736
+ v: tempObj ? tempObj[keyArr[i]] : null
2737
+ };
2738
+ };
2739
+
2740
+ var generateId = function generateId() {
2741
+ return Math.floor(Math.random() * 10000);
2742
+ };
2743
+
2744
+ var valueEquals = function valueEquals(a, b) {
2745
+ // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
2746
+ if (a === b) return true;
2747
+ if (!(a instanceof Array)) return false;
2748
+ if (!(b instanceof Array)) return false;
2749
+ if (a.length !== b.length) return false;
2750
+ for (var i = 0; i !== a.length; ++i) {
2751
+ if (a[i] !== b[i]) return false;
2752
+ }
2753
+ return true;
2754
+ };
2755
+
2756
+ var escapeRegexpString = function escapeRegexpString() {
2757
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
2758
+ return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
2759
+ };
2760
+
2761
+ // TODO: use native Array.find, Array.findIndex when IE support is dropped
2762
+ var arrayFindIndex = function arrayFindIndex(arr, pred) {
2763
+ for (var i = 0; i !== arr.length; ++i) {
2764
+ if (pred(arr[i])) {
2765
+ return i;
2766
+ }
2767
+ }
2768
+ return -1;
2769
+ };
2770
+
2771
+ var arrayFind = function arrayFind(arr, pred) {
2772
+ var idx = arrayFindIndex(arr, pred);
2773
+ return idx !== -1 ? arr[idx] : undefined;
2774
+ };
2775
+
2776
+ // coerce truthy value to array
2777
+ var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
2778
+ if (Array.isArray(val)) {
2779
+ return val;
2780
+ } else if (val) {
2781
+ return [val];
2782
+ } else {
2783
+ return [];
2784
+ }
2785
+ };
2786
+
2787
+ var isIE = function isIE() {
2788
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
2789
+ };
2790
+
2791
+ var isEdge = function isEdge() {
2792
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
2793
+ };
2794
+
2795
+ var isFirefox = function isFirefox() {
2796
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
2797
+ };
2798
+
2799
+ var autoprefixer = function autoprefixer(style) {
2800
+ if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
2801
+ var rules = ['transform', 'transition', 'animation'];
2802
+ var prefixes = ['ms-', 'webkit-'];
2803
+ rules.forEach(function (rule) {
2804
+ var value = style[rule];
2805
+ if (rule && value) {
2806
+ prefixes.forEach(function (prefix) {
2807
+ style[prefix + rule] = value;
2808
+ });
2809
+ }
2810
+ });
2811
+ return style;
2812
+ };
2813
+
2814
+ var kebabCase = function kebabCase(str) {
2815
+ var hyphenateRE = /([^-])([A-Z])/g;
2816
+ return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
2817
+ };
2818
+
2819
+ var capitalize = function capitalize(str) {
2820
+ if (!Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
2821
+ return str.charAt(0).toUpperCase() + str.slice(1);
2822
+ };
2823
+
2824
+ var looseEqual = function looseEqual(a, b) {
2825
+ var isObjectA = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
2826
+ var isObjectB = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
2827
+ if (isObjectA && isObjectB) {
2828
+ return JSON.stringify(a) === JSON.stringify(b);
2829
+ } else if (!isObjectA && !isObjectB) {
2830
+ return String(a) === String(b);
2831
+ } else {
2832
+ return false;
2833
+ }
2834
+ };
2835
+
2836
+ var arrayEquals = function arrayEquals(arrayA, arrayB) {
2837
+ arrayA = arrayA || [];
2838
+ arrayB = arrayB || [];
2839
+
2840
+ if (arrayA.length !== arrayB.length) {
2841
+ return false;
2842
+ }
2843
+
2844
+ for (var i = 0; i < arrayA.length; i++) {
2845
+ if (!looseEqual(arrayA[i], arrayB[i])) {
2846
+ return false;
2847
+ }
2848
+ }
2849
+
2850
+ return true;
2851
+ };
2852
+
2853
+ var isEqual = function isEqual(value1, value2) {
2854
+ if (Array.isArray(value1) && Array.isArray(value2)) {
2855
+ return arrayEquals(value1, value2);
2856
+ }
2857
+ return looseEqual(value1, value2);
2858
+ };
2859
+
2860
+ var isEmpty = function isEmpty(val) {
2861
+ // null or undefined
2862
+ if (val == null) return true;
2863
+
2864
+ if (typeof val === 'boolean') return false;
2865
+
2866
+ if (typeof val === 'number') return !val;
2867
+
2868
+ if (val instanceof Error) return val.message === '';
2869
+
2870
+ switch (Object.prototype.toString.call(val)) {
2871
+ // String or Array
2872
+ case '[object String]':
2873
+ case '[object Array]':
2874
+ return !val.length;
2875
+
2876
+ // Map or Set or File
2877
+ case '[object File]':
2878
+ case '[object Map]':
2879
+ case '[object Set]':
2880
+ {
2881
+ return !val.size;
2882
+ }
2883
+ // Plain Object
2884
+ case '[object Object]':
2885
+ {
2886
+ return !Object.keys(val).length;
2887
+ }
2888
+ }
2889
+
2890
+ return false;
2891
+ };
2892
+
2893
+ function rafThrottle(fn) {
2894
+ var locked = false;
2895
+ return function () {
2896
+ var _this = this;
2897
+
2898
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
2899
+ args[_key] = arguments[_key];
2900
+ }
2901
+
2902
+ if (locked) return;
2903
+ locked = true;
2904
+ window.requestAnimationFrame(function (_) {
2905
+ fn.apply(_this, args);
2906
+ locked = false;
2907
+ });
2908
+ };
2909
+ }
2910
+
2911
+ function objToArray(obj) {
2912
+ if (Array.isArray(obj)) {
2913
+ return obj;
2914
+ }
2915
+ return isEmpty(obj) ? [] : [obj];
2916
+ }
2917
+
2918
+ var isMac = function isMac() {
2919
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
2920
+ };
2921
+
2922
+ /***/ }),
2923
+
2924
+ /***/ 30:
2925
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2926
+
2927
+ "use strict";
2928
+ var aria = aria || {};
2929
+
2930
+ aria.Utils = aria.Utils || {};
2931
+
2932
+ /**
2933
+ * @desc Set focus on descendant nodes until the first focusable element is
2934
+ * found.
2935
+ * @param element
2936
+ * DOM node for which to find the first focusable descendant.
2937
+ * @returns
2938
+ * true if a focusable element is found and focus is set.
2939
+ */
2940
+ aria.Utils.focusFirstDescendant = function (element) {
2941
+ for (var i = 0; i < element.childNodes.length; i++) {
2942
+ var child = element.childNodes[i];
2943
+ if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
2944
+ return true;
2945
+ }
2946
+ }
2947
+ return false;
2948
+ };
2949
+
2950
+ /**
2951
+ * @desc Find the last descendant node that is focusable.
2952
+ * @param element
2953
+ * DOM node for which to find the last focusable descendant.
2954
+ * @returns
2955
+ * true if a focusable element is found and focus is set.
2956
+ */
2957
+
2958
+ aria.Utils.focusLastDescendant = function (element) {
2959
+ for (var i = element.childNodes.length - 1; i >= 0; i--) {
2960
+ var child = element.childNodes[i];
2961
+ if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
2962
+ return true;
2963
+ }
2964
+ }
2965
+ return false;
2966
+ };
2967
+
2968
+ /**
2969
+ * @desc Set Attempt to set focus on the current node.
2970
+ * @param element
2971
+ * The node to attempt to focus on.
2972
+ * @returns
2973
+ * true if element is focused.
2974
+ */
2975
+ aria.Utils.attemptFocus = function (element) {
2976
+ if (!aria.Utils.isFocusable(element)) {
2977
+ return false;
2978
+ }
2979
+ aria.Utils.IgnoreUtilFocusChanges = true;
2980
+ try {
2981
+ element.focus();
2982
+ } catch (e) {}
2983
+ aria.Utils.IgnoreUtilFocusChanges = false;
2984
+ return document.activeElement === element;
2985
+ };
2986
+
2987
+ aria.Utils.isFocusable = function (element) {
2988
+ if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
2989
+ return true;
2990
+ }
2991
+
2992
+ if (element.disabled) {
2993
+ return false;
2994
+ }
2995
+
2996
+ switch (element.nodeName) {
2997
+ case 'A':
2998
+ return !!element.href && element.rel !== 'ignore';
2999
+ case 'INPUT':
3000
+ return element.type !== 'hidden' && element.type !== 'file';
3001
+ case 'BUTTON':
3002
+ case 'SELECT':
3003
+ case 'TEXTAREA':
3004
+ return true;
3005
+ default:
3006
+ return false;
3007
+ }
3008
+ };
3009
+
3010
+ /**
3011
+ * 触发一个事件
3012
+ * mouseenter, mouseleave, mouseover, keyup, change, click 等
3013
+ * @param {Element} elm
3014
+ * @param {String} name
3015
+ * @param {*} opts
3016
+ */
3017
+ aria.Utils.triggerEvent = function (elm, name) {
3018
+ var eventName = void 0;
3019
+
3020
+ if (/^mouse|click/.test(name)) {
3021
+ eventName = 'MouseEvents';
3022
+ } else if (/^key/.test(name)) {
3023
+ eventName = 'KeyboardEvent';
3024
+ } else {
3025
+ eventName = 'HTMLEvents';
3026
+ }
3027
+ var evt = document.createEvent(eventName);
3028
+
3029
+ for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
3030
+ opts[_key - 2] = arguments[_key];
3031
+ }
3032
+
3033
+ evt.initEvent.apply(evt, [name].concat(opts));
3034
+ elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
3035
+
3036
+ return elm;
3037
+ };
3038
+
3039
+ aria.Utils.keys = {
3040
+ tab: 9,
3041
+ enter: 13,
3042
+ space: 32,
3043
+ left: 37,
3044
+ up: 38,
3045
+ right: 39,
3046
+ down: 40,
3047
+ esc: 27
3048
+ };
3049
+
3050
+ /* harmony default export */ __webpack_exports__["a"] = (aria.Utils);
3051
+
3052
+ /***/ }),
3053
+
3054
+ /***/ 38:
3055
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3056
+
3057
+ "use strict";
3058
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isVNode; });
3059
+ /* harmony import */ var element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
3060
+ 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; };
3061
+
3062
+
3063
+
3064
+ function isVNode(node) {
3065
+ return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "j"])(node, 'componentOptions');
3066
+ };
3067
+
3068
+ /***/ }),
3069
+
3070
+ /***/ 4:
3071
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3072
+
3073
+ "use strict";
3074
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
3075
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
3076
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
3077
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
3078
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
3079
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
3080
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
3081
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
3082
+ 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; };
3083
+
3084
+
3085
+
3086
+ function isString(obj) {
3087
+ return Object.prototype.toString.call(obj) === '[object String]';
3088
+ }
3089
+
3090
+ function isObject(obj) {
3091
+ return Object.prototype.toString.call(obj) === '[object Object]';
3092
+ }
3093
+
3094
+ function isHtmlElement(node) {
3095
+ return node && node.nodeType === Node.ELEMENT_NODE;
3096
+ }
3097
+
3098
+ /**
3099
+ * - Inspired:
3100
+ * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
3101
+ */
3102
+ var isFunction = function isFunction(functionToCheck) {
3103
+ var getType = {};
3104
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
3105
+ };
3106
+
3107
+ if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
3108
+ isFunction = function isFunction(obj) {
3109
+ return typeof obj === 'function' || false;
3110
+ };
3111
+ }
3112
+
3113
+
3114
+
3115
+ var isUndefined = function isUndefined(val) {
3116
+ return val === void 0;
3117
+ };
3118
+
3119
+ var isDefined = function isDefined(val) {
3120
+ return val !== undefined && val !== null;
3121
+ };
3122
+
3123
+ /***/ }),
3124
+
3125
+ /***/ 6:
3126
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3127
+
3128
+ "use strict";
3129
+ function _broadcast(componentName, eventName, params) {
3130
+ this.$children.forEach(function (child) {
3131
+ var name = child.$options.componentName;
3132
+
3133
+ if (name === componentName) {
3134
+ child.$emit.apply(child, [eventName].concat(params));
3135
+ } else {
3136
+ _broadcast.apply(child, [componentName, eventName].concat([params]));
3137
+ }
3138
+ });
3139
+ }
3140
+ /* harmony default export */ __webpack_exports__["a"] = ({
3141
+ methods: {
3142
+ dispatch: function dispatch(componentName, eventName, params) {
3143
+ var parent = this.$parent || this.$root;
3144
+ var name = parent.$options.componentName;
3145
+
3146
+ while (parent && (!name || name !== componentName)) {
3147
+ parent = parent.$parent;
3148
+
3149
+ if (parent) {
3150
+ name = parent.$options.componentName;
3151
+ }
3152
+ }
3153
+ if (parent) {
3154
+ parent.$emit.apply(parent, [eventName].concat(params));
3155
+ }
3156
+ },
3157
+ broadcast: function broadcast(componentName, eventName, params) {
3158
+ _broadcast.call(this, componentName, eventName, params);
3159
+ }
3160
+ }
3161
+ });
3162
+
3163
+ /***/ }),
3164
+
3165
+ /***/ 7:
3166
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3167
+
3168
+ "use strict";
3169
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
3170
+ for (var i = 1, j = arguments.length; i < j; i++) {
3171
+ var source = arguments[i] || {};
3172
+ for (var prop in source) {
3173
+ if (source.hasOwnProperty(prop)) {
3174
+ var value = source[prop];
3175
+ if (value !== undefined) {
3176
+ target[prop] = value;
3177
+ }
3178
+ }
3179
+ }
3180
+ }
3181
+
3182
+ return target;
3183
+ });;
3184
+
3185
+ /***/ }),
3186
+
3187
+ /***/ 8:
3188
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3189
+
3190
+ "use strict";
3191
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
3192
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
3193
+
3194
+
3195
+ var scrollBarWidth = void 0;
3196
+
3197
+ /* harmony default export */ __webpack_exports__["a"] = (function () {
3198
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
3199
+ if (scrollBarWidth !== undefined) return scrollBarWidth;
3200
+
3201
+ var outer = document.createElement('div');
3202
+ outer.className = 'el-scrollbar__wrap';
3203
+ outer.style.visibility = 'hidden';
3204
+ outer.style.width = '100px';
3205
+ outer.style.position = 'absolute';
3206
+ outer.style.top = '-9999px';
3207
+ document.body.appendChild(outer);
3208
+
3209
+ var widthNoScroll = outer.offsetWidth;
3210
+ outer.style.overflow = 'scroll';
3211
+
3212
+ var inner = document.createElement('div');
3213
+ inner.style.width = '100%';
3214
+ outer.appendChild(inner);
3215
+
3216
+ var widthWithScroll = inner.offsetWidth;
3217
+ outer.parentNode.removeChild(outer);
3218
+ scrollBarWidth = widthNoScroll - widthWithScroll;
3219
+
3220
+ return scrollBarWidth;
3221
+ });;
3222
+
3223
+ /***/ }),
3224
+
3225
+ /***/ 9:
3226
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3227
+
3228
+ "use strict";
3229
+
3230
+ // EXPORTS
3231
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
3232
+
3233
+ // EXTERNAL MODULE: external "vue"
3234
+ var external_vue_ = __webpack_require__(0);
3235
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
3236
+
3237
+ // EXTERNAL MODULE: ./src/utils/merge.js
3238
+ var merge = __webpack_require__(7);
3239
+
3240
+ // EXTERNAL MODULE: ./src/utils/dom.js
3241
+ var utils_dom = __webpack_require__(1);
3242
+
3243
+ // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
3244
+
3245
+
3246
+
3247
+ var hasModal = false;
3248
+ var hasInitZIndex = false;
3249
+ var popup_manager_zIndex = void 0;
3250
+
3251
+ var popup_manager_getModal = function getModal() {
3252
+ if (external_vue_default.a.prototype.$isServer) return;
3253
+ var modalDom = PopupManager.modalDom;
3254
+ if (modalDom) {
3255
+ hasModal = true;
3256
+ } else {
3257
+ hasModal = false;
3258
+ modalDom = document.createElement('div');
3259
+ PopupManager.modalDom = modalDom;
3260
+
3261
+ modalDom.addEventListener('touchmove', function (event) {
3262
+ event.preventDefault();
3263
+ event.stopPropagation();
3264
+ });
3265
+
3266
+ modalDom.addEventListener('click', function () {
3267
+ PopupManager.doOnModalClick && PopupManager.doOnModalClick();
3268
+ });
3269
+ }
3270
+
3271
+ return modalDom;
3272
+ };
3273
+
3274
+ var instances = {};
3275
+
3276
+ var PopupManager = {
3277
+ modalFade: true,
3278
+
3279
+ getInstance: function getInstance(id) {
3280
+ return instances[id];
3281
+ },
3282
+
3283
+ register: function register(id, instance) {
3284
+ if (id && instance) {
3285
+ instances[id] = instance;
3286
+ }
3287
+ },
3288
+
3289
+ deregister: function deregister(id) {
3290
+ if (id) {
3291
+ instances[id] = null;
3292
+ delete instances[id];
3293
+ }
3294
+ },
3295
+
3296
+ nextZIndex: function nextZIndex() {
3297
+ return PopupManager.zIndex++;
3298
+ },
3299
+
3300
+ modalStack: [],
3301
+
3302
+ doOnModalClick: function doOnModalClick() {
3303
+ var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
3304
+ if (!topItem) return;
3305
+
3306
+ var instance = PopupManager.getInstance(topItem.id);
3307
+ if (instance && instance.closeOnClickModal) {
3308
+ instance.close();
3309
+ }
3310
+ },
3311
+
3312
+ openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
3313
+ if (external_vue_default.a.prototype.$isServer) return;
3314
+ if (!id || zIndex === undefined) return;
3315
+ this.modalFade = modalFade;
3316
+
3317
+ var modalStack = this.modalStack;
3318
+
3319
+ for (var i = 0, j = modalStack.length; i < j; i++) {
3320
+ var item = modalStack[i];
3321
+ if (item.id === id) {
3322
+ return;
3323
+ }
3324
+ }
3325
+
3326
+ var modalDom = popup_manager_getModal();
3327
+
3328
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
3329
+ if (this.modalFade && !hasModal) {
3330
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
3331
+ }
3332
+ if (modalClass) {
3333
+ var classArr = modalClass.trim().split(/\s+/);
3334
+ classArr.forEach(function (item) {
3335
+ return Object(utils_dom["a" /* addClass */])(modalDom, item);
3336
+ });
3337
+ }
3338
+ setTimeout(function () {
3339
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
3340
+ }, 200);
3341
+
3342
+ if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
3343
+ dom.parentNode.appendChild(modalDom);
3344
+ } else {
3345
+ document.body.appendChild(modalDom);
3346
+ }
3347
+
3348
+ if (zIndex) {
3349
+ modalDom.style.zIndex = zIndex;
3350
+ }
3351
+ modalDom.tabIndex = 0;
3352
+ modalDom.style.display = '';
3353
+
3354
+ this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
3355
+ },
3356
+
3357
+ closeModal: function closeModal(id) {
3358
+ var modalStack = this.modalStack;
3359
+ var modalDom = popup_manager_getModal();
3360
+
3361
+ if (modalStack.length > 0) {
3362
+ var topItem = modalStack[modalStack.length - 1];
3363
+ if (topItem.id === id) {
3364
+ if (topItem.modalClass) {
3365
+ var classArr = topItem.modalClass.trim().split(/\s+/);
3366
+ classArr.forEach(function (item) {
3367
+ return Object(utils_dom["i" /* removeClass */])(modalDom, item);
3368
+ });
3369
+ }
3370
+
3371
+ modalStack.pop();
3372
+ if (modalStack.length > 0) {
3373
+ modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
3374
+ }
3375
+ } else {
3376
+ for (var i = modalStack.length - 1; i >= 0; i--) {
3377
+ if (modalStack[i].id === id) {
3378
+ modalStack.splice(i, 1);
3379
+ break;
3380
+ }
3381
+ }
3382
+ }
3383
+ }
3384
+
3385
+ if (modalStack.length === 0) {
3386
+ if (this.modalFade) {
3387
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
3388
+ }
3389
+ setTimeout(function () {
3390
+ if (modalStack.length === 0) {
3391
+ if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
3392
+ modalDom.style.display = 'none';
3393
+ PopupManager.modalDom = undefined;
3394
+ }
3395
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
3396
+ }, 200);
3397
+ }
3398
+ }
3399
+ };
3400
+
3401
+ Object.defineProperty(PopupManager, 'zIndex', {
3402
+ configurable: true,
3403
+ get: function get() {
3404
+ if (!hasInitZIndex) {
3405
+ popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
3406
+ hasInitZIndex = true;
3407
+ }
3408
+ return popup_manager_zIndex;
3409
+ },
3410
+ set: function set(value) {
3411
+ popup_manager_zIndex = value;
3412
+ }
3413
+ });
3414
+
3415
+ var popup_manager_getTopPopup = function getTopPopup() {
3416
+ if (external_vue_default.a.prototype.$isServer) return;
3417
+ if (PopupManager.modalStack.length > 0) {
3418
+ var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
3419
+ if (!topPopup) return;
3420
+ var instance = PopupManager.getInstance(topPopup.id);
3421
+
3422
+ return instance;
3423
+ }
3424
+ };
3425
+
3426
+ if (!external_vue_default.a.prototype.$isServer) {
3427
+ // handle `esc` key when the popup is shown
3428
+ window.addEventListener('keydown', function (event) {
3429
+ if (event.keyCode === 27) {
3430
+ var topPopup = popup_manager_getTopPopup();
3431
+
3432
+ if (topPopup && topPopup.closeOnPressEscape) {
3433
+ topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
3434
+ }
3435
+ }
3436
+ });
3437
+ }
3438
+
3439
+ /* harmony default export */ var popup_manager = (PopupManager);
3440
+ // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
3441
+ var scrollbar_width = __webpack_require__(8);
3442
+
3443
+ // CONCATENATED MODULE: ./src/utils/popup/index.js
3444
+
3445
+
3446
+
3447
+
3448
+
3449
+
3450
+ var idSeed = 1;
3451
+
3452
+ var scrollBarWidth = void 0;
3453
+
3454
+ /* harmony default export */ var popup = __webpack_exports__["b"] = ({
3455
+ props: {
3456
+ visible: {
3457
+ type: Boolean,
3458
+ default: false
3459
+ },
3460
+ openDelay: {},
3461
+ closeDelay: {},
3462
+ zIndex: {},
3463
+ modal: {
3464
+ type: Boolean,
3465
+ default: false
3466
+ },
3467
+ modalFade: {
3468
+ type: Boolean,
3469
+ default: true
3470
+ },
3471
+ modalClass: {},
3472
+ modalAppendToBody: {
3473
+ type: Boolean,
3474
+ default: false
3475
+ },
3476
+ lockScroll: {
3477
+ type: Boolean,
3478
+ default: true
3479
+ },
3480
+ closeOnPressEscape: {
3481
+ type: Boolean,
3482
+ default: false
3483
+ },
3484
+ closeOnClickModal: {
3485
+ type: Boolean,
3486
+ default: false
3487
+ }
3488
+ },
3489
+
3490
+ beforeMount: function beforeMount() {
3491
+ this._popupId = 'popup-' + idSeed++;
3492
+ popup_manager.register(this._popupId, this);
3493
+ },
3494
+ beforeDestroy: function beforeDestroy() {
3495
+ popup_manager.deregister(this._popupId);
3496
+ popup_manager.closeModal(this._popupId);
3497
+
3498
+ this.restoreBodyStyle();
3499
+ },
3500
+ data: function data() {
3501
+ return {
3502
+ opened: false,
3503
+ bodyPaddingRight: null,
3504
+ computedBodyPaddingRight: 0,
3505
+ withoutHiddenClass: true,
3506
+ rendered: false
3507
+ };
3508
+ },
3509
+
3510
+
3511
+ watch: {
3512
+ visible: function visible(val) {
3513
+ var _this = this;
3514
+
3515
+ if (val) {
3516
+ if (this._opening) return;
3517
+ if (!this.rendered) {
3518
+ this.rendered = true;
3519
+ external_vue_default.a.nextTick(function () {
3520
+ _this.open();
3521
+ });
3522
+ } else {
3523
+ this.open();
3524
+ }
3525
+ } else {
3526
+ this.close();
3527
+ }
3528
+ }
3529
+ },
3530
+
3531
+ methods: {
3532
+ open: function open(options) {
3533
+ var _this2 = this;
3534
+
3535
+ if (!this.rendered) {
3536
+ this.rendered = true;
3537
+ }
3538
+
3539
+ var props = Object(merge["a" /* default */])({}, this.$props || this, options);
3540
+
3541
+ if (this._closeTimer) {
3542
+ clearTimeout(this._closeTimer);
3543
+ this._closeTimer = null;
3544
+ }
3545
+ clearTimeout(this._openTimer);
3546
+
3547
+ var openDelay = Number(props.openDelay);
3548
+ if (openDelay > 0) {
3549
+ this._openTimer = setTimeout(function () {
3550
+ _this2._openTimer = null;
3551
+ _this2.doOpen(props);
3552
+ }, openDelay);
3553
+ } else {
3554
+ this.doOpen(props);
3555
+ }
3556
+ },
3557
+ doOpen: function doOpen(props) {
3558
+ if (this.$isServer) return;
3559
+ if (this.willOpen && !this.willOpen()) return;
3560
+ if (this.opened) return;
3561
+
3562
+ this._opening = true;
3563
+
3564
+ var dom = this.$el;
3565
+
3566
+ var modal = props.modal;
3567
+
3568
+ var zIndex = props.zIndex;
3569
+ if (zIndex) {
3570
+ popup_manager.zIndex = zIndex;
3571
+ }
3572
+
3573
+ if (modal) {
3574
+ if (this._closing) {
3575
+ popup_manager.closeModal(this._popupId);
3576
+ this._closing = false;
3577
+ }
3578
+ popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
3579
+ if (props.lockScroll) {
3580
+ this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
3581
+ if (this.withoutHiddenClass) {
3582
+ this.bodyPaddingRight = document.body.style.paddingRight;
3583
+ this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
3584
+ }
3585
+ scrollBarWidth = Object(scrollbar_width["a" /* default */])();
3586
+ var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
3587
+ var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
3588
+ if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
3589
+ document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
3590
+ }
3591
+ Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
3592
+ }
3593
+ }
3594
+
3595
+ if (getComputedStyle(dom).position === 'static') {
3596
+ dom.style.position = 'absolute';
3597
+ }
3598
+
3599
+ dom.style.zIndex = popup_manager.nextZIndex();
3600
+ this.opened = true;
3601
+
3602
+ this.onOpen && this.onOpen();
3603
+
3604
+ this.doAfterOpen();
3605
+ },
3606
+ doAfterOpen: function doAfterOpen() {
3607
+ this._opening = false;
3608
+ },
3609
+ close: function close() {
3610
+ var _this3 = this;
3611
+
3612
+ if (this.willClose && !this.willClose()) return;
3613
+
3614
+ if (this._openTimer !== null) {
3615
+ clearTimeout(this._openTimer);
3616
+ this._openTimer = null;
3617
+ }
3618
+ clearTimeout(this._closeTimer);
3619
+
3620
+ var closeDelay = Number(this.closeDelay);
3621
+
3622
+ if (closeDelay > 0) {
3623
+ this._closeTimer = setTimeout(function () {
3624
+ _this3._closeTimer = null;
3625
+ _this3.doClose();
3626
+ }, closeDelay);
3627
+ } else {
3628
+ this.doClose();
3629
+ }
3630
+ },
3631
+ doClose: function doClose() {
3632
+ this._closing = true;
3633
+
3634
+ this.onClose && this.onClose();
3635
+
3636
+ if (this.lockScroll) {
3637
+ setTimeout(this.restoreBodyStyle, 200);
3638
+ }
3639
+
3640
+ this.opened = false;
3641
+
3642
+ this.doAfterClose();
3643
+ },
3644
+ doAfterClose: function doAfterClose() {
3645
+ popup_manager.closeModal(this._popupId);
3646
+ this._closing = false;
3647
+ },
3648
+ restoreBodyStyle: function restoreBodyStyle() {
3649
+ if (this.modal && this.withoutHiddenClass) {
3650
+ document.body.style.paddingRight = this.bodyPaddingRight;
3651
+ Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
3652
+ }
3653
+ this.withoutHiddenClass = true;
3654
+ }
3655
+ }
3656
+ });
3657
+
1102
3658
 
1103
- module.exports = require("element-ui/lib/utils/merge");
1104
3659
 
1105
3660
  /***/ })
1106
3661