hc-basic 1.5.1 → 1.5.4

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 (39) hide show
  1. package/lib/hc-basic.common.js +85193 -55
  2. package/lib/hc-basic.umd.js +85204 -56
  3. package/lib/hc-basic.umd.min.js +41 -1
  4. package/package.json +10 -9
  5. package/lib/css/hc-basic.umd.596515ce.css +0 -1
  6. package/lib/css/hc-basic.umd.min.596515ce.css +0 -1
  7. package/lib/hc-basic.common.async-validator1680231905970.js +0 -984
  8. package/lib/hc-basic.common.axios1680231905971.js +0 -1644
  9. package/lib/hc-basic.common.babel-runtime1680231905970.js +0 -1242
  10. package/lib/hc-basic.common.crypto-js1680231905971.js +0 -6194
  11. package/lib/hc-basic.common.element-ui1680231905967.js +0 -43880
  12. package/lib/hc-basic.common.element-ui1680231905968.js +0 -5784
  13. package/lib/hc-basic.common.element-ui1680231905969.js +0 -14978
  14. package/lib/hc-basic.common.element-ui1680231905970.js +0 -3453
  15. package/lib/hc-basic.common.hc-basic.common.js +0 -3812
  16. package/lib/hc-basic.common.resize-observer-polyfill1680231905969.js +0 -941
  17. package/lib/hc-basic.common.vendors~hc-basic.common.js +0 -2203
  18. package/lib/hc-basic.umd.axios1680231905278.js +0 -1712
  19. package/lib/hc-basic.umd.babel-runtime1680231905277.js +0 -1411
  20. package/lib/hc-basic.umd.crypto-js1680231905278.js +0 -6194
  21. package/lib/hc-basic.umd.element-ui1680231905273.js +0 -43880
  22. package/lib/hc-basic.umd.element-ui1680231905274.js +0 -695
  23. package/lib/hc-basic.umd.element-ui1680231905275.js +0 -5158
  24. package/lib/hc-basic.umd.element-ui1680231905276.js +0 -14912
  25. package/lib/hc-basic.umd.element-ui1680231905278.js +0 -3453
  26. package/lib/hc-basic.umd.hc-basic.umd.js +0 -3822
  27. package/lib/hc-basic.umd.min.async-validator1680231905116.js +0 -1
  28. package/lib/hc-basic.umd.min.axios1680231905116.js +0 -1
  29. package/lib/hc-basic.umd.min.babel-runtime1680231905115.js +0 -1
  30. package/lib/hc-basic.umd.min.crypto-js1680231905116.js +0 -18
  31. package/lib/hc-basic.umd.min.element-ui1680231905113.js +0 -1
  32. package/lib/hc-basic.umd.min.element-ui1680231905114.js +0 -9
  33. package/lib/hc-basic.umd.min.element-ui1680231905116.js +0 -1
  34. package/lib/hc-basic.umd.min.hc-basic.umd.min.js +0 -1
  35. package/lib/hc-basic.umd.min.resize-observer-polyfill1680231905114.js +0 -1
  36. package/lib/hc-basic.umd.min.vendors~hc-basic.umd.min.js +0 -16
  37. package/lib/hc-basic.umd.resize-observer-polyfill1680231905275.js +0 -941
  38. package/lib/hc-basic.umd.vendors~hc-basic.umd.js +0 -2911
  39. /package/lib/{css/hc-basic.common.596515ce.css → hc-basic.css} +0 -0
@@ -1,3453 +0,0 @@
1
- ((typeof self !== 'undefined' ? self : this)["webpackJsonphc_basic"] = (typeof self !== 'undefined' ? self : this)["webpackJsonphc_basic"] || []).push([[7],{
2
-
3
- /***/ "4726":
4
- /***/ (function(module, exports, __webpack_require__) {
5
-
6
- module.exports =
7
- /******/ (function(modules) { // webpackBootstrap
8
- /******/ // The module cache
9
- /******/ var installedModules = {};
10
- /******/
11
- /******/ // The require function
12
- /******/ function __webpack_require__(moduleId) {
13
- /******/
14
- /******/ // Check if module is in cache
15
- /******/ if(installedModules[moduleId]) {
16
- /******/ return installedModules[moduleId].exports;
17
- /******/ }
18
- /******/ // Create a new module (and put it into the cache)
19
- /******/ var module = installedModules[moduleId] = {
20
- /******/ i: moduleId,
21
- /******/ l: false,
22
- /******/ exports: {}
23
- /******/ };
24
- /******/
25
- /******/ // Execute the module function
26
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
27
- /******/
28
- /******/ // Flag the module as loaded
29
- /******/ module.l = true;
30
- /******/
31
- /******/ // Return the exports of the module
32
- /******/ return module.exports;
33
- /******/ }
34
- /******/
35
- /******/
36
- /******/ // expose the modules object (__webpack_modules__)
37
- /******/ __webpack_require__.m = modules;
38
- /******/
39
- /******/ // expose the module cache
40
- /******/ __webpack_require__.c = installedModules;
41
- /******/
42
- /******/ // define getter function for harmony exports
43
- /******/ __webpack_require__.d = function(exports, name, getter) {
44
- /******/ if(!__webpack_require__.o(exports, name)) {
45
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
46
- /******/ }
47
- /******/ };
48
- /******/
49
- /******/ // define __esModule on exports
50
- /******/ __webpack_require__.r = function(exports) {
51
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
52
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
53
- /******/ }
54
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
55
- /******/ };
56
- /******/
57
- /******/ // create a fake namespace object
58
- /******/ // mode & 1: value is a module id, require it
59
- /******/ // mode & 2: merge all properties of value into the ns
60
- /******/ // mode & 4: return value when already ns object
61
- /******/ // mode & 8|1: behave like require
62
- /******/ __webpack_require__.t = function(value, mode) {
63
- /******/ if(mode & 1) value = __webpack_require__(value);
64
- /******/ if(mode & 8) return value;
65
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
66
- /******/ var ns = Object.create(null);
67
- /******/ __webpack_require__.r(ns);
68
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
69
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
70
- /******/ return ns;
71
- /******/ };
72
- /******/
73
- /******/ // getDefaultExport function for compatibility with non-harmony modules
74
- /******/ __webpack_require__.n = function(module) {
75
- /******/ var getter = module && module.__esModule ?
76
- /******/ function getDefault() { return module['default']; } :
77
- /******/ function getModuleExports() { return module; };
78
- /******/ __webpack_require__.d(getter, 'a', getter);
79
- /******/ return getter;
80
- /******/ };
81
- /******/
82
- /******/ // Object.prototype.hasOwnProperty.call
83
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
84
- /******/
85
- /******/ // __webpack_public_path__
86
- /******/ __webpack_require__.p = "/dist/";
87
- /******/
88
- /******/
89
- /******/ // Load entry module and return exports
90
- /******/ return __webpack_require__(__webpack_require__.s = 61);
91
- /******/ })
92
- /************************************************************************/
93
- /******/ ({
94
-
95
- /***/ 0:
96
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
97
-
98
- "use strict";
99
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
100
- /* globals __VUE_SSR_CONTEXT__ */
101
-
102
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
103
- // This module is a runtime utility for cleaner component module output and will
104
- // be included in the final webpack user bundle.
105
-
106
- function normalizeComponent (
107
- scriptExports,
108
- render,
109
- staticRenderFns,
110
- functionalTemplate,
111
- injectStyles,
112
- scopeId,
113
- moduleIdentifier, /* server only */
114
- shadowMode /* vue-cli only */
115
- ) {
116
- // Vue.extend constructor export interop
117
- var options = typeof scriptExports === 'function'
118
- ? scriptExports.options
119
- : scriptExports
120
-
121
- // render functions
122
- if (render) {
123
- options.render = render
124
- options.staticRenderFns = staticRenderFns
125
- options._compiled = true
126
- }
127
-
128
- // functional template
129
- if (functionalTemplate) {
130
- options.functional = true
131
- }
132
-
133
- // scopedId
134
- if (scopeId) {
135
- options._scopeId = 'data-v-' + scopeId
136
- }
137
-
138
- var hook
139
- if (moduleIdentifier) { // server build
140
- hook = function (context) {
141
- // 2.3 injection
142
- context =
143
- context || // cached call
144
- (this.$vnode && this.$vnode.ssrContext) || // stateful
145
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
146
- // 2.2 with runInNewContext: true
147
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
148
- context = __VUE_SSR_CONTEXT__
149
- }
150
- // inject component styles
151
- if (injectStyles) {
152
- injectStyles.call(this, context)
153
- }
154
- // register component module identifier for async chunk inferrence
155
- if (context && context._registeredComponents) {
156
- context._registeredComponents.add(moduleIdentifier)
157
- }
158
- }
159
- // used by ssr in case component is cached and beforeCreate
160
- // never gets called
161
- options._ssrRegister = hook
162
- } else if (injectStyles) {
163
- hook = shadowMode
164
- ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
165
- : injectStyles
166
- }
167
-
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 functioal 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
183
- ? [].concat(existing, hook)
184
- : [hook]
185
- }
186
- }
187
-
188
- return {
189
- exports: scriptExports,
190
- options: options
191
- }
192
- }
193
-
194
-
195
- /***/ }),
196
-
197
- /***/ 15:
198
- /***/ (function(module, exports) {
199
-
200
- module.exports = __webpack_require__("14e9");
201
-
202
- /***/ }),
203
-
204
- /***/ 18:
205
- /***/ (function(module, exports) {
206
-
207
- module.exports = __webpack_require__("dcdc");
208
-
209
- /***/ }),
210
-
211
- /***/ 21:
212
- /***/ (function(module, exports) {
213
-
214
- module.exports = __webpack_require__("d397");
215
-
216
- /***/ }),
217
-
218
- /***/ 26:
219
- /***/ (function(module, exports) {
220
-
221
- module.exports = __webpack_require__("92fa");
222
-
223
- /***/ }),
224
-
225
- /***/ 3:
226
- /***/ (function(module, exports) {
227
-
228
- module.exports = __webpack_require__("8122");
229
-
230
- /***/ }),
231
-
232
- /***/ 31:
233
- /***/ (function(module, exports) {
234
-
235
- module.exports = __webpack_require__("2a5e");
236
-
237
- /***/ }),
238
-
239
- /***/ 41:
240
- /***/ (function(module, exports) {
241
-
242
- module.exports = __webpack_require__("e452");
243
-
244
- /***/ }),
245
-
246
- /***/ 52:
247
- /***/ (function(module, exports) {
248
-
249
- module.exports = __webpack_require__("f494");
250
-
251
- /***/ }),
252
-
253
- /***/ 6:
254
- /***/ (function(module, exports) {
255
-
256
- module.exports = __webpack_require__("6b7c");
257
-
258
- /***/ }),
259
-
260
- /***/ 61:
261
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
262
-
263
- "use strict";
264
- __webpack_require__.r(__webpack_exports__);
265
-
266
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
267
- var cascader_panelvue_type_template_id_34932346_render = function() {
268
- var _vm = this
269
- var _h = _vm.$createElement
270
- var _c = _vm._self._c || _h
271
- return _c(
272
- "div",
273
- {
274
- class: ["el-cascader-panel", _vm.border && "is-bordered"],
275
- on: { keydown: _vm.handleKeyDown }
276
- },
277
- _vm._l(_vm.menus, function(menu, index) {
278
- return _c("cascader-menu", {
279
- key: index,
280
- ref: "menu",
281
- refInFor: true,
282
- attrs: { index: index, nodes: menu }
283
- })
284
- }),
285
- 1
286
- )
287
- }
288
- var staticRenderFns = []
289
- cascader_panelvue_type_template_id_34932346_render._withStripped = true
290
-
291
-
292
- // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
293
-
294
- // EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props"
295
- var external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(26);
296
- var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_);
297
-
298
- // EXTERNAL MODULE: external "element-ui/lib/scrollbar"
299
- var scrollbar_ = __webpack_require__(15);
300
- var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
301
-
302
- // EXTERNAL MODULE: external "element-ui/lib/checkbox"
303
- var checkbox_ = __webpack_require__(18);
304
- var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
305
-
306
- // EXTERNAL MODULE: external "element-ui/lib/radio"
307
- var radio_ = __webpack_require__(52);
308
- var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
309
-
310
- // EXTERNAL MODULE: external "element-ui/lib/utils/util"
311
- var util_ = __webpack_require__(3);
312
-
313
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
314
-
315
-
316
-
317
-
318
-
319
-
320
- var stopPropagation = function stopPropagation(e) {
321
- return e.stopPropagation();
322
- };
323
-
324
- /* harmony default export */ var cascader_nodevue_type_script_lang_js_ = ({
325
- inject: ['panel'],
326
-
327
- components: {
328
- ElCheckbox: checkbox_default.a,
329
- ElRadio: radio_default.a
330
- },
331
-
332
- props: {
333
- node: {
334
- required: true
335
- },
336
- nodeId: String
337
- },
338
-
339
- computed: {
340
- config: function config() {
341
- return this.panel.config;
342
- },
343
- isLeaf: function isLeaf() {
344
- return this.node.isLeaf;
345
- },
346
- isDisabled: function isDisabled() {
347
- return this.node.isDisabled;
348
- },
349
- checkedValue: function checkedValue() {
350
- return this.panel.checkedValue;
351
- },
352
- isChecked: function isChecked() {
353
- return this.node.isSameNode(this.checkedValue);
354
- },
355
- inActivePath: function inActivePath() {
356
- return this.isInPath(this.panel.activePath);
357
- },
358
- inCheckedPath: function inCheckedPath() {
359
- var _this = this;
360
-
361
- if (!this.config.checkStrictly) return false;
362
-
363
- return this.panel.checkedNodePaths.some(function (checkedPath) {
364
- return _this.isInPath(checkedPath);
365
- });
366
- },
367
- value: function value() {
368
- return this.node.getValueByOption();
369
- }
370
- },
371
-
372
- methods: {
373
- handleExpand: function handleExpand() {
374
- var _this2 = this;
375
-
376
- var panel = this.panel,
377
- node = this.node,
378
- isDisabled = this.isDisabled,
379
- config = this.config;
380
- var multiple = config.multiple,
381
- checkStrictly = config.checkStrictly;
382
-
383
-
384
- if (!checkStrictly && isDisabled || node.loading) return;
385
-
386
- if (config.lazy && !node.loaded) {
387
- panel.lazyLoad(node, function () {
388
- // do not use cached leaf value here, invoke this.isLeaf to get new value.
389
- var isLeaf = _this2.isLeaf;
390
-
391
-
392
- if (!isLeaf) _this2.handleExpand();
393
- if (multiple) {
394
- // if leaf sync checked state, else clear checked state
395
- var checked = isLeaf ? node.checked : false;
396
- _this2.handleMultiCheckChange(checked);
397
- }
398
- });
399
- } else {
400
- panel.handleExpand(node);
401
- }
402
- },
403
- handleCheckChange: function handleCheckChange() {
404
- var panel = this.panel,
405
- value = this.value,
406
- node = this.node;
407
-
408
- panel.handleCheckChange(value);
409
- panel.handleExpand(node);
410
- },
411
- handleMultiCheckChange: function handleMultiCheckChange(checked) {
412
- this.node.doCheck(checked);
413
- this.panel.calculateMultiCheckedValue();
414
- },
415
- isInPath: function isInPath(pathNodes) {
416
- var node = this.node;
417
-
418
- var selectedPathNode = pathNodes[node.level - 1] || {};
419
- return selectedPathNode.uid === node.uid;
420
- },
421
- renderPrefix: function renderPrefix(h) {
422
- var isLeaf = this.isLeaf,
423
- isChecked = this.isChecked,
424
- config = this.config;
425
- var checkStrictly = config.checkStrictly,
426
- multiple = config.multiple;
427
-
428
-
429
- if (multiple) {
430
- return this.renderCheckbox(h);
431
- } else if (checkStrictly) {
432
- return this.renderRadio(h);
433
- } else if (isLeaf && isChecked) {
434
- return this.renderCheckIcon(h);
435
- }
436
-
437
- return null;
438
- },
439
- renderPostfix: function renderPostfix(h) {
440
- var node = this.node,
441
- isLeaf = this.isLeaf;
442
-
443
-
444
- if (node.loading) {
445
- return this.renderLoadingIcon(h);
446
- } else if (!isLeaf) {
447
- return this.renderExpandIcon(h);
448
- }
449
-
450
- return null;
451
- },
452
- renderCheckbox: function renderCheckbox(h) {
453
- var node = this.node,
454
- config = this.config,
455
- isDisabled = this.isDisabled;
456
-
457
- var events = {
458
- on: { change: this.handleMultiCheckChange },
459
- nativeOn: {}
460
- };
461
-
462
- if (config.checkStrictly) {
463
- // when every node is selectable, click event should not trigger expand event.
464
- events.nativeOn.click = stopPropagation;
465
- }
466
-
467
- return h('el-checkbox', external_babel_helper_vue_jsx_merge_props_default()([{
468
- attrs: {
469
- value: node.checked,
470
- indeterminate: node.indeterminate,
471
- disabled: isDisabled
472
- }
473
- }, events]));
474
- },
475
- renderRadio: function renderRadio(h) {
476
- var checkedValue = this.checkedValue,
477
- value = this.value,
478
- isDisabled = this.isDisabled;
479
-
480
- // to keep same reference if value cause radio's checked state is calculated by reference comparision;
481
-
482
- if (Object(util_["isEqual"])(value, checkedValue)) {
483
- value = checkedValue;
484
- }
485
-
486
- return h(
487
- 'el-radio',
488
- {
489
- attrs: {
490
- value: checkedValue,
491
- label: value,
492
- disabled: isDisabled
493
- },
494
- on: {
495
- 'change': this.handleCheckChange
496
- },
497
- nativeOn: {
498
- 'click': stopPropagation
499
- }
500
- },
501
- [h('span')]
502
- );
503
- },
504
- renderCheckIcon: function renderCheckIcon(h) {
505
- return h('i', { 'class': 'el-icon-check el-cascader-node__prefix' });
506
- },
507
- renderLoadingIcon: function renderLoadingIcon(h) {
508
- return h('i', { 'class': 'el-icon-loading el-cascader-node__postfix' });
509
- },
510
- renderExpandIcon: function renderExpandIcon(h) {
511
- return h('i', { 'class': 'el-icon-arrow-right el-cascader-node__postfix' });
512
- },
513
- renderContent: function renderContent(h) {
514
- var panel = this.panel,
515
- node = this.node;
516
-
517
- var render = panel.renderLabelFn;
518
- var vnode = render ? render({ node: node, data: node.data }) : null;
519
-
520
- return h(
521
- 'span',
522
- { 'class': 'el-cascader-node__label' },
523
- [vnode || node.label]
524
- );
525
- }
526
- },
527
-
528
- render: function render(h) {
529
- var _this3 = this;
530
-
531
- var inActivePath = this.inActivePath,
532
- inCheckedPath = this.inCheckedPath,
533
- isChecked = this.isChecked,
534
- isLeaf = this.isLeaf,
535
- isDisabled = this.isDisabled,
536
- config = this.config,
537
- nodeId = this.nodeId;
538
- var expandTrigger = config.expandTrigger,
539
- checkStrictly = config.checkStrictly,
540
- multiple = config.multiple;
541
-
542
- var disabled = !checkStrictly && isDisabled;
543
- var events = { on: {} };
544
-
545
- if (expandTrigger === 'click') {
546
- events.on.click = this.handleExpand;
547
- } else {
548
- events.on.mouseenter = function (e) {
549
- _this3.handleExpand();
550
- _this3.$emit('expand', e);
551
- };
552
- events.on.focus = function (e) {
553
- _this3.handleExpand();
554
- _this3.$emit('expand', e);
555
- };
556
- }
557
- if (isLeaf && !isDisabled && !checkStrictly && !multiple) {
558
- events.on.click = this.handleCheckChange;
559
- }
560
-
561
- return h(
562
- 'li',
563
- external_babel_helper_vue_jsx_merge_props_default()([{
564
- attrs: {
565
- role: 'menuitem',
566
- id: nodeId,
567
- 'aria-expanded': inActivePath,
568
- tabindex: disabled ? null : -1
569
- },
570
- 'class': {
571
- 'el-cascader-node': true,
572
- 'is-selectable': checkStrictly,
573
- 'in-active-path': inActivePath,
574
- 'in-checked-path': inCheckedPath,
575
- 'is-active': isChecked,
576
- 'is-disabled': disabled
577
- }
578
- }, events]),
579
- [this.renderPrefix(h), this.renderContent(h), this.renderPostfix(h)]
580
- );
581
- }
582
- });
583
- // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
584
- /* harmony default export */ var src_cascader_nodevue_type_script_lang_js_ = (cascader_nodevue_type_script_lang_js_);
585
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
586
- var componentNormalizer = __webpack_require__(0);
587
-
588
- // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue
589
- var cascader_node_render, cascader_node_staticRenderFns
590
-
591
-
592
-
593
-
594
- /* normalize component */
595
-
596
- var component = Object(componentNormalizer["a" /* default */])(
597
- src_cascader_nodevue_type_script_lang_js_,
598
- cascader_node_render,
599
- cascader_node_staticRenderFns,
600
- false,
601
- null,
602
- null,
603
- null
604
-
605
- )
606
-
607
- /* hot reload */
608
- if (false) { var api; }
609
- component.options.__file = "packages/cascader-panel/src/cascader-node.vue"
610
- /* harmony default export */ var cascader_node = (component.exports);
611
- // EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
612
- var locale_ = __webpack_require__(6);
613
- var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
614
-
615
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
616
-
617
-
618
-
619
-
620
-
621
-
622
-
623
- /* harmony default export */ var cascader_menuvue_type_script_lang_js_ = ({
624
- name: 'ElCascaderMenu',
625
-
626
- mixins: [locale_default.a],
627
-
628
- inject: ['panel'],
629
-
630
- components: {
631
- ElScrollbar: scrollbar_default.a,
632
- CascaderNode: cascader_node
633
- },
634
-
635
- props: {
636
- nodes: {
637
- type: Array,
638
- required: true
639
- },
640
- index: Number
641
- },
642
-
643
- data: function data() {
644
- return {
645
- activeNode: null,
646
- hoverTimer: null,
647
- id: Object(util_["generateId"])()
648
- };
649
- },
650
-
651
-
652
- computed: {
653
- isEmpty: function isEmpty() {
654
- return !this.nodes.length;
655
- },
656
- menuId: function menuId() {
657
- return 'cascader-menu-' + this.id + '-' + this.index;
658
- }
659
- },
660
-
661
- methods: {
662
- handleExpand: function handleExpand(e) {
663
- this.activeNode = e.target;
664
- },
665
- handleMouseMove: function handleMouseMove(e) {
666
- var activeNode = this.activeNode,
667
- hoverTimer = this.hoverTimer;
668
- var hoverZone = this.$refs.hoverZone;
669
-
670
-
671
- if (!activeNode || !hoverZone) return;
672
-
673
- if (activeNode.contains(e.target)) {
674
- clearTimeout(hoverTimer);
675
-
676
- var _$el$getBoundingClien = this.$el.getBoundingClientRect(),
677
- left = _$el$getBoundingClien.left;
678
-
679
- var startX = e.clientX - left;
680
- var _$el = this.$el,
681
- offsetWidth = _$el.offsetWidth,
682
- offsetHeight = _$el.offsetHeight;
683
-
684
- var top = activeNode.offsetTop;
685
- var bottom = top + activeNode.offsetHeight;
686
-
687
- hoverZone.innerHTML = '\n <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + top + ' L' + offsetWidth + ' 0 V' + top + ' Z" />\n <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + bottom + ' L' + offsetWidth + ' ' + offsetHeight + ' V' + bottom + ' Z" />\n ';
688
- } else if (!hoverTimer) {
689
- this.hoverTimer = setTimeout(this.clearHoverZone, this.panel.config.hoverThreshold);
690
- }
691
- },
692
- clearHoverZone: function clearHoverZone() {
693
- var hoverZone = this.$refs.hoverZone;
694
-
695
- if (!hoverZone) return;
696
- hoverZone.innerHTML = '';
697
- },
698
- renderEmptyText: function renderEmptyText(h) {
699
- return h(
700
- 'div',
701
- { 'class': 'el-cascader-menu__empty-text' },
702
- [this.t('el.cascader.noData')]
703
- );
704
- },
705
- renderNodeList: function renderNodeList(h) {
706
- var menuId = this.menuId;
707
- var isHoverMenu = this.panel.isHoverMenu;
708
-
709
- var events = { on: {} };
710
-
711
- if (isHoverMenu) {
712
- events.on.expand = this.handleExpand;
713
- }
714
-
715
- var nodes = this.nodes.map(function (node, index) {
716
- var hasChildren = node.hasChildren;
717
-
718
- return h('cascader-node', external_babel_helper_vue_jsx_merge_props_default()([{
719
- key: node.uid,
720
- attrs: { node: node,
721
- 'node-id': menuId + '-' + index,
722
- 'aria-haspopup': hasChildren,
723
- 'aria-owns': hasChildren ? menuId : null
724
- }
725
- }, events]));
726
- });
727
-
728
- return [].concat(nodes, [isHoverMenu ? h('svg', { ref: 'hoverZone', 'class': 'el-cascader-menu__hover-zone' }) : null]);
729
- }
730
- },
731
-
732
- render: function render(h) {
733
- var isEmpty = this.isEmpty,
734
- menuId = this.menuId;
735
-
736
- var events = { nativeOn: {} };
737
-
738
- // optimize hover to expand experience (#8010)
739
- if (this.panel.isHoverMenu) {
740
- events.nativeOn.mousemove = this.handleMouseMove;
741
- // events.nativeOn.mouseleave = this.clearHoverZone;
742
- }
743
-
744
- return h(
745
- 'el-scrollbar',
746
- external_babel_helper_vue_jsx_merge_props_default()([{
747
- attrs: {
748
- tag: 'ul',
749
- role: 'menu',
750
- id: menuId,
751
-
752
- 'wrap-class': 'el-cascader-menu__wrap',
753
- 'view-class': {
754
- 'el-cascader-menu__list': true,
755
- 'is-empty': isEmpty
756
- }
757
- },
758
- 'class': 'el-cascader-menu' }, events]),
759
- [isEmpty ? this.renderEmptyText(h) : this.renderNodeList(h)]
760
- );
761
- }
762
- });
763
- // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
764
- /* harmony default export */ var src_cascader_menuvue_type_script_lang_js_ = (cascader_menuvue_type_script_lang_js_);
765
- // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue
766
- var cascader_menu_render, cascader_menu_staticRenderFns
767
-
768
-
769
-
770
-
771
- /* normalize component */
772
-
773
- var cascader_menu_component = Object(componentNormalizer["a" /* default */])(
774
- src_cascader_menuvue_type_script_lang_js_,
775
- cascader_menu_render,
776
- cascader_menu_staticRenderFns,
777
- false,
778
- null,
779
- null,
780
- null
781
-
782
- )
783
-
784
- /* hot reload */
785
- if (false) { var cascader_menu_api; }
786
- cascader_menu_component.options.__file = "packages/cascader-panel/src/cascader-menu.vue"
787
- /* harmony default export */ var cascader_menu = (cascader_menu_component.exports);
788
- // EXTERNAL MODULE: external "element-ui/lib/utils/shared"
789
- var shared_ = __webpack_require__(21);
790
-
791
- // CONCATENATED MODULE: ./packages/cascader-panel/src/node.js
792
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
793
-
794
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
795
-
796
-
797
-
798
-
799
- var uid = 0;
800
-
801
- var node_Node = function () {
802
- function Node(data, config, parentNode) {
803
- _classCallCheck(this, Node);
804
-
805
- this.data = data;
806
- this.config = config;
807
- this.parent = parentNode || null;
808
- this.level = !this.parent ? 1 : this.parent.level + 1;
809
- this.uid = uid++;
810
-
811
- this.initState();
812
- this.initChildren();
813
- }
814
-
815
- Node.prototype.initState = function initState() {
816
- var _config = this.config,
817
- valueKey = _config.value,
818
- labelKey = _config.label;
819
-
820
-
821
- this.value = this.data[valueKey];
822
- this.label = this.data[labelKey];
823
- this.pathNodes = this.calculatePathNodes();
824
- this.path = this.pathNodes.map(function (node) {
825
- return node.value;
826
- });
827
- this.pathLabels = this.pathNodes.map(function (node) {
828
- return node.label;
829
- });
830
-
831
- // lazy load
832
- this.loading = false;
833
- this.loaded = false;
834
- };
835
-
836
- Node.prototype.initChildren = function initChildren() {
837
- var _this = this;
838
-
839
- var config = this.config;
840
-
841
- var childrenKey = config.children;
842
- var childrenData = this.data[childrenKey];
843
- this.hasChildren = Array.isArray(childrenData);
844
- this.children = (childrenData || []).map(function (child) {
845
- return new Node(child, config, _this);
846
- });
847
- };
848
-
849
- Node.prototype.calculatePathNodes = function calculatePathNodes() {
850
- var nodes = [this];
851
- var parent = this.parent;
852
-
853
- while (parent) {
854
- nodes.unshift(parent);
855
- parent = parent.parent;
856
- }
857
-
858
- return nodes;
859
- };
860
-
861
- Node.prototype.getPath = function getPath() {
862
- return this.path;
863
- };
864
-
865
- Node.prototype.getValue = function getValue() {
866
- return this.value;
867
- };
868
-
869
- Node.prototype.getValueByOption = function getValueByOption() {
870
- return this.config.emitPath ? this.getPath() : this.getValue();
871
- };
872
-
873
- Node.prototype.getText = function getText(allLevels, separator) {
874
- return allLevels ? this.pathLabels.join(separator) : this.label;
875
- };
876
-
877
- Node.prototype.isSameNode = function isSameNode(checkedValue) {
878
- var value = this.getValueByOption();
879
- return this.config.multiple && Array.isArray(checkedValue) ? checkedValue.some(function (val) {
880
- return Object(util_["isEqual"])(val, value);
881
- }) : Object(util_["isEqual"])(checkedValue, value);
882
- };
883
-
884
- Node.prototype.broadcast = function broadcast(event) {
885
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
886
- args[_key - 1] = arguments[_key];
887
- }
888
-
889
- var handlerName = 'onParent' + Object(util_["capitalize"])(event);
890
-
891
- this.children.forEach(function (child) {
892
- if (child) {
893
- // bottom up
894
- child.broadcast.apply(child, [event].concat(args));
895
- child[handlerName] && child[handlerName].apply(child, args);
896
- }
897
- });
898
- };
899
-
900
- Node.prototype.emit = function emit(event) {
901
- var parent = this.parent;
902
-
903
- var handlerName = 'onChild' + Object(util_["capitalize"])(event);
904
- if (parent) {
905
- for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
906
- args[_key2 - 1] = arguments[_key2];
907
- }
908
-
909
- parent[handlerName] && parent[handlerName].apply(parent, args);
910
- parent.emit.apply(parent, [event].concat(args));
911
- }
912
- };
913
-
914
- Node.prototype.onParentCheck = function onParentCheck(checked) {
915
- if (!this.isDisabled) {
916
- this.setCheckState(checked);
917
- }
918
- };
919
-
920
- Node.prototype.onChildCheck = function onChildCheck() {
921
- var children = this.children;
922
-
923
- var validChildren = children.filter(function (child) {
924
- return !child.isDisabled;
925
- });
926
- var checked = validChildren.length ? validChildren.every(function (child) {
927
- return child.checked;
928
- }) : false;
929
-
930
- this.setCheckState(checked);
931
- };
932
-
933
- Node.prototype.setCheckState = function setCheckState(checked) {
934
- var totalNum = this.children.length;
935
- var checkedNum = this.children.reduce(function (c, p) {
936
- var num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;
937
- return c + num;
938
- }, 0);
939
-
940
- this.checked = checked;
941
- this.indeterminate = checkedNum !== totalNum && checkedNum > 0;
942
- };
943
-
944
- Node.prototype.syncCheckState = function syncCheckState(checkedValue) {
945
- var value = this.getValueByOption();
946
- var checked = this.isSameNode(checkedValue, value);
947
-
948
- this.doCheck(checked);
949
- };
950
-
951
- Node.prototype.doCheck = function doCheck(checked) {
952
- if (this.checked !== checked) {
953
- if (this.config.checkStrictly) {
954
- this.checked = checked;
955
- } else {
956
- // bottom up to unify the calculation of the indeterminate state
957
- this.broadcast('check', checked);
958
- this.setCheckState(checked);
959
- this.emit('check');
960
- }
961
- }
962
- };
963
-
964
- _createClass(Node, [{
965
- key: 'isDisabled',
966
- get: function get() {
967
- var data = this.data,
968
- parent = this.parent,
969
- config = this.config;
970
-
971
- var disabledKey = config.disabled;
972
- var checkStrictly = config.checkStrictly;
973
-
974
- return data[disabledKey] || !checkStrictly && parent && parent.isDisabled;
975
- }
976
- }, {
977
- key: 'isLeaf',
978
- get: function get() {
979
- var data = this.data,
980
- loaded = this.loaded,
981
- hasChildren = this.hasChildren,
982
- children = this.children;
983
- var _config2 = this.config,
984
- lazy = _config2.lazy,
985
- leafKey = _config2.leaf;
986
-
987
- if (lazy) {
988
- var isLeaf = Object(shared_["isDef"])(data[leafKey]) ? data[leafKey] : loaded ? !children.length : false;
989
- this.hasChildren = !isLeaf;
990
- return isLeaf;
991
- }
992
- return !hasChildren;
993
- }
994
- }]);
995
-
996
- return Node;
997
- }();
998
-
999
- /* harmony default export */ var src_node = (node_Node);
1000
- // CONCATENATED MODULE: ./packages/cascader-panel/src/store.js
1001
- function store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1002
-
1003
-
1004
-
1005
-
1006
- var flatNodes = function flatNodes(data, leafOnly) {
1007
- return data.reduce(function (res, node) {
1008
- if (node.isLeaf) {
1009
- res.push(node);
1010
- } else {
1011
- !leafOnly && res.push(node);
1012
- res = res.concat(flatNodes(node.children, leafOnly));
1013
- }
1014
- return res;
1015
- }, []);
1016
- };
1017
-
1018
- var store_Store = function () {
1019
- function Store(data, config) {
1020
- store_classCallCheck(this, Store);
1021
-
1022
- this.config = config;
1023
- this.initNodes(data);
1024
- }
1025
-
1026
- Store.prototype.initNodes = function initNodes(data) {
1027
- var _this = this;
1028
-
1029
- data = Object(util_["coerceTruthyValueToArray"])(data);
1030
- this.nodes = data.map(function (nodeData) {
1031
- return new src_node(nodeData, _this.config);
1032
- });
1033
- this.flattedNodes = this.getFlattedNodes(false, false);
1034
- this.leafNodes = this.getFlattedNodes(true, false);
1035
- };
1036
-
1037
- Store.prototype.appendNode = function appendNode(nodeData, parentNode) {
1038
- var node = new src_node(nodeData, this.config, parentNode);
1039
- var children = parentNode ? parentNode.children : this.nodes;
1040
-
1041
- children.push(node);
1042
- };
1043
-
1044
- Store.prototype.appendNodes = function appendNodes(nodeDataList, parentNode) {
1045
- var _this2 = this;
1046
-
1047
- nodeDataList = Object(util_["coerceTruthyValueToArray"])(nodeDataList);
1048
- nodeDataList.forEach(function (nodeData) {
1049
- return _this2.appendNode(nodeData, parentNode);
1050
- });
1051
- };
1052
-
1053
- Store.prototype.getNodes = function getNodes() {
1054
- return this.nodes;
1055
- };
1056
-
1057
- Store.prototype.getFlattedNodes = function getFlattedNodes(leafOnly) {
1058
- var cached = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1059
-
1060
- var cachedNodes = leafOnly ? this.leafNodes : this.flattedNodes;
1061
- return cached ? cachedNodes : flatNodes(this.nodes, leafOnly);
1062
- };
1063
-
1064
- Store.prototype.getNodeByValue = function getNodeByValue(value) {
1065
- var nodes = this.getFlattedNodes(false, !this.config.lazy).filter(function (node) {
1066
- return Object(util_["valueEquals"])(node.path, value) || node.value === value;
1067
- });
1068
- return nodes && nodes.length ? nodes[0] : null;
1069
- };
1070
-
1071
- return Store;
1072
- }();
1073
-
1074
- /* harmony default export */ var src_store = (store_Store);
1075
- // EXTERNAL MODULE: external "element-ui/lib/utils/merge"
1076
- var merge_ = __webpack_require__(9);
1077
- var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
1078
-
1079
- // EXTERNAL MODULE: external "element-ui/lib/utils/aria-utils"
1080
- var aria_utils_ = __webpack_require__(41);
1081
- var aria_utils_default = /*#__PURE__*/__webpack_require__.n(aria_utils_);
1082
-
1083
- // EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
1084
- var scroll_into_view_ = __webpack_require__(31);
1085
- var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
1086
-
1087
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
1088
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
1089
-
1090
- //
1091
- //
1092
- //
1093
- //
1094
- //
1095
- //
1096
- //
1097
- //
1098
- //
1099
- //
1100
- //
1101
- //
1102
- //
1103
- //
1104
- //
1105
- //
1106
-
1107
-
1108
-
1109
-
1110
-
1111
-
1112
-
1113
-
1114
- var KeyCode = aria_utils_default.a.keys;
1115
-
1116
- var DefaultProps = {
1117
- expandTrigger: 'click', // or hover
1118
- multiple: false,
1119
- checkStrictly: false, // whether all nodes can be selected
1120
- emitPath: true, // wether to emit an array of all levels value in which node is located
1121
- lazy: false,
1122
- lazyLoad: util_["noop"],
1123
- value: 'value',
1124
- label: 'label',
1125
- children: 'children',
1126
- leaf: 'leaf',
1127
- disabled: 'disabled',
1128
- hoverThreshold: 500
1129
- };
1130
-
1131
- var cascader_panelvue_type_script_lang_js_isLeaf = function isLeaf(el) {
1132
- return !el.getAttribute('aria-owns');
1133
- };
1134
-
1135
- var getSibling = function getSibling(el, distance) {
1136
- var parentNode = el.parentNode;
1137
-
1138
- if (parentNode) {
1139
- var siblings = parentNode.querySelectorAll('.el-cascader-node[tabindex="-1"]');
1140
- var index = Array.prototype.indexOf.call(siblings, el);
1141
- return siblings[index + distance] || null;
1142
- }
1143
- return null;
1144
- };
1145
-
1146
- var getMenuIndex = function getMenuIndex(el, distance) {
1147
- if (!el) return;
1148
- var pieces = el.id.split('-');
1149
- return Number(pieces[pieces.length - 2]);
1150
- };
1151
-
1152
- var focusNode = function focusNode(el) {
1153
- if (!el) return;
1154
- el.focus();
1155
- !cascader_panelvue_type_script_lang_js_isLeaf(el) && el.click();
1156
- };
1157
-
1158
- var checkNode = function checkNode(el) {
1159
- if (!el) return;
1160
-
1161
- var input = el.querySelector('input');
1162
- if (input) {
1163
- input.click();
1164
- } else if (cascader_panelvue_type_script_lang_js_isLeaf(el)) {
1165
- el.click();
1166
- }
1167
- };
1168
-
1169
- /* harmony default export */ var cascader_panelvue_type_script_lang_js_ = ({
1170
- name: 'ElCascaderPanel',
1171
-
1172
- components: {
1173
- CascaderMenu: cascader_menu
1174
- },
1175
-
1176
- props: {
1177
- value: {},
1178
- options: Array,
1179
- props: Object,
1180
- border: {
1181
- type: Boolean,
1182
- default: true
1183
- },
1184
- renderLabel: Function
1185
- },
1186
-
1187
- provide: function provide() {
1188
- return {
1189
- panel: this
1190
- };
1191
- },
1192
- data: function data() {
1193
- return {
1194
- checkedValue: null,
1195
- checkedNodePaths: [],
1196
- store: [],
1197
- menus: [],
1198
- activePath: [],
1199
- loadCount: 0
1200
- };
1201
- },
1202
-
1203
-
1204
- computed: {
1205
- config: function config() {
1206
- return merge_default()(_extends({}, DefaultProps), this.props || {});
1207
- },
1208
- multiple: function multiple() {
1209
- return this.config.multiple;
1210
- },
1211
- checkStrictly: function checkStrictly() {
1212
- return this.config.checkStrictly;
1213
- },
1214
- leafOnly: function leafOnly() {
1215
- return !this.checkStrictly;
1216
- },
1217
- isHoverMenu: function isHoverMenu() {
1218
- return this.config.expandTrigger === 'hover';
1219
- },
1220
- renderLabelFn: function renderLabelFn() {
1221
- return this.renderLabel || this.$scopedSlots.default;
1222
- }
1223
- },
1224
-
1225
- watch: {
1226
- value: function value() {
1227
- this.syncCheckedValue();
1228
- this.checkStrictly && this.calculateCheckedNodePaths();
1229
- },
1230
-
1231
- options: {
1232
- handler: function handler() {
1233
- this.initStore();
1234
- },
1235
- immediate: true,
1236
- deep: true
1237
- },
1238
- checkedValue: function checkedValue(val) {
1239
- if (!Object(util_["isEqual"])(val, this.value)) {
1240
- this.checkStrictly && this.calculateCheckedNodePaths();
1241
- this.$emit('input', val);
1242
- this.$emit('change', val);
1243
- }
1244
- }
1245
- },
1246
-
1247
- mounted: function mounted() {
1248
- if (!this.isEmptyValue(this.value)) {
1249
- this.syncCheckedValue();
1250
- }
1251
- },
1252
-
1253
-
1254
- methods: {
1255
- initStore: function initStore() {
1256
- var config = this.config,
1257
- options = this.options;
1258
-
1259
- if (config.lazy && Object(util_["isEmpty"])(options)) {
1260
- this.lazyLoad();
1261
- } else {
1262
- this.store = new src_store(options, config);
1263
- this.menus = [this.store.getNodes()];
1264
- this.syncMenuState();
1265
- }
1266
- },
1267
- syncCheckedValue: function syncCheckedValue() {
1268
- var value = this.value,
1269
- checkedValue = this.checkedValue;
1270
-
1271
- if (!Object(util_["isEqual"])(value, checkedValue)) {
1272
- this.activePath = [];
1273
- this.checkedValue = value;
1274
- this.syncMenuState();
1275
- }
1276
- },
1277
- syncMenuState: function syncMenuState() {
1278
- var multiple = this.multiple,
1279
- checkStrictly = this.checkStrictly;
1280
-
1281
- this.syncActivePath();
1282
- multiple && this.syncMultiCheckState();
1283
- checkStrictly && this.calculateCheckedNodePaths();
1284
- this.$nextTick(this.scrollIntoView);
1285
- },
1286
- syncMultiCheckState: function syncMultiCheckState() {
1287
- var _this = this;
1288
-
1289
- var nodes = this.getFlattedNodes(this.leafOnly);
1290
-
1291
- nodes.forEach(function (node) {
1292
- node.syncCheckState(_this.checkedValue);
1293
- });
1294
- },
1295
- isEmptyValue: function isEmptyValue(val) {
1296
- var multiple = this.multiple,
1297
- config = this.config;
1298
- var emitPath = config.emitPath;
1299
-
1300
- if (multiple || emitPath) {
1301
- return Object(util_["isEmpty"])(val);
1302
- }
1303
- return false;
1304
- },
1305
- syncActivePath: function syncActivePath() {
1306
- var _this2 = this;
1307
-
1308
- var store = this.store,
1309
- multiple = this.multiple,
1310
- activePath = this.activePath,
1311
- checkedValue = this.checkedValue;
1312
-
1313
-
1314
- if (!Object(util_["isEmpty"])(activePath)) {
1315
- var nodes = activePath.map(function (node) {
1316
- return _this2.getNodeByValue(node.getValue());
1317
- });
1318
- this.expandNodes(nodes);
1319
- } else if (!this.isEmptyValue(checkedValue)) {
1320
- var value = multiple ? checkedValue[0] : checkedValue;
1321
- var checkedNode = this.getNodeByValue(value) || {};
1322
- var _nodes = (checkedNode.pathNodes || []).slice(0, -1);
1323
- this.expandNodes(_nodes);
1324
- } else {
1325
- this.activePath = [];
1326
- this.menus = [store.getNodes()];
1327
- }
1328
- },
1329
- expandNodes: function expandNodes(nodes) {
1330
- var _this3 = this;
1331
-
1332
- nodes.forEach(function (node) {
1333
- return _this3.handleExpand(node, true /* silent */);
1334
- });
1335
- },
1336
- calculateCheckedNodePaths: function calculateCheckedNodePaths() {
1337
- var _this4 = this;
1338
-
1339
- var checkedValue = this.checkedValue,
1340
- multiple = this.multiple;
1341
-
1342
- var checkedValues = multiple ? Object(util_["coerceTruthyValueToArray"])(checkedValue) : [checkedValue];
1343
- this.checkedNodePaths = checkedValues.map(function (v) {
1344
- var checkedNode = _this4.getNodeByValue(v);
1345
- return checkedNode ? checkedNode.pathNodes : [];
1346
- });
1347
- },
1348
- handleKeyDown: function handleKeyDown(e) {
1349
- var target = e.target,
1350
- keyCode = e.keyCode;
1351
-
1352
-
1353
- switch (keyCode) {
1354
- case KeyCode.up:
1355
- var prev = getSibling(target, -1);
1356
- focusNode(prev);
1357
- break;
1358
- case KeyCode.down:
1359
- var next = getSibling(target, 1);
1360
- focusNode(next);
1361
- break;
1362
- case KeyCode.left:
1363
- var preMenu = this.$refs.menu[getMenuIndex(target) - 1];
1364
- if (preMenu) {
1365
- var expandedNode = preMenu.$el.querySelector('.el-cascader-node[aria-expanded="true"]');
1366
- focusNode(expandedNode);
1367
- }
1368
- break;
1369
- case KeyCode.right:
1370
- var nextMenu = this.$refs.menu[getMenuIndex(target) + 1];
1371
- if (nextMenu) {
1372
- var firstNode = nextMenu.$el.querySelector('.el-cascader-node[tabindex="-1"]');
1373
- focusNode(firstNode);
1374
- }
1375
- break;
1376
- case KeyCode.enter:
1377
- checkNode(target);
1378
- break;
1379
- case KeyCode.esc:
1380
- case KeyCode.tab:
1381
- this.$emit('close');
1382
- break;
1383
- default:
1384
- return;
1385
- }
1386
- },
1387
- handleExpand: function handleExpand(node, silent) {
1388
- var activePath = this.activePath;
1389
- var level = node.level;
1390
-
1391
- var path = activePath.slice(0, level - 1);
1392
- var menus = this.menus.slice(0, level);
1393
-
1394
- if (!node.isLeaf) {
1395
- path.push(node);
1396
- menus.push(node.children);
1397
- }
1398
-
1399
- this.activePath = path;
1400
- this.menus = menus;
1401
-
1402
- if (!silent) {
1403
- var pathValues = path.map(function (node) {
1404
- return node.getValue();
1405
- });
1406
- var activePathValues = activePath.map(function (node) {
1407
- return node.getValue();
1408
- });
1409
- if (!Object(util_["valueEquals"])(pathValues, activePathValues)) {
1410
- this.$emit('active-item-change', pathValues); // Deprecated
1411
- this.$emit('expand-change', pathValues);
1412
- }
1413
- }
1414
- },
1415
- handleCheckChange: function handleCheckChange(value) {
1416
- this.checkedValue = value;
1417
- },
1418
- lazyLoad: function lazyLoad(node, onFullfiled) {
1419
- var _this5 = this;
1420
-
1421
- var config = this.config;
1422
-
1423
- if (!node) {
1424
- node = node || { root: true, level: 0 };
1425
- this.store = new src_store([], config);
1426
- this.menus = [this.store.getNodes()];
1427
- }
1428
- node.loading = true;
1429
- var resolve = function resolve(dataList) {
1430
- var parent = node.root ? null : node;
1431
- dataList && dataList.length && _this5.store.appendNodes(dataList, parent);
1432
- node.loading = false;
1433
- node.loaded = true;
1434
-
1435
- // dispose default value on lazy load mode
1436
- if (Array.isArray(_this5.checkedValue)) {
1437
- var nodeValue = _this5.checkedValue[_this5.loadCount++];
1438
- var valueKey = _this5.config.value;
1439
- var leafKey = _this5.config.leaf;
1440
-
1441
- if (Array.isArray(dataList) && dataList.filter(function (item) {
1442
- return item[valueKey] === nodeValue;
1443
- }).length > 0) {
1444
- var checkedNode = _this5.store.getNodeByValue(nodeValue);
1445
-
1446
- if (!checkedNode.data[leafKey]) {
1447
- _this5.lazyLoad(checkedNode, function () {
1448
- _this5.handleExpand(checkedNode);
1449
- });
1450
- }
1451
-
1452
- if (_this5.loadCount === _this5.checkedValue.length) {
1453
- _this5.$parent.computePresentText();
1454
- }
1455
- }
1456
- }
1457
-
1458
- onFullfiled && onFullfiled(dataList);
1459
- };
1460
- config.lazyLoad(node, resolve);
1461
- },
1462
-
1463
-
1464
- /**
1465
- * public methods
1466
- */
1467
- calculateMultiCheckedValue: function calculateMultiCheckedValue() {
1468
- this.checkedValue = this.getCheckedNodes(this.leafOnly).map(function (node) {
1469
- return node.getValueByOption();
1470
- });
1471
- },
1472
- scrollIntoView: function scrollIntoView() {
1473
- if (this.$isServer) return;
1474
-
1475
- var menus = this.$refs.menu || [];
1476
- menus.forEach(function (menu) {
1477
- var menuElement = menu.$el;
1478
- if (menuElement) {
1479
- var container = menuElement.querySelector('.el-scrollbar__wrap');
1480
- var activeNode = menuElement.querySelector('.el-cascader-node.is-active') || menuElement.querySelector('.el-cascader-node.in-active-path');
1481
- scroll_into_view_default()(container, activeNode);
1482
- }
1483
- });
1484
- },
1485
- getNodeByValue: function getNodeByValue(val) {
1486
- return this.store.getNodeByValue(val);
1487
- },
1488
- getFlattedNodes: function getFlattedNodes(leafOnly) {
1489
- var cached = !this.config.lazy;
1490
- return this.store.getFlattedNodes(leafOnly, cached);
1491
- },
1492
- getCheckedNodes: function getCheckedNodes(leafOnly) {
1493
- var checkedValue = this.checkedValue,
1494
- multiple = this.multiple;
1495
-
1496
- if (multiple) {
1497
- var nodes = this.getFlattedNodes(leafOnly);
1498
- return nodes.filter(function (node) {
1499
- return node.checked;
1500
- });
1501
- } else {
1502
- return this.isEmptyValue(checkedValue) ? [] : [this.getNodeByValue(checkedValue)];
1503
- }
1504
- },
1505
- clearCheckedNodes: function clearCheckedNodes() {
1506
- var config = this.config,
1507
- leafOnly = this.leafOnly;
1508
- var multiple = config.multiple,
1509
- emitPath = config.emitPath;
1510
-
1511
- if (multiple) {
1512
- this.getCheckedNodes(leafOnly).filter(function (node) {
1513
- return !node.isDisabled;
1514
- }).forEach(function (node) {
1515
- return node.doCheck(false);
1516
- });
1517
- this.calculateMultiCheckedValue();
1518
- } else {
1519
- this.checkedValue = emitPath ? [] : null;
1520
- }
1521
- }
1522
- }
1523
- });
1524
- // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
1525
- /* harmony default export */ var src_cascader_panelvue_type_script_lang_js_ = (cascader_panelvue_type_script_lang_js_);
1526
- // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue
1527
-
1528
-
1529
-
1530
-
1531
-
1532
- /* normalize component */
1533
-
1534
- var cascader_panel_component = Object(componentNormalizer["a" /* default */])(
1535
- src_cascader_panelvue_type_script_lang_js_,
1536
- cascader_panelvue_type_template_id_34932346_render,
1537
- staticRenderFns,
1538
- false,
1539
- null,
1540
- null,
1541
- null
1542
-
1543
- )
1544
-
1545
- /* hot reload */
1546
- if (false) { var cascader_panel_api; }
1547
- cascader_panel_component.options.__file = "packages/cascader-panel/src/cascader-panel.vue"
1548
- /* harmony default export */ var cascader_panel = (cascader_panel_component.exports);
1549
- // CONCATENATED MODULE: ./packages/cascader-panel/index.js
1550
-
1551
-
1552
- /* istanbul ignore next */
1553
- cascader_panel.install = function (Vue) {
1554
- Vue.component(cascader_panel.name, cascader_panel);
1555
- };
1556
-
1557
- /* harmony default export */ var packages_cascader_panel = __webpack_exports__["default"] = (cascader_panel);
1558
-
1559
- /***/ }),
1560
-
1561
- /***/ 9:
1562
- /***/ (function(module, exports) {
1563
-
1564
- module.exports = __webpack_require__("7f4d");
1565
-
1566
- /***/ })
1567
-
1568
- /******/ });
1569
-
1570
- /***/ }),
1571
-
1572
- /***/ "6ac9":
1573
- /***/ (function(module, exports, __webpack_require__) {
1574
-
1575
- module.exports =
1576
- /******/ (function(modules) { // webpackBootstrap
1577
- /******/ // The module cache
1578
- /******/ var installedModules = {};
1579
- /******/
1580
- /******/ // The require function
1581
- /******/ function __webpack_require__(moduleId) {
1582
- /******/
1583
- /******/ // Check if module is in cache
1584
- /******/ if(installedModules[moduleId]) {
1585
- /******/ return installedModules[moduleId].exports;
1586
- /******/ }
1587
- /******/ // Create a new module (and put it into the cache)
1588
- /******/ var module = installedModules[moduleId] = {
1589
- /******/ i: moduleId,
1590
- /******/ l: false,
1591
- /******/ exports: {}
1592
- /******/ };
1593
- /******/
1594
- /******/ // Execute the module function
1595
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
1596
- /******/
1597
- /******/ // Flag the module as loaded
1598
- /******/ module.l = true;
1599
- /******/
1600
- /******/ // Return the exports of the module
1601
- /******/ return module.exports;
1602
- /******/ }
1603
- /******/
1604
- /******/
1605
- /******/ // expose the modules object (__webpack_modules__)
1606
- /******/ __webpack_require__.m = modules;
1607
- /******/
1608
- /******/ // expose the module cache
1609
- /******/ __webpack_require__.c = installedModules;
1610
- /******/
1611
- /******/ // define getter function for harmony exports
1612
- /******/ __webpack_require__.d = function(exports, name, getter) {
1613
- /******/ if(!__webpack_require__.o(exports, name)) {
1614
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
1615
- /******/ }
1616
- /******/ };
1617
- /******/
1618
- /******/ // define __esModule on exports
1619
- /******/ __webpack_require__.r = function(exports) {
1620
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1621
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1622
- /******/ }
1623
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
1624
- /******/ };
1625
- /******/
1626
- /******/ // create a fake namespace object
1627
- /******/ // mode & 1: value is a module id, require it
1628
- /******/ // mode & 2: merge all properties of value into the ns
1629
- /******/ // mode & 4: return value when already ns object
1630
- /******/ // mode & 8|1: behave like require
1631
- /******/ __webpack_require__.t = function(value, mode) {
1632
- /******/ if(mode & 1) value = __webpack_require__(value);
1633
- /******/ if(mode & 8) return value;
1634
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
1635
- /******/ var ns = Object.create(null);
1636
- /******/ __webpack_require__.r(ns);
1637
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
1638
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
1639
- /******/ return ns;
1640
- /******/ };
1641
- /******/
1642
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1643
- /******/ __webpack_require__.n = function(module) {
1644
- /******/ var getter = module && module.__esModule ?
1645
- /******/ function getDefault() { return module['default']; } :
1646
- /******/ function getModuleExports() { return module; };
1647
- /******/ __webpack_require__.d(getter, 'a', getter);
1648
- /******/ return getter;
1649
- /******/ };
1650
- /******/
1651
- /******/ // Object.prototype.hasOwnProperty.call
1652
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
1653
- /******/
1654
- /******/ // __webpack_public_path__
1655
- /******/ __webpack_require__.p = "/dist/";
1656
- /******/
1657
- /******/
1658
- /******/ // Load entry module and return exports
1659
- /******/ return __webpack_require__(__webpack_require__.s = 78);
1660
- /******/ })
1661
- /************************************************************************/
1662
- /******/ ({
1663
-
1664
- /***/ 0:
1665
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1666
-
1667
- "use strict";
1668
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
1669
- /* globals __VUE_SSR_CONTEXT__ */
1670
-
1671
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
1672
- // This module is a runtime utility for cleaner component module output and will
1673
- // be included in the final webpack user bundle.
1674
-
1675
- function normalizeComponent (
1676
- scriptExports,
1677
- render,
1678
- staticRenderFns,
1679
- functionalTemplate,
1680
- injectStyles,
1681
- scopeId,
1682
- moduleIdentifier, /* server only */
1683
- shadowMode /* vue-cli only */
1684
- ) {
1685
- // Vue.extend constructor export interop
1686
- var options = typeof scriptExports === 'function'
1687
- ? scriptExports.options
1688
- : scriptExports
1689
-
1690
- // render functions
1691
- if (render) {
1692
- options.render = render
1693
- options.staticRenderFns = staticRenderFns
1694
- options._compiled = true
1695
- }
1696
-
1697
- // functional template
1698
- if (functionalTemplate) {
1699
- options.functional = true
1700
- }
1701
-
1702
- // scopedId
1703
- if (scopeId) {
1704
- options._scopeId = 'data-v-' + scopeId
1705
- }
1706
-
1707
- var hook
1708
- if (moduleIdentifier) { // server build
1709
- hook = function (context) {
1710
- // 2.3 injection
1711
- context =
1712
- context || // cached call
1713
- (this.$vnode && this.$vnode.ssrContext) || // stateful
1714
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
1715
- // 2.2 with runInNewContext: true
1716
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1717
- context = __VUE_SSR_CONTEXT__
1718
- }
1719
- // inject component styles
1720
- if (injectStyles) {
1721
- injectStyles.call(this, context)
1722
- }
1723
- // register component module identifier for async chunk inferrence
1724
- if (context && context._registeredComponents) {
1725
- context._registeredComponents.add(moduleIdentifier)
1726
- }
1727
- }
1728
- // used by ssr in case component is cached and beforeCreate
1729
- // never gets called
1730
- options._ssrRegister = hook
1731
- } else if (injectStyles) {
1732
- hook = shadowMode
1733
- ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
1734
- : injectStyles
1735
- }
1736
-
1737
- if (hook) {
1738
- if (options.functional) {
1739
- // for template-only hot-reload because in that case the render fn doesn't
1740
- // go through the normalizer
1741
- options._injectStyles = hook
1742
- // register for functioal component in vue file
1743
- var originalRender = options.render
1744
- options.render = function renderWithStyleInjection (h, context) {
1745
- hook.call(context)
1746
- return originalRender(h, context)
1747
- }
1748
- } else {
1749
- // inject component registration as beforeCreate hook
1750
- var existing = options.beforeCreate
1751
- options.beforeCreate = existing
1752
- ? [].concat(existing, hook)
1753
- : [hook]
1754
- }
1755
- }
1756
-
1757
- return {
1758
- exports: scriptExports,
1759
- options: options
1760
- }
1761
- }
1762
-
1763
-
1764
- /***/ }),
1765
-
1766
- /***/ 2:
1767
- /***/ (function(module, exports) {
1768
-
1769
- module.exports = __webpack_require__("5924");
1770
-
1771
- /***/ }),
1772
-
1773
- /***/ 3:
1774
- /***/ (function(module, exports) {
1775
-
1776
- module.exports = __webpack_require__("8122");
1777
-
1778
- /***/ }),
1779
-
1780
- /***/ 5:
1781
- /***/ (function(module, exports) {
1782
-
1783
- module.exports = __webpack_require__("e974");
1784
-
1785
- /***/ }),
1786
-
1787
- /***/ 7:
1788
- /***/ (function(module, exports) {
1789
-
1790
- module.exports = __webpack_require__("8bbf");
1791
-
1792
- /***/ }),
1793
-
1794
- /***/ 78:
1795
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1796
-
1797
- "use strict";
1798
- __webpack_require__.r(__webpack_exports__);
1799
-
1800
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=template&id=52060272&
1801
- var render = function() {
1802
- var _vm = this
1803
- var _h = _vm.$createElement
1804
- var _c = _vm._self._c || _h
1805
- return _c(
1806
- "span",
1807
- [
1808
- _c(
1809
- "transition",
1810
- {
1811
- attrs: { name: _vm.transition },
1812
- on: {
1813
- "after-enter": _vm.handleAfterEnter,
1814
- "after-leave": _vm.handleAfterLeave
1815
- }
1816
- },
1817
- [
1818
- _c(
1819
- "div",
1820
- {
1821
- directives: [
1822
- {
1823
- name: "show",
1824
- rawName: "v-show",
1825
- value: !_vm.disabled && _vm.showPopper,
1826
- expression: "!disabled && showPopper"
1827
- }
1828
- ],
1829
- ref: "popper",
1830
- staticClass: "el-popover el-popper",
1831
- class: [_vm.popperClass, _vm.content && "el-popover--plain"],
1832
- style: { width: _vm.width + "px" },
1833
- attrs: {
1834
- role: "tooltip",
1835
- id: _vm.tooltipId,
1836
- "aria-hidden":
1837
- _vm.disabled || !_vm.showPopper ? "true" : "false"
1838
- }
1839
- },
1840
- [
1841
- _vm.title
1842
- ? _c("div", {
1843
- staticClass: "el-popover__title",
1844
- domProps: { textContent: _vm._s(_vm.title) }
1845
- })
1846
- : _vm._e(),
1847
- _vm._t("default", [_vm._v(_vm._s(_vm.content))])
1848
- ],
1849
- 2
1850
- )
1851
- ]
1852
- ),
1853
- _c(
1854
- "span",
1855
- { ref: "wrapper", staticClass: "el-popover__reference-wrapper" },
1856
- [_vm._t("reference")],
1857
- 2
1858
- )
1859
- ],
1860
- 1
1861
- )
1862
- }
1863
- var staticRenderFns = []
1864
- render._withStripped = true
1865
-
1866
-
1867
- // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=template&id=52060272&
1868
-
1869
- // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
1870
- var vue_popper_ = __webpack_require__(5);
1871
- var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
1872
-
1873
- // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
1874
- var dom_ = __webpack_require__(2);
1875
-
1876
- // EXTERNAL MODULE: external "element-ui/lib/utils/util"
1877
- var util_ = __webpack_require__(3);
1878
-
1879
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=script&lang=js&
1880
- //
1881
- //
1882
- //
1883
- //
1884
- //
1885
- //
1886
- //
1887
- //
1888
- //
1889
- //
1890
- //
1891
- //
1892
- //
1893
- //
1894
- //
1895
- //
1896
- //
1897
- //
1898
- //
1899
- //
1900
- //
1901
- //
1902
- //
1903
- //
1904
- //
1905
-
1906
-
1907
-
1908
-
1909
-
1910
-
1911
- /* harmony default export */ var mainvue_type_script_lang_js_ = ({
1912
- name: 'ElPopover',
1913
-
1914
- mixins: [vue_popper_default.a],
1915
-
1916
- props: {
1917
- trigger: {
1918
- type: String,
1919
- default: 'click',
1920
- validator: function validator(value) {
1921
- return ['click', 'focus', 'hover', 'manual'].indexOf(value) > -1;
1922
- }
1923
- },
1924
- openDelay: {
1925
- type: Number,
1926
- default: 0
1927
- },
1928
- closeDelay: {
1929
- type: Number,
1930
- default: 200
1931
- },
1932
- title: String,
1933
- disabled: Boolean,
1934
- content: String,
1935
- reference: {},
1936
- popperClass: String,
1937
- width: {},
1938
- visibleArrow: {
1939
- default: true
1940
- },
1941
- arrowOffset: {
1942
- type: Number,
1943
- default: 0
1944
- },
1945
- transition: {
1946
- type: String,
1947
- default: 'fade-in-linear'
1948
- },
1949
- tabindex: {
1950
- type: Number,
1951
- default: 0
1952
- }
1953
- },
1954
-
1955
- computed: {
1956
- tooltipId: function tooltipId() {
1957
- return 'el-popover-' + Object(util_["generateId"])();
1958
- }
1959
- },
1960
- watch: {
1961
- showPopper: function showPopper(val) {
1962
- if (this.disabled) {
1963
- return;
1964
- }
1965
- val ? this.$emit('show') : this.$emit('hide');
1966
- }
1967
- },
1968
-
1969
- mounted: function mounted() {
1970
- var _this = this;
1971
-
1972
- var reference = this.referenceElm = this.reference || this.$refs.reference;
1973
- var popper = this.popper || this.$refs.popper;
1974
-
1975
- if (!reference && this.$refs.wrapper.children) {
1976
- reference = this.referenceElm = this.$refs.wrapper.children[0];
1977
- }
1978
- // 可访问性
1979
- if (reference) {
1980
- Object(dom_["addClass"])(reference, 'el-popover__reference');
1981
- reference.setAttribute('aria-describedby', this.tooltipId);
1982
- reference.setAttribute('tabindex', this.tabindex); // tab序列
1983
- popper.setAttribute('tabindex', 0);
1984
-
1985
- if (this.trigger !== 'click') {
1986
- Object(dom_["on"])(reference, 'focusin', function () {
1987
- _this.handleFocus();
1988
- var instance = reference.__vue__;
1989
- if (instance && typeof instance.focus === 'function') {
1990
- instance.focus();
1991
- }
1992
- });
1993
- Object(dom_["on"])(popper, 'focusin', this.handleFocus);
1994
- Object(dom_["on"])(reference, 'focusout', this.handleBlur);
1995
- Object(dom_["on"])(popper, 'focusout', this.handleBlur);
1996
- }
1997
- Object(dom_["on"])(reference, 'keydown', this.handleKeydown);
1998
- Object(dom_["on"])(reference, 'click', this.handleClick);
1999
- }
2000
- if (this.trigger === 'click') {
2001
- Object(dom_["on"])(reference, 'click', this.doToggle);
2002
- Object(dom_["on"])(document, 'click', this.handleDocumentClick);
2003
- } else if (this.trigger === 'hover') {
2004
- Object(dom_["on"])(reference, 'mouseenter', this.handleMouseEnter);
2005
- Object(dom_["on"])(popper, 'mouseenter', this.handleMouseEnter);
2006
- Object(dom_["on"])(reference, 'mouseleave', this.handleMouseLeave);
2007
- Object(dom_["on"])(popper, 'mouseleave', this.handleMouseLeave);
2008
- } else if (this.trigger === 'focus') {
2009
- if (this.tabindex < 0) {
2010
- console.warn('[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key');
2011
- }
2012
- if (reference.querySelector('input, textarea')) {
2013
- Object(dom_["on"])(reference, 'focusin', this.doShow);
2014
- Object(dom_["on"])(reference, 'focusout', this.doClose);
2015
- } else {
2016
- Object(dom_["on"])(reference, 'mousedown', this.doShow);
2017
- Object(dom_["on"])(reference, 'mouseup', this.doClose);
2018
- }
2019
- }
2020
- },
2021
- beforeDestroy: function beforeDestroy() {
2022
- this.cleanup();
2023
- },
2024
- deactivated: function deactivated() {
2025
- this.cleanup();
2026
- },
2027
-
2028
-
2029
- methods: {
2030
- doToggle: function doToggle() {
2031
- this.showPopper = !this.showPopper;
2032
- },
2033
- doShow: function doShow() {
2034
- this.showPopper = true;
2035
- },
2036
- doClose: function doClose() {
2037
- this.showPopper = false;
2038
- },
2039
- handleFocus: function handleFocus() {
2040
- Object(dom_["addClass"])(this.referenceElm, 'focusing');
2041
- if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = true;
2042
- },
2043
- handleClick: function handleClick() {
2044
- Object(dom_["removeClass"])(this.referenceElm, 'focusing');
2045
- },
2046
- handleBlur: function handleBlur() {
2047
- Object(dom_["removeClass"])(this.referenceElm, 'focusing');
2048
- if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = false;
2049
- },
2050
- handleMouseEnter: function handleMouseEnter() {
2051
- var _this2 = this;
2052
-
2053
- clearTimeout(this._timer);
2054
- if (this.openDelay) {
2055
- this._timer = setTimeout(function () {
2056
- _this2.showPopper = true;
2057
- }, this.openDelay);
2058
- } else {
2059
- this.showPopper = true;
2060
- }
2061
- },
2062
- handleKeydown: function handleKeydown(ev) {
2063
- if (ev.keyCode === 27 && this.trigger !== 'manual') {
2064
- // esc
2065
- this.doClose();
2066
- }
2067
- },
2068
- handleMouseLeave: function handleMouseLeave() {
2069
- var _this3 = this;
2070
-
2071
- clearTimeout(this._timer);
2072
- if (this.closeDelay) {
2073
- this._timer = setTimeout(function () {
2074
- _this3.showPopper = false;
2075
- }, this.closeDelay);
2076
- } else {
2077
- this.showPopper = false;
2078
- }
2079
- },
2080
- handleDocumentClick: function handleDocumentClick(e) {
2081
- var reference = this.reference || this.$refs.reference;
2082
- var popper = this.popper || this.$refs.popper;
2083
-
2084
- if (!reference && this.$refs.wrapper.children) {
2085
- reference = this.referenceElm = this.$refs.wrapper.children[0];
2086
- }
2087
- if (!this.$el || !reference || this.$el.contains(e.target) || reference.contains(e.target) || !popper || popper.contains(e.target)) return;
2088
- this.showPopper = false;
2089
- },
2090
- handleAfterEnter: function handleAfterEnter() {
2091
- this.$emit('after-enter');
2092
- },
2093
- handleAfterLeave: function handleAfterLeave() {
2094
- this.$emit('after-leave');
2095
- this.doDestroy();
2096
- },
2097
- cleanup: function cleanup() {
2098
- if (this.openDelay || this.closeDelay) {
2099
- clearTimeout(this._timer);
2100
- }
2101
- }
2102
- },
2103
-
2104
- destroyed: function destroyed() {
2105
- var reference = this.reference;
2106
-
2107
- Object(dom_["off"])(reference, 'click', this.doToggle);
2108
- Object(dom_["off"])(reference, 'mouseup', this.doClose);
2109
- Object(dom_["off"])(reference, 'mousedown', this.doShow);
2110
- Object(dom_["off"])(reference, 'focusin', this.doShow);
2111
- Object(dom_["off"])(reference, 'focusout', this.doClose);
2112
- Object(dom_["off"])(reference, 'mousedown', this.doShow);
2113
- Object(dom_["off"])(reference, 'mouseup', this.doClose);
2114
- Object(dom_["off"])(reference, 'mouseleave', this.handleMouseLeave);
2115
- Object(dom_["off"])(reference, 'mouseenter', this.handleMouseEnter);
2116
- Object(dom_["off"])(document, 'click', this.handleDocumentClick);
2117
- }
2118
- });
2119
- // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=script&lang=js&
2120
- /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
2121
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2122
- var componentNormalizer = __webpack_require__(0);
2123
-
2124
- // CONCATENATED MODULE: ./packages/popover/src/main.vue
2125
-
2126
-
2127
-
2128
-
2129
-
2130
- /* normalize component */
2131
-
2132
- var component = Object(componentNormalizer["a" /* default */])(
2133
- src_mainvue_type_script_lang_js_,
2134
- render,
2135
- staticRenderFns,
2136
- false,
2137
- null,
2138
- null,
2139
- null
2140
-
2141
- )
2142
-
2143
- /* hot reload */
2144
- if (false) { var api; }
2145
- component.options.__file = "packages/popover/src/main.vue"
2146
- /* harmony default export */ var main = (component.exports);
2147
- // CONCATENATED MODULE: ./packages/popover/src/directive.js
2148
- var getReference = function getReference(el, binding, vnode) {
2149
- var _ref = binding.expression ? binding.value : binding.arg;
2150
- var popper = vnode.context.$refs[_ref];
2151
- if (popper) {
2152
- if (Array.isArray(popper)) {
2153
- popper[0].$refs.reference = el;
2154
- } else {
2155
- popper.$refs.reference = el;
2156
- }
2157
- }
2158
- };
2159
-
2160
- /* harmony default export */ var directive = ({
2161
- bind: function bind(el, binding, vnode) {
2162
- getReference(el, binding, vnode);
2163
- },
2164
- inserted: function inserted(el, binding, vnode) {
2165
- getReference(el, binding, vnode);
2166
- }
2167
- });
2168
- // EXTERNAL MODULE: external "vue"
2169
- var external_vue_ = __webpack_require__(7);
2170
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
2171
-
2172
- // CONCATENATED MODULE: ./packages/popover/index.js
2173
-
2174
-
2175
-
2176
-
2177
- external_vue_default.a.directive('popover', directive);
2178
-
2179
- /* istanbul ignore next */
2180
- main.install = function (Vue) {
2181
- Vue.directive('popover', directive);
2182
- Vue.component(main.name, main);
2183
- };
2184
- main.directive = directive;
2185
-
2186
- /* harmony default export */ var popover = __webpack_exports__["default"] = (main);
2187
-
2188
- /***/ })
2189
-
2190
- /******/ });
2191
-
2192
- /***/ }),
2193
-
2194
- /***/ "e450":
2195
- /***/ (function(module, exports, __webpack_require__) {
2196
-
2197
- module.exports =
2198
- /******/ (function(modules) { // webpackBootstrap
2199
- /******/ // The module cache
2200
- /******/ var installedModules = {};
2201
- /******/
2202
- /******/ // The require function
2203
- /******/ function __webpack_require__(moduleId) {
2204
- /******/
2205
- /******/ // Check if module is in cache
2206
- /******/ if(installedModules[moduleId]) {
2207
- /******/ return installedModules[moduleId].exports;
2208
- /******/ }
2209
- /******/ // Create a new module (and put it into the cache)
2210
- /******/ var module = installedModules[moduleId] = {
2211
- /******/ i: moduleId,
2212
- /******/ l: false,
2213
- /******/ exports: {}
2214
- /******/ };
2215
- /******/
2216
- /******/ // Execute the module function
2217
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
2218
- /******/
2219
- /******/ // Flag the module as loaded
2220
- /******/ module.l = true;
2221
- /******/
2222
- /******/ // Return the exports of the module
2223
- /******/ return module.exports;
2224
- /******/ }
2225
- /******/
2226
- /******/
2227
- /******/ // expose the modules object (__webpack_modules__)
2228
- /******/ __webpack_require__.m = modules;
2229
- /******/
2230
- /******/ // expose the module cache
2231
- /******/ __webpack_require__.c = installedModules;
2232
- /******/
2233
- /******/ // define getter function for harmony exports
2234
- /******/ __webpack_require__.d = function(exports, name, getter) {
2235
- /******/ if(!__webpack_require__.o(exports, name)) {
2236
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
2237
- /******/ }
2238
- /******/ };
2239
- /******/
2240
- /******/ // define __esModule on exports
2241
- /******/ __webpack_require__.r = function(exports) {
2242
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2243
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2244
- /******/ }
2245
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
2246
- /******/ };
2247
- /******/
2248
- /******/ // create a fake namespace object
2249
- /******/ // mode & 1: value is a module id, require it
2250
- /******/ // mode & 2: merge all properties of value into the ns
2251
- /******/ // mode & 4: return value when already ns object
2252
- /******/ // mode & 8|1: behave like require
2253
- /******/ __webpack_require__.t = function(value, mode) {
2254
- /******/ if(mode & 1) value = __webpack_require__(value);
2255
- /******/ if(mode & 8) return value;
2256
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
2257
- /******/ var ns = Object.create(null);
2258
- /******/ __webpack_require__.r(ns);
2259
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
2260
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
2261
- /******/ return ns;
2262
- /******/ };
2263
- /******/
2264
- /******/ // getDefaultExport function for compatibility with non-harmony modules
2265
- /******/ __webpack_require__.n = function(module) {
2266
- /******/ var getter = module && module.__esModule ?
2267
- /******/ function getDefault() { return module['default']; } :
2268
- /******/ function getModuleExports() { return module; };
2269
- /******/ __webpack_require__.d(getter, 'a', getter);
2270
- /******/ return getter;
2271
- /******/ };
2272
- /******/
2273
- /******/ // Object.prototype.hasOwnProperty.call
2274
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
2275
- /******/
2276
- /******/ // __webpack_public_path__
2277
- /******/ __webpack_require__.p = "/dist/";
2278
- /******/
2279
- /******/
2280
- /******/ // Load entry module and return exports
2281
- /******/ return __webpack_require__(__webpack_require__.s = 87);
2282
- /******/ })
2283
- /************************************************************************/
2284
- /******/ ({
2285
-
2286
- /***/ 0:
2287
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2288
-
2289
- "use strict";
2290
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
2291
- /* globals __VUE_SSR_CONTEXT__ */
2292
-
2293
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
2294
- // This module is a runtime utility for cleaner component module output and will
2295
- // be included in the final webpack user bundle.
2296
-
2297
- function normalizeComponent (
2298
- scriptExports,
2299
- render,
2300
- staticRenderFns,
2301
- functionalTemplate,
2302
- injectStyles,
2303
- scopeId,
2304
- moduleIdentifier, /* server only */
2305
- shadowMode /* vue-cli only */
2306
- ) {
2307
- // Vue.extend constructor export interop
2308
- var options = typeof scriptExports === 'function'
2309
- ? scriptExports.options
2310
- : scriptExports
2311
-
2312
- // render functions
2313
- if (render) {
2314
- options.render = render
2315
- options.staticRenderFns = staticRenderFns
2316
- options._compiled = true
2317
- }
2318
-
2319
- // functional template
2320
- if (functionalTemplate) {
2321
- options.functional = true
2322
- }
2323
-
2324
- // scopedId
2325
- if (scopeId) {
2326
- options._scopeId = 'data-v-' + scopeId
2327
- }
2328
-
2329
- var hook
2330
- if (moduleIdentifier) { // server build
2331
- hook = function (context) {
2332
- // 2.3 injection
2333
- context =
2334
- context || // cached call
2335
- (this.$vnode && this.$vnode.ssrContext) || // stateful
2336
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
2337
- // 2.2 with runInNewContext: true
2338
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
2339
- context = __VUE_SSR_CONTEXT__
2340
- }
2341
- // inject component styles
2342
- if (injectStyles) {
2343
- injectStyles.call(this, context)
2344
- }
2345
- // register component module identifier for async chunk inferrence
2346
- if (context && context._registeredComponents) {
2347
- context._registeredComponents.add(moduleIdentifier)
2348
- }
2349
- }
2350
- // used by ssr in case component is cached and beforeCreate
2351
- // never gets called
2352
- options._ssrRegister = hook
2353
- } else if (injectStyles) {
2354
- hook = shadowMode
2355
- ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
2356
- : injectStyles
2357
- }
2358
-
2359
- if (hook) {
2360
- if (options.functional) {
2361
- // for template-only hot-reload because in that case the render fn doesn't
2362
- // go through the normalizer
2363
- options._injectStyles = hook
2364
- // register for functioal component in vue file
2365
- var originalRender = options.render
2366
- options.render = function renderWithStyleInjection (h, context) {
2367
- hook.call(context)
2368
- return originalRender(h, context)
2369
- }
2370
- } else {
2371
- // inject component registration as beforeCreate hook
2372
- var existing = options.beforeCreate
2373
- options.beforeCreate = existing
2374
- ? [].concat(existing, hook)
2375
- : [hook]
2376
- }
2377
- }
2378
-
2379
- return {
2380
- exports: scriptExports,
2381
- options: options
2382
- }
2383
- }
2384
-
2385
-
2386
- /***/ }),
2387
-
2388
- /***/ 10:
2389
- /***/ (function(module, exports) {
2390
-
2391
- module.exports = __webpack_require__("f3ad");
2392
-
2393
- /***/ }),
2394
-
2395
- /***/ 2:
2396
- /***/ (function(module, exports) {
2397
-
2398
- module.exports = __webpack_require__("5924");
2399
-
2400
- /***/ }),
2401
-
2402
- /***/ 22:
2403
- /***/ (function(module, exports) {
2404
-
2405
- module.exports = __webpack_require__("12f2");
2406
-
2407
- /***/ }),
2408
-
2409
- /***/ 3:
2410
- /***/ (function(module, exports) {
2411
-
2412
- module.exports = __webpack_require__("8122");
2413
-
2414
- /***/ }),
2415
-
2416
- /***/ 30:
2417
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2418
-
2419
- "use strict";
2420
- /* harmony import */ var element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2421
- /* harmony import */ var element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__);
2422
- /* harmony import */ var element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
2423
- /* harmony import */ var element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_1__);
2424
-
2425
-
2426
-
2427
- /* harmony default export */ __webpack_exports__["a"] = ({
2428
- bind: function bind(el, binding, vnode) {
2429
- var interval = null;
2430
- var startTime = void 0;
2431
- var maxIntervals = Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_1__["isMac"])() ? 100 : 200;
2432
- var handler = function handler() {
2433
- return vnode.context[binding.expression].apply();
2434
- };
2435
- var clear = function clear() {
2436
- if (Date.now() - startTime < maxIntervals) {
2437
- handler();
2438
- }
2439
- clearInterval(interval);
2440
- interval = null;
2441
- };
2442
-
2443
- Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["on"])(el, 'mousedown', function (e) {
2444
- if (e.button !== 0) return;
2445
- startTime = Date.now();
2446
- Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["once"])(document, 'mouseup', clear);
2447
- clearInterval(interval);
2448
- interval = setInterval(handler, maxIntervals);
2449
- });
2450
- }
2451
- });
2452
-
2453
- /***/ }),
2454
-
2455
- /***/ 87:
2456
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2457
-
2458
- "use strict";
2459
- __webpack_require__.r(__webpack_exports__);
2460
-
2461
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
2462
- var render = function() {
2463
- var _vm = this
2464
- var _h = _vm.$createElement
2465
- var _c = _vm._self._c || _h
2466
- return _c(
2467
- "div",
2468
- {
2469
- class: [
2470
- "el-input-number",
2471
- _vm.inputNumberSize ? "el-input-number--" + _vm.inputNumberSize : "",
2472
- { "is-disabled": _vm.inputNumberDisabled },
2473
- { "is-without-controls": !_vm.controls },
2474
- { "is-controls-right": _vm.controlsAtRight }
2475
- ],
2476
- on: {
2477
- dragstart: function($event) {
2478
- $event.preventDefault()
2479
- }
2480
- }
2481
- },
2482
- [
2483
- _vm.controls
2484
- ? _c(
2485
- "span",
2486
- {
2487
- directives: [
2488
- {
2489
- name: "repeat-click",
2490
- rawName: "v-repeat-click",
2491
- value: _vm.decrease,
2492
- expression: "decrease"
2493
- }
2494
- ],
2495
- staticClass: "el-input-number__decrease",
2496
- class: { "is-disabled": _vm.minDisabled },
2497
- attrs: { role: "button" },
2498
- on: {
2499
- keydown: function($event) {
2500
- if (
2501
- !("button" in $event) &&
2502
- _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
2503
- ) {
2504
- return null
2505
- }
2506
- return _vm.decrease($event)
2507
- }
2508
- }
2509
- },
2510
- [
2511
- _c("i", {
2512
- class:
2513
- "el-icon-" + (_vm.controlsAtRight ? "arrow-down" : "minus")
2514
- })
2515
- ]
2516
- )
2517
- : _vm._e(),
2518
- _vm.controls
2519
- ? _c(
2520
- "span",
2521
- {
2522
- directives: [
2523
- {
2524
- name: "repeat-click",
2525
- rawName: "v-repeat-click",
2526
- value: _vm.increase,
2527
- expression: "increase"
2528
- }
2529
- ],
2530
- staticClass: "el-input-number__increase",
2531
- class: { "is-disabled": _vm.maxDisabled },
2532
- attrs: { role: "button" },
2533
- on: {
2534
- keydown: function($event) {
2535
- if (
2536
- !("button" in $event) &&
2537
- _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
2538
- ) {
2539
- return null
2540
- }
2541
- return _vm.increase($event)
2542
- }
2543
- }
2544
- },
2545
- [
2546
- _c("i", {
2547
- class: "el-icon-" + (_vm.controlsAtRight ? "arrow-up" : "plus")
2548
- })
2549
- ]
2550
- )
2551
- : _vm._e(),
2552
- _c("el-input", {
2553
- ref: "input",
2554
- attrs: {
2555
- value: _vm.displayValue,
2556
- placeholder: _vm.placeholder,
2557
- disabled: _vm.inputNumberDisabled,
2558
- size: _vm.inputNumberSize,
2559
- max: _vm.max,
2560
- min: _vm.min,
2561
- name: _vm.name,
2562
- label: _vm.label
2563
- },
2564
- on: {
2565
- blur: _vm.handleBlur,
2566
- focus: _vm.handleFocus,
2567
- input: _vm.handleInput,
2568
- change: _vm.handleInputChange
2569
- },
2570
- nativeOn: {
2571
- keydown: [
2572
- function($event) {
2573
- if (
2574
- !("button" in $event) &&
2575
- _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])
2576
- ) {
2577
- return null
2578
- }
2579
- $event.preventDefault()
2580
- return _vm.increase($event)
2581
- },
2582
- function($event) {
2583
- if (
2584
- !("button" in $event) &&
2585
- _vm._k($event.keyCode, "down", 40, $event.key, [
2586
- "Down",
2587
- "ArrowDown"
2588
- ])
2589
- ) {
2590
- return null
2591
- }
2592
- $event.preventDefault()
2593
- return _vm.decrease($event)
2594
- }
2595
- ]
2596
- }
2597
- })
2598
- ],
2599
- 1
2600
- )
2601
- }
2602
- var staticRenderFns = []
2603
- render._withStripped = true
2604
-
2605
-
2606
- // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
2607
-
2608
- // EXTERNAL MODULE: external "element-ui/lib/input"
2609
- var input_ = __webpack_require__(10);
2610
- var input_default = /*#__PURE__*/__webpack_require__.n(input_);
2611
-
2612
- // EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
2613
- var focus_ = __webpack_require__(22);
2614
- var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
2615
-
2616
- // EXTERNAL MODULE: ./src/directives/repeat-click.js
2617
- var repeat_click = __webpack_require__(30);
2618
-
2619
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
2620
- //
2621
- //
2622
- //
2623
- //
2624
- //
2625
- //
2626
- //
2627
- //
2628
- //
2629
- //
2630
- //
2631
- //
2632
- //
2633
- //
2634
- //
2635
- //
2636
- //
2637
- //
2638
- //
2639
- //
2640
- //
2641
- //
2642
- //
2643
- //
2644
- //
2645
- //
2646
- //
2647
- //
2648
- //
2649
- //
2650
- //
2651
- //
2652
- //
2653
- //
2654
- //
2655
- //
2656
- //
2657
- //
2658
- //
2659
- //
2660
- //
2661
- //
2662
- //
2663
- //
2664
- //
2665
- //
2666
- //
2667
-
2668
-
2669
-
2670
-
2671
-
2672
- /* harmony default export */ var input_numbervue_type_script_lang_js_ = ({
2673
- name: 'ElInputNumber',
2674
- mixins: [focus_default()('input')],
2675
- inject: {
2676
- elForm: {
2677
- default: ''
2678
- },
2679
- elFormItem: {
2680
- default: ''
2681
- }
2682
- },
2683
- directives: {
2684
- repeatClick: repeat_click["a" /* default */]
2685
- },
2686
- components: {
2687
- ElInput: input_default.a
2688
- },
2689
- props: {
2690
- step: {
2691
- type: Number,
2692
- default: 1
2693
- },
2694
- stepStrictly: {
2695
- type: Boolean,
2696
- default: false
2697
- },
2698
- max: {
2699
- type: Number,
2700
- default: Infinity
2701
- },
2702
- min: {
2703
- type: Number,
2704
- default: -Infinity
2705
- },
2706
- value: {},
2707
- disabled: Boolean,
2708
- size: String,
2709
- controls: {
2710
- type: Boolean,
2711
- default: true
2712
- },
2713
- controlsPosition: {
2714
- type: String,
2715
- default: ''
2716
- },
2717
- name: String,
2718
- label: String,
2719
- placeholder: String,
2720
- precision: {
2721
- type: Number,
2722
- validator: function validator(val) {
2723
- return val >= 0 && val === parseInt(val, 10);
2724
- }
2725
- }
2726
- },
2727
- data: function data() {
2728
- return {
2729
- currentValue: 0,
2730
- userInput: null
2731
- };
2732
- },
2733
-
2734
- watch: {
2735
- value: {
2736
- immediate: true,
2737
- handler: function handler(value) {
2738
- var newVal = value === undefined ? value : Number(value);
2739
- if (newVal !== undefined) {
2740
- if (isNaN(newVal)) {
2741
- return;
2742
- }
2743
-
2744
- if (this.stepStrictly) {
2745
- var stepPrecision = this.getPrecision(this.step);
2746
- var precisionFactor = Math.pow(10, stepPrecision);
2747
- newVal = Math.round(newVal / this.step) * precisionFactor * this.step / precisionFactor;
2748
- }
2749
-
2750
- if (this.precision !== undefined) {
2751
- newVal = this.toPrecision(newVal, this.precision);
2752
- }
2753
- }
2754
- if (newVal >= this.max) newVal = this.max;
2755
- if (newVal <= this.min) newVal = this.min;
2756
- this.currentValue = newVal;
2757
- this.userInput = null;
2758
- this.$emit('input', newVal);
2759
- }
2760
- }
2761
- },
2762
- computed: {
2763
- minDisabled: function minDisabled() {
2764
- return this._decrease(this.value, this.step) < this.min;
2765
- },
2766
- maxDisabled: function maxDisabled() {
2767
- return this._increase(this.value, this.step) > this.max;
2768
- },
2769
- numPrecision: function numPrecision() {
2770
- var value = this.value,
2771
- step = this.step,
2772
- getPrecision = this.getPrecision,
2773
- precision = this.precision;
2774
-
2775
- var stepPrecision = getPrecision(step);
2776
- if (precision !== undefined) {
2777
- if (stepPrecision > precision) {
2778
- console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
2779
- }
2780
- return precision;
2781
- } else {
2782
- return Math.max(getPrecision(value), stepPrecision);
2783
- }
2784
- },
2785
- controlsAtRight: function controlsAtRight() {
2786
- return this.controls && this.controlsPosition === 'right';
2787
- },
2788
- _elFormItemSize: function _elFormItemSize() {
2789
- return (this.elFormItem || {}).elFormItemSize;
2790
- },
2791
- inputNumberSize: function inputNumberSize() {
2792
- return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
2793
- },
2794
- inputNumberDisabled: function inputNumberDisabled() {
2795
- return this.disabled || !!(this.elForm || {}).disabled;
2796
- },
2797
- displayValue: function displayValue() {
2798
- if (this.userInput !== null) {
2799
- return this.userInput;
2800
- }
2801
-
2802
- var currentValue = this.currentValue;
2803
-
2804
- if (typeof currentValue === 'number') {
2805
- if (this.stepStrictly) {
2806
- var stepPrecision = this.getPrecision(this.step);
2807
- var precisionFactor = Math.pow(10, stepPrecision);
2808
- currentValue = Math.round(currentValue / this.step) * precisionFactor * this.step / precisionFactor;
2809
- }
2810
-
2811
- if (this.precision !== undefined) {
2812
- currentValue = currentValue.toFixed(this.precision);
2813
- }
2814
- }
2815
-
2816
- return currentValue;
2817
- }
2818
- },
2819
- methods: {
2820
- toPrecision: function toPrecision(num, precision) {
2821
- if (precision === undefined) precision = this.numPrecision;
2822
- return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
2823
- },
2824
- getPrecision: function getPrecision(value) {
2825
- if (value === undefined) return 0;
2826
- var valueString = value.toString();
2827
- var dotPosition = valueString.indexOf('.');
2828
- var precision = 0;
2829
- if (dotPosition !== -1) {
2830
- precision = valueString.length - dotPosition - 1;
2831
- }
2832
- return precision;
2833
- },
2834
- _increase: function _increase(val, step) {
2835
- if (typeof val !== 'number' && val !== undefined) return this.currentValue;
2836
-
2837
- var precisionFactor = Math.pow(10, this.numPrecision);
2838
- // Solve the accuracy problem of JS decimal calculation by converting the value to integer.
2839
- return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
2840
- },
2841
- _decrease: function _decrease(val, step) {
2842
- if (typeof val !== 'number' && val !== undefined) return this.currentValue;
2843
-
2844
- var precisionFactor = Math.pow(10, this.numPrecision);
2845
-
2846
- return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
2847
- },
2848
- increase: function increase() {
2849
- if (this.inputNumberDisabled || this.maxDisabled) return;
2850
- var value = this.value || 0;
2851
- var newVal = this._increase(value, this.step);
2852
- this.setCurrentValue(newVal);
2853
- },
2854
- decrease: function decrease() {
2855
- if (this.inputNumberDisabled || this.minDisabled) return;
2856
- var value = this.value || 0;
2857
- var newVal = this._decrease(value, this.step);
2858
- this.setCurrentValue(newVal);
2859
- },
2860
- handleBlur: function handleBlur(event) {
2861
- this.$emit('blur', event);
2862
- },
2863
- handleFocus: function handleFocus(event) {
2864
- this.$emit('focus', event);
2865
- },
2866
- setCurrentValue: function setCurrentValue(newVal) {
2867
- var oldVal = this.currentValue;
2868
- if (typeof newVal === 'number' && this.precision !== undefined) {
2869
- newVal = this.toPrecision(newVal, this.precision);
2870
- }
2871
- if (newVal >= this.max) newVal = this.max;
2872
- if (newVal <= this.min) newVal = this.min;
2873
- if (oldVal === newVal) return;
2874
- this.userInput = null;
2875
- this.$emit('input', newVal);
2876
- this.$emit('change', newVal, oldVal);
2877
- this.currentValue = newVal;
2878
- },
2879
- handleInput: function handleInput(value) {
2880
- this.userInput = value;
2881
- },
2882
- handleInputChange: function handleInputChange(value) {
2883
- var newVal = value === '' ? undefined : Number(value);
2884
- if (!isNaN(newVal) || value === '') {
2885
- this.setCurrentValue(newVal);
2886
- }
2887
- this.userInput = null;
2888
- },
2889
- select: function select() {
2890
- this.$refs.input.select();
2891
- }
2892
- },
2893
- mounted: function mounted() {
2894
- var innerInput = this.$refs.input.$refs.input;
2895
- innerInput.setAttribute('role', 'spinbutton');
2896
- innerInput.setAttribute('aria-valuemax', this.max);
2897
- innerInput.setAttribute('aria-valuemin', this.min);
2898
- innerInput.setAttribute('aria-valuenow', this.currentValue);
2899
- innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
2900
- },
2901
- updated: function updated() {
2902
- if (!this.$refs || !this.$refs.input) return;
2903
- var innerInput = this.$refs.input.$refs.input;
2904
- innerInput.setAttribute('aria-valuenow', this.currentValue);
2905
- }
2906
- });
2907
- // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
2908
- /* harmony default export */ var src_input_numbervue_type_script_lang_js_ = (input_numbervue_type_script_lang_js_);
2909
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2910
- var componentNormalizer = __webpack_require__(0);
2911
-
2912
- // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue
2913
-
2914
-
2915
-
2916
-
2917
-
2918
- /* normalize component */
2919
-
2920
- var component = Object(componentNormalizer["a" /* default */])(
2921
- src_input_numbervue_type_script_lang_js_,
2922
- render,
2923
- staticRenderFns,
2924
- false,
2925
- null,
2926
- null,
2927
- null
2928
-
2929
- )
2930
-
2931
- /* hot reload */
2932
- if (false) { var api; }
2933
- component.options.__file = "packages/input-number/src/input-number.vue"
2934
- /* harmony default export */ var input_number = (component.exports);
2935
- // CONCATENATED MODULE: ./packages/input-number/index.js
2936
-
2937
-
2938
- /* istanbul ignore next */
2939
- input_number.install = function (Vue) {
2940
- Vue.component(input_number.name, input_number);
2941
- };
2942
-
2943
- /* harmony default export */ var packages_input_number = __webpack_exports__["default"] = (input_number);
2944
-
2945
- /***/ })
2946
-
2947
- /******/ });
2948
-
2949
- /***/ }),
2950
-
2951
- /***/ "f494":
2952
- /***/ (function(module, exports, __webpack_require__) {
2953
-
2954
- module.exports =
2955
- /******/ (function(modules) { // webpackBootstrap
2956
- /******/ // The module cache
2957
- /******/ var installedModules = {};
2958
- /******/
2959
- /******/ // The require function
2960
- /******/ function __webpack_require__(moduleId) {
2961
- /******/
2962
- /******/ // Check if module is in cache
2963
- /******/ if(installedModules[moduleId]) {
2964
- /******/ return installedModules[moduleId].exports;
2965
- /******/ }
2966
- /******/ // Create a new module (and put it into the cache)
2967
- /******/ var module = installedModules[moduleId] = {
2968
- /******/ i: moduleId,
2969
- /******/ l: false,
2970
- /******/ exports: {}
2971
- /******/ };
2972
- /******/
2973
- /******/ // Execute the module function
2974
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
2975
- /******/
2976
- /******/ // Flag the module as loaded
2977
- /******/ module.l = true;
2978
- /******/
2979
- /******/ // Return the exports of the module
2980
- /******/ return module.exports;
2981
- /******/ }
2982
- /******/
2983
- /******/
2984
- /******/ // expose the modules object (__webpack_modules__)
2985
- /******/ __webpack_require__.m = modules;
2986
- /******/
2987
- /******/ // expose the module cache
2988
- /******/ __webpack_require__.c = installedModules;
2989
- /******/
2990
- /******/ // define getter function for harmony exports
2991
- /******/ __webpack_require__.d = function(exports, name, getter) {
2992
- /******/ if(!__webpack_require__.o(exports, name)) {
2993
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
2994
- /******/ }
2995
- /******/ };
2996
- /******/
2997
- /******/ // define __esModule on exports
2998
- /******/ __webpack_require__.r = function(exports) {
2999
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
3000
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3001
- /******/ }
3002
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
3003
- /******/ };
3004
- /******/
3005
- /******/ // create a fake namespace object
3006
- /******/ // mode & 1: value is a module id, require it
3007
- /******/ // mode & 2: merge all properties of value into the ns
3008
- /******/ // mode & 4: return value when already ns object
3009
- /******/ // mode & 8|1: behave like require
3010
- /******/ __webpack_require__.t = function(value, mode) {
3011
- /******/ if(mode & 1) value = __webpack_require__(value);
3012
- /******/ if(mode & 8) return value;
3013
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
3014
- /******/ var ns = Object.create(null);
3015
- /******/ __webpack_require__.r(ns);
3016
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
3017
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
3018
- /******/ return ns;
3019
- /******/ };
3020
- /******/
3021
- /******/ // getDefaultExport function for compatibility with non-harmony modules
3022
- /******/ __webpack_require__.n = function(module) {
3023
- /******/ var getter = module && module.__esModule ?
3024
- /******/ function getDefault() { return module['default']; } :
3025
- /******/ function getModuleExports() { return module; };
3026
- /******/ __webpack_require__.d(getter, 'a', getter);
3027
- /******/ return getter;
3028
- /******/ };
3029
- /******/
3030
- /******/ // Object.prototype.hasOwnProperty.call
3031
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
3032
- /******/
3033
- /******/ // __webpack_public_path__
3034
- /******/ __webpack_require__.p = "/dist/";
3035
- /******/
3036
- /******/
3037
- /******/ // Load entry module and return exports
3038
- /******/ return __webpack_require__(__webpack_require__.s = 88);
3039
- /******/ })
3040
- /************************************************************************/
3041
- /******/ ({
3042
-
3043
- /***/ 0:
3044
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3045
-
3046
- "use strict";
3047
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
3048
- /* globals __VUE_SSR_CONTEXT__ */
3049
-
3050
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
3051
- // This module is a runtime utility for cleaner component module output and will
3052
- // be included in the final webpack user bundle.
3053
-
3054
- function normalizeComponent (
3055
- scriptExports,
3056
- render,
3057
- staticRenderFns,
3058
- functionalTemplate,
3059
- injectStyles,
3060
- scopeId,
3061
- moduleIdentifier, /* server only */
3062
- shadowMode /* vue-cli only */
3063
- ) {
3064
- // Vue.extend constructor export interop
3065
- var options = typeof scriptExports === 'function'
3066
- ? scriptExports.options
3067
- : scriptExports
3068
-
3069
- // render functions
3070
- if (render) {
3071
- options.render = render
3072
- options.staticRenderFns = staticRenderFns
3073
- options._compiled = true
3074
- }
3075
-
3076
- // functional template
3077
- if (functionalTemplate) {
3078
- options.functional = true
3079
- }
3080
-
3081
- // scopedId
3082
- if (scopeId) {
3083
- options._scopeId = 'data-v-' + scopeId
3084
- }
3085
-
3086
- var hook
3087
- if (moduleIdentifier) { // server build
3088
- hook = function (context) {
3089
- // 2.3 injection
3090
- context =
3091
- context || // cached call
3092
- (this.$vnode && this.$vnode.ssrContext) || // stateful
3093
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
3094
- // 2.2 with runInNewContext: true
3095
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
3096
- context = __VUE_SSR_CONTEXT__
3097
- }
3098
- // inject component styles
3099
- if (injectStyles) {
3100
- injectStyles.call(this, context)
3101
- }
3102
- // register component module identifier for async chunk inferrence
3103
- if (context && context._registeredComponents) {
3104
- context._registeredComponents.add(moduleIdentifier)
3105
- }
3106
- }
3107
- // used by ssr in case component is cached and beforeCreate
3108
- // never gets called
3109
- options._ssrRegister = hook
3110
- } else if (injectStyles) {
3111
- hook = shadowMode
3112
- ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
3113
- : injectStyles
3114
- }
3115
-
3116
- if (hook) {
3117
- if (options.functional) {
3118
- // for template-only hot-reload because in that case the render fn doesn't
3119
- // go through the normalizer
3120
- options._injectStyles = hook
3121
- // register for functioal component in vue file
3122
- var originalRender = options.render
3123
- options.render = function renderWithStyleInjection (h, context) {
3124
- hook.call(context)
3125
- return originalRender(h, context)
3126
- }
3127
- } else {
3128
- // inject component registration as beforeCreate hook
3129
- var existing = options.beforeCreate
3130
- options.beforeCreate = existing
3131
- ? [].concat(existing, hook)
3132
- : [hook]
3133
- }
3134
- }
3135
-
3136
- return {
3137
- exports: scriptExports,
3138
- options: options
3139
- }
3140
- }
3141
-
3142
-
3143
- /***/ }),
3144
-
3145
- /***/ 4:
3146
- /***/ (function(module, exports) {
3147
-
3148
- module.exports = __webpack_require__("d010");
3149
-
3150
- /***/ }),
3151
-
3152
- /***/ 88:
3153
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3154
-
3155
- "use strict";
3156
- __webpack_require__.r(__webpack_exports__);
3157
-
3158
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
3159
- var render = function() {
3160
- var _vm = this
3161
- var _h = _vm.$createElement
3162
- var _c = _vm._self._c || _h
3163
- return _c(
3164
- "label",
3165
- {
3166
- staticClass: "el-radio",
3167
- class: [
3168
- _vm.border && _vm.radioSize ? "el-radio--" + _vm.radioSize : "",
3169
- { "is-disabled": _vm.isDisabled },
3170
- { "is-focus": _vm.focus },
3171
- { "is-bordered": _vm.border },
3172
- { "is-checked": _vm.model === _vm.label }
3173
- ],
3174
- attrs: {
3175
- role: "radio",
3176
- "aria-checked": _vm.model === _vm.label,
3177
- "aria-disabled": _vm.isDisabled,
3178
- tabindex: _vm.tabIndex
3179
- },
3180
- on: {
3181
- keydown: function($event) {
3182
- if (
3183
- !("button" in $event) &&
3184
- _vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])
3185
- ) {
3186
- return null
3187
- }
3188
- $event.stopPropagation()
3189
- $event.preventDefault()
3190
- _vm.model = _vm.isDisabled ? _vm.model : _vm.label
3191
- }
3192
- }
3193
- },
3194
- [
3195
- _c(
3196
- "span",
3197
- {
3198
- staticClass: "el-radio__input",
3199
- class: {
3200
- "is-disabled": _vm.isDisabled,
3201
- "is-checked": _vm.model === _vm.label
3202
- }
3203
- },
3204
- [
3205
- _c("span", { staticClass: "el-radio__inner" }),
3206
- _c("input", {
3207
- directives: [
3208
- {
3209
- name: "model",
3210
- rawName: "v-model",
3211
- value: _vm.model,
3212
- expression: "model"
3213
- }
3214
- ],
3215
- ref: "radio",
3216
- staticClass: "el-radio__original",
3217
- attrs: {
3218
- type: "radio",
3219
- "aria-hidden": "true",
3220
- name: _vm.name,
3221
- disabled: _vm.isDisabled,
3222
- tabindex: "-1",
3223
- autocomplete: "off"
3224
- },
3225
- domProps: {
3226
- value: _vm.label,
3227
- checked: _vm._q(_vm.model, _vm.label)
3228
- },
3229
- on: {
3230
- focus: function($event) {
3231
- _vm.focus = true
3232
- },
3233
- blur: function($event) {
3234
- _vm.focus = false
3235
- },
3236
- change: [
3237
- function($event) {
3238
- _vm.model = _vm.label
3239
- },
3240
- _vm.handleChange
3241
- ]
3242
- }
3243
- })
3244
- ]
3245
- ),
3246
- _c(
3247
- "span",
3248
- {
3249
- staticClass: "el-radio__label",
3250
- on: {
3251
- keydown: function($event) {
3252
- $event.stopPropagation()
3253
- }
3254
- }
3255
- },
3256
- [
3257
- _vm._t("default"),
3258
- !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
3259
- ],
3260
- 2
3261
- )
3262
- ]
3263
- )
3264
- }
3265
- var staticRenderFns = []
3266
- render._withStripped = true
3267
-
3268
-
3269
- // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
3270
-
3271
- // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
3272
- var emitter_ = __webpack_require__(4);
3273
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
3274
-
3275
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=script&lang=js&
3276
- //
3277
- //
3278
- //
3279
- //
3280
- //
3281
- //
3282
- //
3283
- //
3284
- //
3285
- //
3286
- //
3287
- //
3288
- //
3289
- //
3290
- //
3291
- //
3292
- //
3293
- //
3294
- //
3295
- //
3296
- //
3297
- //
3298
- //
3299
- //
3300
- //
3301
- //
3302
- //
3303
- //
3304
- //
3305
- //
3306
- //
3307
- //
3308
- //
3309
- //
3310
- //
3311
- //
3312
- //
3313
- //
3314
- //
3315
- //
3316
- //
3317
- //
3318
- //
3319
- //
3320
- //
3321
-
3322
-
3323
-
3324
- /* harmony default export */ var radiovue_type_script_lang_js_ = ({
3325
- name: 'ElRadio',
3326
-
3327
- mixins: [emitter_default.a],
3328
-
3329
- inject: {
3330
- elForm: {
3331
- default: ''
3332
- },
3333
-
3334
- elFormItem: {
3335
- default: ''
3336
- }
3337
- },
3338
-
3339
- componentName: 'ElRadio',
3340
-
3341
- props: {
3342
- value: {},
3343
- label: {},
3344
- disabled: Boolean,
3345
- name: String,
3346
- border: Boolean,
3347
- size: String
3348
- },
3349
-
3350
- data: function data() {
3351
- return {
3352
- focus: false
3353
- };
3354
- },
3355
-
3356
- computed: {
3357
- isGroup: function isGroup() {
3358
- var parent = this.$parent;
3359
- while (parent) {
3360
- if (parent.$options.componentName !== 'ElRadioGroup') {
3361
- parent = parent.$parent;
3362
- } else {
3363
- this._radioGroup = parent;
3364
- return true;
3365
- }
3366
- }
3367
- return false;
3368
- },
3369
-
3370
- model: {
3371
- get: function get() {
3372
- return this.isGroup ? this._radioGroup.value : this.value;
3373
- },
3374
- set: function set(val) {
3375
- if (this.isGroup) {
3376
- this.dispatch('ElRadioGroup', 'input', [val]);
3377
- } else {
3378
- this.$emit('input', val);
3379
- }
3380
- this.$refs.radio && (this.$refs.radio.checked = this.model === this.label);
3381
- }
3382
- },
3383
- _elFormItemSize: function _elFormItemSize() {
3384
- return (this.elFormItem || {}).elFormItemSize;
3385
- },
3386
- radioSize: function radioSize() {
3387
- var temRadioSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
3388
- return this.isGroup ? this._radioGroup.radioGroupSize || temRadioSize : temRadioSize;
3389
- },
3390
- isDisabled: function isDisabled() {
3391
- return this.isGroup ? this._radioGroup.disabled || this.disabled || (this.elForm || {}).disabled : this.disabled || (this.elForm || {}).disabled;
3392
- },
3393
- tabIndex: function tabIndex() {
3394
- return this.isDisabled || this.isGroup && this.model !== this.label ? -1 : 0;
3395
- }
3396
- },
3397
-
3398
- methods: {
3399
- handleChange: function handleChange() {
3400
- var _this = this;
3401
-
3402
- this.$nextTick(function () {
3403
- _this.$emit('change', _this.model);
3404
- _this.isGroup && _this.dispatch('ElRadioGroup', 'handleChange', _this.model);
3405
- });
3406
- }
3407
- }
3408
- });
3409
- // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=script&lang=js&
3410
- /* harmony default export */ var src_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_);
3411
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3412
- var componentNormalizer = __webpack_require__(0);
3413
-
3414
- // CONCATENATED MODULE: ./packages/radio/src/radio.vue
3415
-
3416
-
3417
-
3418
-
3419
-
3420
- /* normalize component */
3421
-
3422
- var component = Object(componentNormalizer["a" /* default */])(
3423
- src_radiovue_type_script_lang_js_,
3424
- render,
3425
- staticRenderFns,
3426
- false,
3427
- null,
3428
- null,
3429
- null
3430
-
3431
- )
3432
-
3433
- /* hot reload */
3434
- if (false) { var api; }
3435
- component.options.__file = "packages/radio/src/radio.vue"
3436
- /* harmony default export */ var src_radio = (component.exports);
3437
- // CONCATENATED MODULE: ./packages/radio/index.js
3438
-
3439
-
3440
- /* istanbul ignore next */
3441
- src_radio.install = function (Vue) {
3442
- Vue.component(src_radio.name, src_radio);
3443
- };
3444
-
3445
- /* harmony default export */ var packages_radio = __webpack_exports__["default"] = (src_radio);
3446
-
3447
- /***/ })
3448
-
3449
- /******/ });
3450
-
3451
- /***/ })
3452
-
3453
- }]);