front-ui-admin 1.1.20 → 1.1.21

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.
@@ -7510,6 +7510,10 @@ __webpack_require__.d(__webpack_exports__, "POptionGroup", function() { return /
7510
7510
  __webpack_require__.d(__webpack_exports__, "PSelectDropdown", function() { return /* reexport */ select_dropdown; });
7511
7511
  __webpack_require__.d(__webpack_exports__, "PTableColumn", function() { return /* reexport */ Table_column; });
7512
7512
  __webpack_require__.d(__webpack_exports__, "PTestButton", function() { return /* reexport */ p_test_button; });
7513
+ __webpack_require__.d(__webpack_exports__, "PCascader", function() { return /* reexport */ p_cascader; });
7514
+ __webpack_require__.d(__webpack_exports__, "PCascaderPanel", function() { return /* reexport */ p_cascader_panel; });
7515
+ __webpack_require__.d(__webpack_exports__, "PCheckbox", function() { return /* reexport */ p_checkbox; });
7516
+ __webpack_require__.d(__webpack_exports__, "PRadio", function() { return /* reexport */ p_radio; });
7513
7517
  __webpack_require__.d(__webpack_exports__, "use", function() { return /* reexport */ use; });
7514
7518
  __webpack_require__.d(__webpack_exports__, "t", function() { return /* reexport */ t; });
7515
7519
  __webpack_require__.d(__webpack_exports__, "i18n", function() { return /* reexport */ i18n; });
@@ -8782,7 +8786,7 @@ const util_isEqual = function (value1, value2) {
8782
8786
  }
8783
8787
  return looseEqual(value1, value2);
8784
8788
  };
8785
- const isEmpty = function (val) {
8789
+ const util_isEmpty = function (val) {
8786
8790
  // null or undefined
8787
8791
  if (val == null) return true;
8788
8792
  if (typeof val === 'boolean') return false;
@@ -8824,7 +8828,7 @@ function objToArray(obj) {
8824
8828
  if (Array.isArray(obj)) {
8825
8829
  return obj;
8826
8830
  }
8827
- return isEmpty(obj) ? [] : [obj];
8831
+ return util_isEmpty(obj) ? [] : [obj];
8828
8832
  }
8829
8833
  const isMac = function () {
8830
8834
  return !external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
@@ -9341,7 +9345,7 @@ function walkTreeNode(root, cb, childrenKey = 'children', lazyKey = 'hasChildren
9341
9345
  // CONCATENATED MODULE: ./src/package-admin/p-table/src/store/current.js
9342
9346
 
9343
9347
 
9344
- /* harmony default export */ var current = ({
9348
+ /* harmony default export */ var store_current = ({
9345
9349
  data() {
9346
9350
  return {
9347
9351
  states: {
@@ -9725,7 +9729,7 @@ const doFlattenColumns = columns => {
9725
9729
  }
9726
9730
  };
9727
9731
  },
9728
- mixins: [expand, current, tree],
9732
+ mixins: [expand, store_current, tree],
9729
9733
  methods: {
9730
9734
  // 检查 rowKey 是否存在
9731
9735
  assertRowKey() {
@@ -14294,15 +14298,15 @@ var input_component = normalizeComponent(
14294
14298
 
14295
14299
  )
14296
14300
 
14297
- /* harmony default export */ var input = (input_component.exports);
14301
+ /* harmony default export */ var src_input = (input_component.exports);
14298
14302
  // CONCATENATED MODULE: ./src/package-admin/p-input/index.js
14299
14303
 
14300
14304
 
14301
14305
  /* istanbul ignore next */
14302
- input.install = function (Vue) {
14303
- Vue.component(input.name, input);
14306
+ src_input.install = function (Vue) {
14307
+ Vue.component(src_input.name, src_input);
14304
14308
  };
14305
- /* harmony default export */ var p_input = (input);
14309
+ /* harmony default export */ var p_input = (src_input);
14306
14310
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-tag/src/tag.vue?vue&type=script&lang=js
14307
14311
  /* harmony default export */ var tagvue_type_script_lang_js = ({
14308
14312
  name: 'PTag',
@@ -14386,15 +14390,15 @@ var tag_component = normalizeComponent(
14386
14390
 
14387
14391
  )
14388
14392
 
14389
- /* harmony default export */ var tag = (tag_component.exports);
14393
+ /* harmony default export */ var src_tag = (tag_component.exports);
14390
14394
  // CONCATENATED MODULE: ./src/package-admin/p-tag/index.js
14391
14395
 
14392
14396
 
14393
14397
  /* istanbul ignore next */
14394
- tag.install = function (Vue) {
14395
- Vue.component(tag.name, tag);
14398
+ src_tag.install = function (Vue) {
14399
+ Vue.component(src_tag.name, src_tag);
14396
14400
  };
14397
- /* harmony default export */ var p_tag = (tag);
14401
+ /* harmony default export */ var p_tag = (src_tag);
14398
14402
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"75b11e11-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-select/src/select.vue?vue&type=template&id=37c882d6
14399
14403
  var selectvue_type_template_id_37c882d6_render = function render() {
14400
14404
  var _vm = this,
@@ -16433,6 +16437,2506 @@ var p_test_button_component = normalizeComponent(
16433
16437
  )
16434
16438
 
16435
16439
  /* harmony default export */ var p_test_button = (p_test_button_component.exports);
16440
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"75b11e11-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-cascader/src/cascader.vue?vue&type=template&id=93427a92
16441
+ var cascadervue_type_template_id_93427a92_render = function render() {
16442
+ var _vm = this,
16443
+ _c = _vm._self._c;
16444
+ return _c('div', {
16445
+ directives: [{
16446
+ name: "clickoutside",
16447
+ rawName: "v-clickoutside",
16448
+ value: () => _vm.toggleDropDownVisible(false),
16449
+ expression: "() => toggleDropDownVisible(false)"
16450
+ }],
16451
+ ref: "reference",
16452
+ class: ['p-cascader', _vm.realSize && `p-cascader--${_vm.realSize}`, {
16453
+ 'is-disabled': _vm.isDisabled
16454
+ }],
16455
+ on: {
16456
+ "mouseenter": function ($event) {
16457
+ _vm.inputHover = true;
16458
+ },
16459
+ "mouseleave": function ($event) {
16460
+ _vm.inputHover = false;
16461
+ },
16462
+ "click": () => _vm.toggleDropDownVisible(_vm.readonly ? undefined : true),
16463
+ "keydown": _vm.handleKeyDown
16464
+ }
16465
+ }, [_c('p-input', {
16466
+ ref: "input",
16467
+ class: {
16468
+ 'is-focus': _vm.dropDownVisible
16469
+ },
16470
+ attrs: {
16471
+ "value": _vm.multiple ? _vm.presentText : _vm.inputValue,
16472
+ "size": _vm.realSize,
16473
+ "placeholder": _vm.placeholder,
16474
+ "readonly": _vm.readonly,
16475
+ "disabled": _vm.isDisabled,
16476
+ "validate-event": false
16477
+ },
16478
+ on: {
16479
+ "focus": _vm.handleFocus,
16480
+ "blur": _vm.handleBlur,
16481
+ "input": _vm.handleInput
16482
+ }
16483
+ }, [_c('template', {
16484
+ slot: "suffix"
16485
+ }, [_vm.clearBtnVisible ? _c('i', {
16486
+ key: "clear",
16487
+ staticClass: "el-input__icon el-icon-circle-close",
16488
+ on: {
16489
+ "click": function ($event) {
16490
+ $event.stopPropagation();
16491
+ return _vm.handleClear.apply(null, arguments);
16492
+ }
16493
+ }
16494
+ }) : _c('i', {
16495
+ key: "arrow-down",
16496
+ class: ['el-input__icon', 'el-icon-arrow-down', _vm.dropDownVisible && 'is-reverse'],
16497
+ on: {
16498
+ "click": function ($event) {
16499
+ $event.stopPropagation();
16500
+ return _vm.toggleDropDownVisible();
16501
+ }
16502
+ }
16503
+ })])], 2), _vm.multiple ? _c('div', {
16504
+ staticClass: "p-cascader__tags"
16505
+ }, [_vm._l(_vm.presentTags, function (tag) {
16506
+ return _c('p-tag', {
16507
+ key: tag.key,
16508
+ attrs: {
16509
+ "type": "info",
16510
+ "size": _vm.tagSize,
16511
+ "hit": tag.hitState,
16512
+ "closable": tag.closable,
16513
+ "disable-transitions": ""
16514
+ },
16515
+ on: {
16516
+ "close": function ($event) {
16517
+ return _vm.deleteTag(tag);
16518
+ }
16519
+ }
16520
+ }, [_c('span', [_vm._v(_vm._s(tag.text))])]);
16521
+ }), _vm.filterable && !_vm.isDisabled ? _c('input', {
16522
+ directives: [{
16523
+ name: "model",
16524
+ rawName: "v-model.trim",
16525
+ value: _vm.inputValue,
16526
+ expression: "inputValue",
16527
+ modifiers: {
16528
+ "trim": true
16529
+ }
16530
+ }],
16531
+ staticClass: "p-cascader__search-input",
16532
+ attrs: {
16533
+ "type": "text",
16534
+ "placeholder": _vm.presentTags.length ? '' : _vm.placeholder
16535
+ },
16536
+ domProps: {
16537
+ "value": _vm.inputValue
16538
+ },
16539
+ on: {
16540
+ "input": [function ($event) {
16541
+ if ($event.target.composing) return;
16542
+ _vm.inputValue = $event.target.value.trim();
16543
+ }, e => _vm.handleInput(_vm.inputValue, e)],
16544
+ "click": function ($event) {
16545
+ $event.stopPropagation();
16546
+ return _vm.toggleDropDownVisible(true);
16547
+ },
16548
+ "keydown": function ($event) {
16549
+ if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "delete", [8, 46], $event.key, ["Backspace", "Delete", "Del"])) return null;
16550
+ return _vm.handleDelete.apply(null, arguments);
16551
+ },
16552
+ "blur": function ($event) {
16553
+ return _vm.$forceUpdate();
16554
+ }
16555
+ }
16556
+ }) : _vm._e()], 2) : _vm._e(), _c('transition', {
16557
+ attrs: {
16558
+ "name": "el-zoom-in-top"
16559
+ },
16560
+ on: {
16561
+ "after-leave": _vm.handleDropdownLeave
16562
+ }
16563
+ }, [_c('div', {
16564
+ directives: [{
16565
+ name: "show",
16566
+ rawName: "v-show",
16567
+ value: _vm.dropDownVisible,
16568
+ expression: "dropDownVisible"
16569
+ }],
16570
+ ref: "popper",
16571
+ class: ['el-popper', 'p-cascader__dropdown', _vm.popperClass]
16572
+ }, [_c('p-cascader-panel', {
16573
+ directives: [{
16574
+ name: "show",
16575
+ rawName: "v-show",
16576
+ value: !_vm.filtering,
16577
+ expression: "!filtering"
16578
+ }],
16579
+ ref: "panel",
16580
+ attrs: {
16581
+ "options": _vm.options,
16582
+ "props": _vm.config,
16583
+ "border": false,
16584
+ "render-label": _vm.$scopedSlots.default
16585
+ },
16586
+ on: {
16587
+ "expand-change": _vm.handleExpandChange,
16588
+ "close": function ($event) {
16589
+ return _vm.toggleDropDownVisible(false);
16590
+ }
16591
+ },
16592
+ model: {
16593
+ value: _vm.checkedValue,
16594
+ callback: function ($$v) {
16595
+ _vm.checkedValue = $$v;
16596
+ },
16597
+ expression: "checkedValue"
16598
+ }
16599
+ }), _vm.filterable ? _c('p-scrollbar', {
16600
+ directives: [{
16601
+ name: "show",
16602
+ rawName: "v-show",
16603
+ value: _vm.filtering,
16604
+ expression: "filtering"
16605
+ }],
16606
+ ref: "suggestionPanel",
16607
+ staticClass: "p-cascader__suggestion-panel",
16608
+ attrs: {
16609
+ "tag": "ul",
16610
+ "view-class": "p-cascader__suggestion-list"
16611
+ },
16612
+ nativeOn: {
16613
+ "keydown": function ($event) {
16614
+ return _vm.handleSuggestionKeyDown.apply(null, arguments);
16615
+ }
16616
+ }
16617
+ }, [_vm.suggestions.length ? _vm._l(_vm.suggestions, function (item, index) {
16618
+ return _c('li', {
16619
+ key: item.uid,
16620
+ class: ['p-cascader__suggestion-item', item.checked && 'is-checked'],
16621
+ attrs: {
16622
+ "tabindex": -1
16623
+ },
16624
+ on: {
16625
+ "click": function ($event) {
16626
+ return _vm.handleSuggestionClick(index);
16627
+ }
16628
+ }
16629
+ }, [_c('span', [_vm._v(_vm._s(item.text))]), item.checked ? _c('i', {
16630
+ staticClass: "el-icon-check"
16631
+ }) : _vm._e()]);
16632
+ }) : _vm._t("empty", function () {
16633
+ return [_c('li', {
16634
+ staticClass: "p-cascader__empty-text"
16635
+ }, [_vm._v(_vm._s(_vm.t('el.cascader.noMatch')))])];
16636
+ })], 2) : _vm._e()], 1)])], 1);
16637
+ };
16638
+ var cascadervue_type_template_id_93427a92_staticRenderFns = [];
16639
+
16640
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader/src/cascader.vue?vue&type=template&id=93427a92
16641
+
16642
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"75b11e11-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-cascader-panel/src/cascader-panel.vue?vue&type=template&id=4484171a
16643
+ var cascader_panelvue_type_template_id_4484171a_render = function render() {
16644
+ var _vm = this,
16645
+ _c = _vm._self._c;
16646
+ return _c('div', {
16647
+ class: ['p-cascader-panel', _vm.border && 'is-bordered'],
16648
+ on: {
16649
+ "keydown": _vm.handleKeyDown
16650
+ }
16651
+ }, _vm._l(_vm.menus, function (menu, index) {
16652
+ return _c('cascader-menu', {
16653
+ key: index,
16654
+ ref: "menu",
16655
+ refInFor: true,
16656
+ attrs: {
16657
+ "index": index,
16658
+ "nodes": menu
16659
+ }
16660
+ });
16661
+ }), 1);
16662
+ };
16663
+ var cascader_panelvue_type_template_id_4484171a_staticRenderFns = [];
16664
+
16665
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/src/cascader-panel.vue?vue&type=template&id=4484171a
16666
+
16667
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"75b11e11-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-checkbox/src/checkbox.vue?vue&type=template&id=7233fbeb
16668
+ var checkboxvue_type_template_id_7233fbeb_render = function render() {
16669
+ var _vm = this,
16670
+ _c = _vm._self._c;
16671
+ return _c('label', {
16672
+ staticClass: "p-checkbox",
16673
+ class: [_vm.border && _vm.checkboxSize ? 'p-checkbox--' + _vm.checkboxSize : '', {
16674
+ 'is-disabled': _vm.isDisabled
16675
+ }, {
16676
+ 'is-bordered': _vm.border
16677
+ }, {
16678
+ 'is-checked': _vm.isChecked
16679
+ }],
16680
+ attrs: {
16681
+ "id": _vm.id
16682
+ }
16683
+ }, [_c('span', {
16684
+ staticClass: "p-checkbox__input",
16685
+ class: {
16686
+ 'is-disabled': _vm.isDisabled,
16687
+ 'is-checked': _vm.isChecked,
16688
+ 'is-indeterminate': _vm.indeterminate,
16689
+ 'is-focus': _vm.focus
16690
+ },
16691
+ attrs: {
16692
+ "tabindex": _vm.indeterminate ? 0 : false,
16693
+ "role": _vm.indeterminate ? 'checkbox' : false,
16694
+ "aria-checked": _vm.indeterminate ? 'mixed' : false
16695
+ }
16696
+ }, [_c('span', {
16697
+ staticClass: "p-checkbox__inner"
16698
+ }), _vm.trueLabel || _vm.falseLabel ? _c('input', {
16699
+ directives: [{
16700
+ name: "model",
16701
+ rawName: "v-model",
16702
+ value: _vm.model,
16703
+ expression: "model"
16704
+ }],
16705
+ staticClass: "p-checkbox__original",
16706
+ attrs: {
16707
+ "type": "checkbox",
16708
+ "aria-hidden": _vm.indeterminate ? 'true' : 'false',
16709
+ "name": _vm.name,
16710
+ "disabled": _vm.isDisabled,
16711
+ "true-value": _vm.trueLabel,
16712
+ "false-value": _vm.falseLabel
16713
+ },
16714
+ domProps: {
16715
+ "checked": Array.isArray(_vm.model) ? _vm._i(_vm.model, null) > -1 : _vm._q(_vm.model, _vm.trueLabel)
16716
+ },
16717
+ on: {
16718
+ "change": [function ($event) {
16719
+ var $$a = _vm.model,
16720
+ $$el = $event.target,
16721
+ $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel;
16722
+ if (Array.isArray($$a)) {
16723
+ var $$v = null,
16724
+ $$i = _vm._i($$a, $$v);
16725
+ if ($$el.checked) {
16726
+ $$i < 0 && (_vm.model = $$a.concat([$$v]));
16727
+ } else {
16728
+ $$i > -1 && (_vm.model = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
16729
+ }
16730
+ } else {
16731
+ _vm.model = $$c;
16732
+ }
16733
+ }, _vm.handleChange],
16734
+ "focus": function ($event) {
16735
+ _vm.focus = true;
16736
+ },
16737
+ "blur": function ($event) {
16738
+ _vm.focus = false;
16739
+ }
16740
+ }
16741
+ }) : _c('input', {
16742
+ directives: [{
16743
+ name: "model",
16744
+ rawName: "v-model",
16745
+ value: _vm.model,
16746
+ expression: "model"
16747
+ }],
16748
+ staticClass: "p-checkbox__original",
16749
+ attrs: {
16750
+ "type": "checkbox",
16751
+ "aria-hidden": _vm.indeterminate ? 'true' : 'false',
16752
+ "disabled": _vm.isDisabled,
16753
+ "name": _vm.name
16754
+ },
16755
+ domProps: {
16756
+ "value": _vm.label,
16757
+ "checked": Array.isArray(_vm.model) ? _vm._i(_vm.model, _vm.label) > -1 : _vm.model
16758
+ },
16759
+ on: {
16760
+ "change": [function ($event) {
16761
+ var $$a = _vm.model,
16762
+ $$el = $event.target,
16763
+ $$c = $$el.checked ? true : false;
16764
+ if (Array.isArray($$a)) {
16765
+ var $$v = _vm.label,
16766
+ $$i = _vm._i($$a, $$v);
16767
+ if ($$el.checked) {
16768
+ $$i < 0 && (_vm.model = $$a.concat([$$v]));
16769
+ } else {
16770
+ $$i > -1 && (_vm.model = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
16771
+ }
16772
+ } else {
16773
+ _vm.model = $$c;
16774
+ }
16775
+ }, _vm.handleChange],
16776
+ "focus": function ($event) {
16777
+ _vm.focus = true;
16778
+ },
16779
+ "blur": function ($event) {
16780
+ _vm.focus = false;
16781
+ }
16782
+ }
16783
+ })]), _vm.$slots.default || _vm.label ? _c('span', {
16784
+ staticClass: "p-checkbox__label"
16785
+ }, [_vm._t("default"), !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()], 2) : _vm._e()]);
16786
+ };
16787
+ var checkboxvue_type_template_id_7233fbeb_staticRenderFns = [];
16788
+
16789
+ // CONCATENATED MODULE: ./src/package-admin/p-checkbox/src/checkbox.vue?vue&type=template&id=7233fbeb
16790
+
16791
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-checkbox/src/checkbox.vue?vue&type=script&lang=js
16792
+
16793
+
16794
+ /* harmony default export */ var p_checkbox_src_checkboxvue_type_script_lang_js = ({
16795
+ name: 'PCheckbox',
16796
+ mixins: [emitter],
16797
+ inject: {
16798
+ elForm: {
16799
+ default: ''
16800
+ },
16801
+ elFormItem: {
16802
+ default: ''
16803
+ }
16804
+ },
16805
+ componentName: 'PCheckbox',
16806
+ data() {
16807
+ return {
16808
+ selfModel: false,
16809
+ focus: false,
16810
+ isLimitExceeded: false
16811
+ };
16812
+ },
16813
+ computed: {
16814
+ model: {
16815
+ get() {
16816
+ return this.isGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
16817
+ },
16818
+ set(val) {
16819
+ if (this.isGroup) {
16820
+ this.isLimitExceeded = false;
16821
+ this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
16822
+ this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
16823
+ this.isLimitExceeded === false && this.dispatch('PCheckboxGroup', 'input', [val]);
16824
+ } else {
16825
+ this.$emit('input', val);
16826
+ this.selfModel = val;
16827
+ }
16828
+ }
16829
+ },
16830
+ isChecked() {
16831
+ if ({}.toString.call(this.model) === '[object Boolean]') {
16832
+ return this.model;
16833
+ } else if (Array.isArray(this.model)) {
16834
+ return this.model.indexOf(this.label) > -1;
16835
+ } else if (this.model !== null && this.model !== undefined) {
16836
+ return this.model === this.trueLabel;
16837
+ }
16838
+ },
16839
+ isGroup() {
16840
+ let parent = this.$parent;
16841
+ while (parent) {
16842
+ if (parent.$options.componentName !== 'PCheckboxGroup') {
16843
+ parent = parent.$parent;
16844
+ } else {
16845
+ this._checkboxGroup = parent;
16846
+ return true;
16847
+ }
16848
+ }
16849
+ return false;
16850
+ },
16851
+ store() {
16852
+ return this._checkboxGroup ? this._checkboxGroup.value : this.value;
16853
+ },
16854
+ /* used to make the isDisabled judgment under max/min props */
16855
+ isLimitDisabled() {
16856
+ const {
16857
+ max,
16858
+ min
16859
+ } = this._checkboxGroup;
16860
+ return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
16861
+ },
16862
+ isDisabled() {
16863
+ return this.isGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
16864
+ },
16865
+ _elFormItemSize() {
16866
+ return (this.elFormItem || {}).elFormItemSize;
16867
+ },
16868
+ checkboxSize() {
16869
+ const temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
16870
+ return this.isGroup ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize : temCheckboxSize;
16871
+ }
16872
+ },
16873
+ props: {
16874
+ value: {},
16875
+ label: {},
16876
+ indeterminate: Boolean,
16877
+ disabled: Boolean,
16878
+ checked: Boolean,
16879
+ name: String,
16880
+ trueLabel: [String, Number],
16881
+ falseLabel: [String, Number],
16882
+ id: String,
16883
+ /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
16884
+ controls: String,
16885
+ /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
16886
+ border: Boolean,
16887
+ size: String
16888
+ },
16889
+ methods: {
16890
+ addToStore() {
16891
+ if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
16892
+ this.model.push(this.label);
16893
+ } else {
16894
+ this.model = this.trueLabel || true;
16895
+ }
16896
+ },
16897
+ handleChange(ev) {
16898
+ if (this.isLimitExceeded) return;
16899
+ let value;
16900
+ if (ev.target.checked) {
16901
+ value = this.trueLabel === undefined ? true : this.trueLabel;
16902
+ } else {
16903
+ value = this.falseLabel === undefined ? false : this.falseLabel;
16904
+ }
16905
+ this.$emit('change', value, ev);
16906
+ this.$nextTick(() => {
16907
+ if (this.isGroup) {
16908
+ this.dispatch('PCheckboxGroup', 'change', [this._checkboxGroup.value]);
16909
+ }
16910
+ });
16911
+ }
16912
+ },
16913
+ created() {
16914
+ this.checked && this.addToStore();
16915
+ },
16916
+ mounted() {
16917
+ // 为indeterminate元素 添加aria-controls 属性
16918
+ if (this.indeterminate) {
16919
+ this.$el.setAttribute('aria-controls', this.controls);
16920
+ }
16921
+ },
16922
+ watch: {
16923
+ value(value) {
16924
+ this.dispatch('ElFormItem', 'el.form.change', value);
16925
+ }
16926
+ }
16927
+ });
16928
+ // CONCATENATED MODULE: ./src/package-admin/p-checkbox/src/checkbox.vue?vue&type=script&lang=js
16929
+ /* harmony default export */ var package_admin_p_checkbox_src_checkboxvue_type_script_lang_js = (p_checkbox_src_checkboxvue_type_script_lang_js);
16930
+ // CONCATENATED MODULE: ./src/package-admin/p-checkbox/src/checkbox.vue
16931
+
16932
+
16933
+
16934
+
16935
+
16936
+ /* normalize component */
16937
+
16938
+ var checkbox_component = normalizeComponent(
16939
+ package_admin_p_checkbox_src_checkboxvue_type_script_lang_js,
16940
+ checkboxvue_type_template_id_7233fbeb_render,
16941
+ checkboxvue_type_template_id_7233fbeb_staticRenderFns,
16942
+ false,
16943
+ null,
16944
+ null,
16945
+ null
16946
+
16947
+ )
16948
+
16949
+ /* harmony default export */ var p_checkbox_src_checkbox = (checkbox_component.exports);
16950
+ // CONCATENATED MODULE: ./src/package-admin/p-checkbox/index.js
16951
+
16952
+
16953
+ /* istanbul ignore next */
16954
+ p_checkbox_src_checkbox.install = function (Vue) {
16955
+ Vue.component(p_checkbox_src_checkbox.name, p_checkbox_src_checkbox);
16956
+ };
16957
+ /* harmony default export */ var p_checkbox = (p_checkbox_src_checkbox);
16958
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"75b11e11-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-radio/src/radio.vue?vue&type=template&id=768f701d
16959
+ var radiovue_type_template_id_768f701d_render = function render() {
16960
+ var _vm = this,
16961
+ _c = _vm._self._c;
16962
+ return _c('label', {
16963
+ staticClass: "p-radio",
16964
+ class: [_vm.border && _vm.radioSize ? 'p-radio--' + _vm.radioSize : '', {
16965
+ 'is-disabled': _vm.isDisabled
16966
+ }, {
16967
+ 'is-focus': _vm.focus
16968
+ }, {
16969
+ 'is-bordered': _vm.border
16970
+ }, {
16971
+ 'is-checked': _vm.model === _vm.label
16972
+ }],
16973
+ attrs: {
16974
+ "role": "radio",
16975
+ "aria-checked": _vm.model === _vm.label,
16976
+ "aria-disabled": _vm.isDisabled,
16977
+ "tabindex": _vm.tabIndex
16978
+ },
16979
+ on: {
16980
+ "keydown": function ($event) {
16981
+ if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])) return null;
16982
+ $event.stopPropagation();
16983
+ $event.preventDefault();
16984
+ _vm.model = _vm.isDisabled ? _vm.model : _vm.label;
16985
+ }
16986
+ }
16987
+ }, [_c('span', {
16988
+ staticClass: "p-radio__input",
16989
+ class: {
16990
+ 'is-disabled': _vm.isDisabled,
16991
+ 'is-checked': _vm.model === _vm.label
16992
+ }
16993
+ }, [_c('span', {
16994
+ staticClass: "p-radio__inner"
16995
+ }), _c('input', {
16996
+ directives: [{
16997
+ name: "model",
16998
+ rawName: "v-model",
16999
+ value: _vm.model,
17000
+ expression: "model"
17001
+ }],
17002
+ ref: "radio",
17003
+ staticClass: "p-radio__original",
17004
+ attrs: {
17005
+ "type": "radio",
17006
+ "aria-hidden": "true",
17007
+ "name": _vm.name,
17008
+ "disabled": _vm.isDisabled,
17009
+ "tabindex": "-1",
17010
+ "autocomplete": "off"
17011
+ },
17012
+ domProps: {
17013
+ "value": _vm.label,
17014
+ "checked": _vm._q(_vm.model, _vm.label)
17015
+ },
17016
+ on: {
17017
+ "focus": function ($event) {
17018
+ _vm.focus = true;
17019
+ },
17020
+ "blur": function ($event) {
17021
+ _vm.focus = false;
17022
+ },
17023
+ "change": [function ($event) {
17024
+ _vm.model = _vm.label;
17025
+ }, _vm.handleChange]
17026
+ }
17027
+ })]), _c('span', {
17028
+ staticClass: "p-radio__label",
17029
+ on: {
17030
+ "keydown": function ($event) {
17031
+ $event.stopPropagation();
17032
+ }
17033
+ }
17034
+ }, [_vm._t("default"), !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()], 2)]);
17035
+ };
17036
+ var radiovue_type_template_id_768f701d_staticRenderFns = [];
17037
+
17038
+ // CONCATENATED MODULE: ./src/package-admin/p-radio/src/radio.vue?vue&type=template&id=768f701d
17039
+
17040
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-radio/src/radio.vue?vue&type=script&lang=js
17041
+
17042
+ /* harmony default export */ var radiovue_type_script_lang_js = ({
17043
+ name: 'PRadio',
17044
+ mixins: [emitter],
17045
+ inject: {
17046
+ elForm: {
17047
+ default: ''
17048
+ },
17049
+ elFormItem: {
17050
+ default: ''
17051
+ }
17052
+ },
17053
+ componentName: 'PRadio',
17054
+ props: {
17055
+ value: {},
17056
+ label: {},
17057
+ disabled: Boolean,
17058
+ name: String,
17059
+ border: Boolean,
17060
+ size: String
17061
+ },
17062
+ data() {
17063
+ return {
17064
+ focus: false
17065
+ };
17066
+ },
17067
+ computed: {
17068
+ isGroup() {
17069
+ let parent = this.$parent;
17070
+ while (parent) {
17071
+ if (parent.$options.componentName !== 'PRadioGroup') {
17072
+ parent = parent.$parent;
17073
+ } else {
17074
+ this._radioGroup = parent;
17075
+ return true;
17076
+ }
17077
+ }
17078
+ return false;
17079
+ },
17080
+ model: {
17081
+ get() {
17082
+ return this.isGroup ? this._radioGroup.value : this.value;
17083
+ },
17084
+ set(val) {
17085
+ if (this.isGroup) {
17086
+ this.dispatch('PRadioGroup', 'input', [val]);
17087
+ } else {
17088
+ this.$emit('input', val);
17089
+ }
17090
+ this.$refs.radio && (this.$refs.radio.checked = this.model === this.label);
17091
+ }
17092
+ },
17093
+ _elFormItemSize() {
17094
+ return (this.elFormItem || {}).elFormItemSize;
17095
+ },
17096
+ radioSize() {
17097
+ const temRadioSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
17098
+ return this.isGroup ? this._radioGroup.radioGroupSize || temRadioSize : temRadioSize;
17099
+ },
17100
+ isDisabled() {
17101
+ return this.isGroup ? this._radioGroup.disabled || this.disabled || (this.elForm || {}).disabled : this.disabled || (this.elForm || {}).disabled;
17102
+ },
17103
+ tabIndex() {
17104
+ return this.isDisabled || this.isGroup && this.model !== this.label ? -1 : 0;
17105
+ }
17106
+ },
17107
+ methods: {
17108
+ handleChange() {
17109
+ this.$nextTick(() => {
17110
+ this.$emit('change', this.model);
17111
+ this.isGroup && this.dispatch('PRadioGroup', 'handleChange', this.model);
17112
+ });
17113
+ }
17114
+ }
17115
+ });
17116
+ // CONCATENATED MODULE: ./src/package-admin/p-radio/src/radio.vue?vue&type=script&lang=js
17117
+ /* harmony default export */ var src_radiovue_type_script_lang_js = (radiovue_type_script_lang_js);
17118
+ // CONCATENATED MODULE: ./src/package-admin/p-radio/src/radio.vue
17119
+
17120
+
17121
+
17122
+
17123
+
17124
+ /* normalize component */
17125
+
17126
+ var radio_component = normalizeComponent(
17127
+ src_radiovue_type_script_lang_js,
17128
+ radiovue_type_template_id_768f701d_render,
17129
+ radiovue_type_template_id_768f701d_staticRenderFns,
17130
+ false,
17131
+ null,
17132
+ null,
17133
+ null
17134
+
17135
+ )
17136
+
17137
+ /* harmony default export */ var src_radio = (radio_component.exports);
17138
+ // CONCATENATED MODULE: ./src/package-admin/p-radio/index.js
17139
+
17140
+
17141
+ /* istanbul ignore next */
17142
+ src_radio.install = function (Vue) {
17143
+ Vue.component(src_radio.name, src_radio);
17144
+ };
17145
+ /* harmony default export */ var p_radio = (src_radio);
17146
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-cascader-panel/src/cascader-node.vue?vue&type=script&lang=js
17147
+
17148
+
17149
+
17150
+
17151
+
17152
+
17153
+ const stopPropagation = e => e.stopPropagation();
17154
+ /* harmony default export */ var cascader_nodevue_type_script_lang_js = ({
17155
+ inject: ['panel'],
17156
+ components: {
17157
+ PCheckbox: p_checkbox,
17158
+ PRadio: p_radio
17159
+ },
17160
+ props: {
17161
+ node: {
17162
+ required: true
17163
+ },
17164
+ nodeId: String
17165
+ },
17166
+ computed: {
17167
+ config() {
17168
+ return this.panel.config;
17169
+ },
17170
+ isLeaf() {
17171
+ return this.node.isLeaf;
17172
+ },
17173
+ isDisabled() {
17174
+ return this.node.isDisabled;
17175
+ },
17176
+ checkedValue() {
17177
+ return this.panel.checkedValue;
17178
+ },
17179
+ isChecked() {
17180
+ return this.node.isSameNode(this.checkedValue);
17181
+ },
17182
+ inActivePath() {
17183
+ return this.isInPath(this.panel.activePath);
17184
+ },
17185
+ inCheckedPath() {
17186
+ if (!this.config.checkStrictly) return false;
17187
+ return this.panel.checkedNodePaths.some(checkedPath => this.isInPath(checkedPath));
17188
+ },
17189
+ value() {
17190
+ return this.node.getValueByOption();
17191
+ }
17192
+ },
17193
+ methods: {
17194
+ handleExpand() {
17195
+ const {
17196
+ panel,
17197
+ node,
17198
+ isDisabled,
17199
+ config
17200
+ } = this;
17201
+ const {
17202
+ multiple,
17203
+ checkStrictly
17204
+ } = config;
17205
+ if (!checkStrictly && isDisabled || node.loading) return;
17206
+ if (config.lazy && !node.loaded) {
17207
+ panel.lazyLoad(node, () => {
17208
+ // do not use cached leaf value here, invoke this.isLeaf to get new value.
17209
+ const {
17210
+ isLeaf
17211
+ } = this;
17212
+ if (!isLeaf) this.handleExpand();
17213
+ if (multiple) {
17214
+ // if leaf sync checked state, else clear checked state
17215
+ const checked = isLeaf ? node.checked : false;
17216
+ this.handleMultiCheckChange(checked);
17217
+ }
17218
+ });
17219
+ } else {
17220
+ panel.handleExpand(node);
17221
+ }
17222
+ },
17223
+ handleCheckChange() {
17224
+ const {
17225
+ panel,
17226
+ value,
17227
+ node
17228
+ } = this;
17229
+ panel.handleCheckChange(value);
17230
+ panel.handleExpand(node);
17231
+ },
17232
+ handleMultiCheckChange(checked) {
17233
+ this.node.doCheck(checked);
17234
+ this.panel.calculateMultiCheckedValue();
17235
+ },
17236
+ isInPath(pathNodes) {
17237
+ const {
17238
+ node
17239
+ } = this;
17240
+ const selectedPathNode = pathNodes[node.level - 1] || {};
17241
+ return selectedPathNode.uid === node.uid;
17242
+ },
17243
+ renderPrefix(h) {
17244
+ const {
17245
+ isLeaf,
17246
+ isChecked,
17247
+ config
17248
+ } = this;
17249
+ const {
17250
+ checkStrictly,
17251
+ multiple
17252
+ } = config;
17253
+ if (multiple) {
17254
+ return this.renderCheckbox(h);
17255
+ } else if (checkStrictly) {
17256
+ return this.renderRadio(h);
17257
+ } else if (isLeaf && isChecked) {
17258
+ return this.renderCheckIcon(h);
17259
+ }
17260
+ return null;
17261
+ },
17262
+ renderPostfix(h) {
17263
+ const {
17264
+ node,
17265
+ isLeaf
17266
+ } = this;
17267
+ if (node.loading) {
17268
+ return this.renderLoadingIcon(h);
17269
+ } else if (!isLeaf) {
17270
+ return this.renderExpandIcon(h);
17271
+ }
17272
+ return null;
17273
+ },
17274
+ renderCheckbox(h) {
17275
+ const {
17276
+ node,
17277
+ config,
17278
+ isDisabled
17279
+ } = this;
17280
+ const events = {
17281
+ on: {
17282
+ change: this.handleMultiCheckChange
17283
+ },
17284
+ nativeOn: {}
17285
+ };
17286
+ if (config.checkStrictly) {
17287
+ // when every node is selectable, click event should not trigger expand event.
17288
+ events.nativeOn.click = stopPropagation;
17289
+ }
17290
+ return h("p-checkbox", helper_default()([{
17291
+ "attrs": {
17292
+ "value": node.checked,
17293
+ "indeterminate": node.indeterminate,
17294
+ "disabled": isDisabled
17295
+ }
17296
+ }, events]));
17297
+ },
17298
+ renderRadio(h) {
17299
+ let {
17300
+ checkedValue,
17301
+ value,
17302
+ isDisabled
17303
+ } = this;
17304
+
17305
+ // to keep same reference if value cause radio's checked state is calculated by reference comparision;
17306
+ if (util_isEqual(value, checkedValue)) {
17307
+ value = checkedValue;
17308
+ }
17309
+ return h("p-radio", {
17310
+ "attrs": {
17311
+ "value": checkedValue,
17312
+ "label": value,
17313
+ "disabled": isDisabled
17314
+ },
17315
+ "on": {
17316
+ "change": this.handleCheckChange
17317
+ },
17318
+ "nativeOn": {
17319
+ "click": stopPropagation
17320
+ }
17321
+ }, [h("span")]);
17322
+ },
17323
+ renderCheckIcon(h) {
17324
+ return h("i", {
17325
+ "class": "el-icon-check p-cascader-node__prefix"
17326
+ });
17327
+ },
17328
+ renderLoadingIcon(h) {
17329
+ return h("i", {
17330
+ "class": "el-icon-loading p-cascader-node__postfix"
17331
+ });
17332
+ },
17333
+ renderExpandIcon(h) {
17334
+ return h("i", {
17335
+ "class": "el-icon-arrow-right p-cascader-node__postfix"
17336
+ });
17337
+ },
17338
+ renderContent(h) {
17339
+ const {
17340
+ panel,
17341
+ node
17342
+ } = this;
17343
+ const render = panel.renderLabelFn;
17344
+ const vnode = render ? render({
17345
+ node,
17346
+ data: node.data
17347
+ }) : null;
17348
+ return h("span", {
17349
+ "class": "p-cascader-node__label"
17350
+ }, [vnode || node.label]);
17351
+ }
17352
+ },
17353
+ render(h) {
17354
+ const {
17355
+ inActivePath,
17356
+ inCheckedPath,
17357
+ isChecked,
17358
+ isLeaf,
17359
+ isDisabled,
17360
+ config,
17361
+ nodeId
17362
+ } = this;
17363
+ const {
17364
+ expandTrigger,
17365
+ checkStrictly,
17366
+ multiple
17367
+ } = config;
17368
+ const disabled = !checkStrictly && isDisabled;
17369
+ const events = {
17370
+ on: {}
17371
+ };
17372
+ if (expandTrigger === 'click') {
17373
+ events.on.click = this.handleExpand;
17374
+ } else {
17375
+ events.on.mouseenter = e => {
17376
+ this.handleExpand();
17377
+ this.$emit('expand', e);
17378
+ };
17379
+ events.on.focus = e => {
17380
+ this.handleExpand();
17381
+ this.$emit('expand', e);
17382
+ };
17383
+ }
17384
+ if (isLeaf && !isDisabled && !checkStrictly && !multiple) {
17385
+ events.on.click = this.handleCheckChange;
17386
+ }
17387
+ return h("li", helper_default()([{
17388
+ "attrs": {
17389
+ "role": "menuitem",
17390
+ "id": nodeId,
17391
+ "aria-expanded": inActivePath,
17392
+ "tabindex": disabled ? null : -1
17393
+ },
17394
+ "class": {
17395
+ 'p-cascader-node': true,
17396
+ 'is-selectable': checkStrictly,
17397
+ 'in-active-path': inActivePath,
17398
+ 'in-checked-path': inCheckedPath,
17399
+ 'is-active': isChecked,
17400
+ 'is-disabled': disabled
17401
+ }
17402
+ }, events]), [this.renderPrefix(h), this.renderContent(h), this.renderPostfix(h)]);
17403
+ }
17404
+ });
17405
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/src/cascader-node.vue?vue&type=script&lang=js
17406
+ /* harmony default export */ var src_cascader_nodevue_type_script_lang_js = (cascader_nodevue_type_script_lang_js);
17407
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/src/cascader-node.vue
17408
+ var cascader_node_render, cascader_node_staticRenderFns
17409
+
17410
+
17411
+
17412
+
17413
+ /* normalize component */
17414
+
17415
+ var cascader_node_component = normalizeComponent(
17416
+ src_cascader_nodevue_type_script_lang_js,
17417
+ cascader_node_render,
17418
+ cascader_node_staticRenderFns,
17419
+ false,
17420
+ null,
17421
+ null,
17422
+ null
17423
+
17424
+ )
17425
+
17426
+ /* harmony default export */ var cascader_node = (cascader_node_component.exports);
17427
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js
17428
+
17429
+
17430
+
17431
+
17432
+
17433
+
17434
+
17435
+ /* harmony default export */ var cascader_menuvue_type_script_lang_js = ({
17436
+ name: 'PCascaderMenu',
17437
+ mixins: [mixins_locale],
17438
+ inject: ['panel'],
17439
+ components: {
17440
+ PScrollbar: p_scrollbar,
17441
+ CascaderNode: cascader_node
17442
+ },
17443
+ props: {
17444
+ nodes: {
17445
+ type: Array,
17446
+ required: true
17447
+ },
17448
+ index: Number
17449
+ },
17450
+ data() {
17451
+ return {
17452
+ activeNode: null,
17453
+ hoverTimer: null,
17454
+ id: generateId()
17455
+ };
17456
+ },
17457
+ computed: {
17458
+ isEmpty() {
17459
+ return !this.nodes.length;
17460
+ },
17461
+ menuId() {
17462
+ return `cascader-menu-${this.id}-${this.index}`;
17463
+ }
17464
+ },
17465
+ methods: {
17466
+ handleExpand(e) {
17467
+ this.activeNode = e.target;
17468
+ },
17469
+ handleMouseMove(e) {
17470
+ const {
17471
+ activeNode,
17472
+ hoverTimer
17473
+ } = this;
17474
+ const {
17475
+ hoverZone
17476
+ } = this.$refs;
17477
+ if (!activeNode || !hoverZone) return;
17478
+ if (activeNode.contains(e.target)) {
17479
+ clearTimeout(hoverTimer);
17480
+ const {
17481
+ left
17482
+ } = this.$el.getBoundingClientRect();
17483
+ const startX = e.clientX - left;
17484
+ const {
17485
+ offsetWidth,
17486
+ offsetHeight
17487
+ } = this.$el;
17488
+ const top = activeNode.offsetTop;
17489
+ const bottom = top + activeNode.offsetHeight;
17490
+ hoverZone.innerHTML = `
17491
+ <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${top} L${offsetWidth} 0 V${top} Z" />
17492
+ <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${bottom} L${offsetWidth} ${offsetHeight} V${bottom} Z" />
17493
+ `;
17494
+ } else if (!hoverTimer) {
17495
+ this.hoverTimer = setTimeout(this.clearHoverZone, this.panel.config.hoverThreshold);
17496
+ }
17497
+ },
17498
+ clearHoverZone() {
17499
+ const {
17500
+ hoverZone
17501
+ } = this.$refs;
17502
+ if (!hoverZone) return;
17503
+ hoverZone.innerHTML = '';
17504
+ },
17505
+ renderEmptyText(h) {
17506
+ return h("div", {
17507
+ "class": "p-cascader-menu__empty-text"
17508
+ }, [this.t('el.cascader.noData')]);
17509
+ },
17510
+ renderNodeList(h) {
17511
+ const {
17512
+ menuId
17513
+ } = this;
17514
+ const {
17515
+ isHoverMenu
17516
+ } = this.panel;
17517
+ const events = {
17518
+ on: {}
17519
+ };
17520
+ if (isHoverMenu) {
17521
+ events.on.expand = this.handleExpand;
17522
+ }
17523
+ const nodes = this.nodes.map((node, index) => {
17524
+ const {
17525
+ hasChildren
17526
+ } = node;
17527
+ return h("cascader-node", helper_default()([{
17528
+ "key": node.uid,
17529
+ "attrs": {
17530
+ "node": node,
17531
+ "node-id": `${menuId}-${index}`,
17532
+ "aria-haspopup": hasChildren,
17533
+ "aria-owns": hasChildren ? menuId : null
17534
+ }
17535
+ }, events]));
17536
+ });
17537
+ return [...nodes, isHoverMenu ? h("svg", {
17538
+ "ref": 'hoverZone',
17539
+ "class": 'p-cascader-menu__hover-zone'
17540
+ }) : null];
17541
+ }
17542
+ },
17543
+ render(h) {
17544
+ const {
17545
+ isEmpty,
17546
+ menuId
17547
+ } = this;
17548
+ const events = {
17549
+ nativeOn: {}
17550
+ };
17551
+
17552
+ // optimize hover to expand experience (#8010)
17553
+ if (this.panel.isHoverMenu) {
17554
+ events.nativeOn.mousemove = this.handleMouseMove;
17555
+ // events.nativeOn.mouseleave = this.clearHoverZone;
17556
+ }
17557
+ return h("p-scrollbar", helper_default()([{
17558
+ "attrs": {
17559
+ "tag": "ul",
17560
+ "role": "menu",
17561
+ "id": menuId,
17562
+ "wrap-class": "p-cascader-menu__wrap",
17563
+ "view-class": {
17564
+ 'p-cascader-menu__list': true,
17565
+ 'is-empty': isEmpty
17566
+ }
17567
+ },
17568
+ "class": "p-cascader-menu"
17569
+ }, events]), [isEmpty ? this.renderEmptyText(h) : this.renderNodeList(h)]);
17570
+ }
17571
+ });
17572
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js
17573
+ /* harmony default export */ var src_cascader_menuvue_type_script_lang_js = (cascader_menuvue_type_script_lang_js);
17574
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/src/cascader-menu.vue
17575
+ var cascader_menu_render, cascader_menu_staticRenderFns
17576
+
17577
+
17578
+
17579
+
17580
+ /* normalize component */
17581
+
17582
+ var cascader_menu_component = normalizeComponent(
17583
+ src_cascader_menuvue_type_script_lang_js,
17584
+ cascader_menu_render,
17585
+ cascader_menu_staticRenderFns,
17586
+ false,
17587
+ null,
17588
+ null,
17589
+ null
17590
+
17591
+ )
17592
+
17593
+ /* harmony default export */ var cascader_menu = (cascader_menu_component.exports);
17594
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/src/node.js
17595
+
17596
+
17597
+
17598
+
17599
+
17600
+
17601
+
17602
+
17603
+
17604
+
17605
+ let uid = 0;
17606
+ class node_Node {
17607
+ constructor(data, config, parentNode) {
17608
+ this.data = data;
17609
+ this.config = config;
17610
+ this.parent = parentNode || null;
17611
+ this.level = !this.parent ? 1 : this.parent.level + 1;
17612
+ this.uid = uid++;
17613
+ this.initState();
17614
+ this.initChildren();
17615
+ }
17616
+ initState() {
17617
+ const {
17618
+ value: valueKey,
17619
+ label: labelKey
17620
+ } = this.config;
17621
+ this.value = this.data[valueKey];
17622
+ this.label = this.data[labelKey];
17623
+ this.pathNodes = this.calculatePathNodes();
17624
+ this.path = this.pathNodes.map(node => node.value);
17625
+ this.pathLabels = this.pathNodes.map(node => node.label);
17626
+
17627
+ // lazy load
17628
+ this.loading = false;
17629
+ this.loaded = false;
17630
+ }
17631
+ initChildren() {
17632
+ const {
17633
+ config
17634
+ } = this;
17635
+ const childrenKey = config.children;
17636
+ const childrenData = this.data[childrenKey];
17637
+ this.hasChildren = Array.isArray(childrenData);
17638
+ this.children = (childrenData || []).map(child => new node_Node(child, config, this));
17639
+ }
17640
+ get isDisabled() {
17641
+ const {
17642
+ data,
17643
+ parent,
17644
+ config
17645
+ } = this;
17646
+ const disabledKey = config.disabled;
17647
+ const {
17648
+ checkStrictly
17649
+ } = config;
17650
+ return data[disabledKey] || !checkStrictly && parent && parent.isDisabled;
17651
+ }
17652
+ get isLeaf() {
17653
+ const {
17654
+ data,
17655
+ loaded,
17656
+ hasChildren,
17657
+ children
17658
+ } = this;
17659
+ const {
17660
+ lazy,
17661
+ leaf: leafKey
17662
+ } = this.config;
17663
+ if (lazy) {
17664
+ const isLeaf = isDef(data[leafKey]) ? data[leafKey] : loaded ? !children.length : false;
17665
+ this.hasChildren = !isLeaf;
17666
+ return isLeaf;
17667
+ }
17668
+ return !hasChildren;
17669
+ }
17670
+ calculatePathNodes() {
17671
+ const nodes = [this];
17672
+ let parent = this.parent;
17673
+ while (parent) {
17674
+ nodes.unshift(parent);
17675
+ parent = parent.parent;
17676
+ }
17677
+ return nodes;
17678
+ }
17679
+ getPath() {
17680
+ return this.path;
17681
+ }
17682
+ getValue() {
17683
+ return this.value;
17684
+ }
17685
+ getValueByOption() {
17686
+ return this.config.emitPath ? this.getPath() : this.getValue();
17687
+ }
17688
+ getText(allLevels, separator, showLastLevels = null) {
17689
+ if (showLastLevels !== null && Number.isInteger(showLastLevels) && showLastLevels > 0) {
17690
+ // 显示最后N个层级
17691
+ const labels = this.pathLabels;
17692
+ const startIndex = Math.max(0, labels.length - showLastLevels);
17693
+ return labels.slice(startIndex).join(separator);
17694
+ }
17695
+ return allLevels ? this.pathLabels.join(separator) : this.label;
17696
+ }
17697
+ isSameNode(checkedValue) {
17698
+ const value = this.getValueByOption();
17699
+ return this.config.multiple && Array.isArray(checkedValue) ? checkedValue.some(val => util_isEqual(val, value)) : util_isEqual(checkedValue, value);
17700
+ }
17701
+ broadcast(event, ...args) {
17702
+ const handlerName = `onParent${capitalize(event)}`;
17703
+ this.children.forEach(child => {
17704
+ if (child) {
17705
+ // bottom up
17706
+ child.broadcast(event, ...args);
17707
+ child[handlerName] && child[handlerName](...args);
17708
+ }
17709
+ });
17710
+ }
17711
+ emit(event, ...args) {
17712
+ const {
17713
+ parent
17714
+ } = this;
17715
+ const handlerName = `onChild${capitalize(event)}`;
17716
+ if (parent) {
17717
+ parent[handlerName] && parent[handlerName](...args);
17718
+ parent.emit(event, ...args);
17719
+ }
17720
+ }
17721
+ onParentCheck(checked) {
17722
+ if (!this.isDisabled) {
17723
+ this.setCheckState(checked);
17724
+ }
17725
+ }
17726
+ onChildCheck() {
17727
+ const {
17728
+ children
17729
+ } = this;
17730
+ const validChildren = children.filter(child => !child.isDisabled);
17731
+ const checked = validChildren.length ? validChildren.every(child => child.checked) : false;
17732
+ this.setCheckState(checked);
17733
+ }
17734
+ setCheckState(checked) {
17735
+ const totalNum = this.children.length;
17736
+ const checkedNum = this.children.reduce((c, p) => {
17737
+ const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;
17738
+ return c + num;
17739
+ }, 0);
17740
+ this.checked = checked;
17741
+ this.indeterminate = checkedNum !== totalNum && checkedNum > 0;
17742
+ }
17743
+ syncCheckState(checkedValue) {
17744
+ const value = this.getValueByOption();
17745
+ const checked = this.isSameNode(checkedValue, value);
17746
+ this.doCheck(checked);
17747
+ }
17748
+ doCheck(checked) {
17749
+ if (this.checked !== checked) {
17750
+ if (this.config.checkStrictly) {
17751
+ this.checked = checked;
17752
+ } else {
17753
+ // bottom up to unify the calculation of the indeterminate state
17754
+ this.broadcast('check', checked);
17755
+ this.setCheckState(checked);
17756
+ this.emit('check');
17757
+ }
17758
+ }
17759
+ }
17760
+ }
17761
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/src/store.js
17762
+
17763
+
17764
+
17765
+
17766
+
17767
+
17768
+
17769
+
17770
+
17771
+ const flatNodes = (data, leafOnly) => {
17772
+ return data.reduce((res, node) => {
17773
+ if (node.isLeaf) {
17774
+ res.push(node);
17775
+ } else {
17776
+ !leafOnly && res.push(node);
17777
+ res = res.concat(flatNodes(node.children, leafOnly));
17778
+ }
17779
+ return res;
17780
+ }, []);
17781
+ };
17782
+ class store_Store {
17783
+ constructor(data, config) {
17784
+ this.config = config;
17785
+ this.initNodes(data);
17786
+ }
17787
+ initNodes(data) {
17788
+ data = coerceTruthyValueToArray(data);
17789
+ this.nodes = data.map(nodeData => new node_Node(nodeData, this.config));
17790
+ this.flattedNodes = this.getFlattedNodes(false, false);
17791
+ this.leafNodes = this.getFlattedNodes(true, false);
17792
+ }
17793
+ appendNode(nodeData, parentNode) {
17794
+ const node = new node_Node(nodeData, this.config, parentNode);
17795
+ const children = parentNode ? parentNode.children : this.nodes;
17796
+ children.push(node);
17797
+ }
17798
+ appendNodes(nodeDataList, parentNode) {
17799
+ nodeDataList = coerceTruthyValueToArray(nodeDataList);
17800
+ nodeDataList.forEach(nodeData => this.appendNode(nodeData, parentNode));
17801
+ }
17802
+ getNodes() {
17803
+ return this.nodes;
17804
+ }
17805
+ getFlattedNodes(leafOnly, cached = true) {
17806
+ const cachedNodes = leafOnly ? this.leafNodes : this.flattedNodes;
17807
+ return cached ? cachedNodes : flatNodes(this.nodes, leafOnly);
17808
+ }
17809
+ getNodeByValue(value) {
17810
+ const nodes = this.getFlattedNodes(false, !this.config.lazy).filter(node => valueEquals(node.path, value) || node.value === value);
17811
+ return nodes && nodes.length ? nodes[0] : null;
17812
+ }
17813
+ }
17814
+ // CONCATENATED MODULE: ./src/utils/aria-utils.js
17815
+ var aria = aria || {};
17816
+ aria.Utils = aria.Utils || {};
17817
+
17818
+ /**
17819
+ * @desc Set focus on descendant nodes until the first focusable element is
17820
+ * found.
17821
+ * @param element
17822
+ * DOM node for which to find the first focusable descendant.
17823
+ * @returns
17824
+ * true if a focusable element is found and focus is set.
17825
+ */
17826
+ aria.Utils.focusFirstDescendant = function (element) {
17827
+ for (var i = 0; i < element.childNodes.length; i++) {
17828
+ var child = element.childNodes[i];
17829
+ if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
17830
+ return true;
17831
+ }
17832
+ }
17833
+ return false;
17834
+ };
17835
+
17836
+ /**
17837
+ * @desc Find the last descendant node that is focusable.
17838
+ * @param element
17839
+ * DOM node for which to find the last focusable descendant.
17840
+ * @returns
17841
+ * true if a focusable element is found and focus is set.
17842
+ */
17843
+
17844
+ aria.Utils.focusLastDescendant = function (element) {
17845
+ for (var i = element.childNodes.length - 1; i >= 0; i--) {
17846
+ var child = element.childNodes[i];
17847
+ if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
17848
+ return true;
17849
+ }
17850
+ }
17851
+ return false;
17852
+ };
17853
+
17854
+ /**
17855
+ * @desc Set Attempt to set focus on the current node.
17856
+ * @param element
17857
+ * The node to attempt to focus on.
17858
+ * @returns
17859
+ * true if element is focused.
17860
+ */
17861
+ aria.Utils.attemptFocus = function (element) {
17862
+ if (!aria.Utils.isFocusable(element)) {
17863
+ return false;
17864
+ }
17865
+ aria.Utils.IgnoreUtilFocusChanges = true;
17866
+ try {
17867
+ element.focus();
17868
+ } catch (e) {}
17869
+ aria.Utils.IgnoreUtilFocusChanges = false;
17870
+ return document.activeElement === element;
17871
+ };
17872
+ aria.Utils.isFocusable = function (element) {
17873
+ if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
17874
+ return true;
17875
+ }
17876
+ if (element.disabled) {
17877
+ return false;
17878
+ }
17879
+ switch (element.nodeName) {
17880
+ case 'A':
17881
+ return !!element.href && element.rel !== 'ignore';
17882
+ case 'INPUT':
17883
+ return element.type !== 'hidden' && element.type !== 'file';
17884
+ case 'BUTTON':
17885
+ case 'SELECT':
17886
+ case 'TEXTAREA':
17887
+ return true;
17888
+ default:
17889
+ return false;
17890
+ }
17891
+ };
17892
+
17893
+ /**
17894
+ * 触发一个事件
17895
+ * mouseenter, mouseleave, mouseover, keyup, change, click 等
17896
+ * @param {Element} elm
17897
+ * @param {String} name
17898
+ * @param {*} opts
17899
+ */
17900
+ aria.Utils.triggerEvent = function (elm, name, ...opts) {
17901
+ let eventName;
17902
+ if (/^mouse|click/.test(name)) {
17903
+ eventName = 'MouseEvents';
17904
+ } else if (/^key/.test(name)) {
17905
+ eventName = 'KeyboardEvent';
17906
+ } else {
17907
+ eventName = 'HTMLEvents';
17908
+ }
17909
+ const evt = document.createEvent(eventName);
17910
+ evt.initEvent(name, ...opts);
17911
+ elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
17912
+ return elm;
17913
+ };
17914
+ aria.Utils.keys = {
17915
+ tab: 9,
17916
+ enter: 13,
17917
+ space: 32,
17918
+ left: 37,
17919
+ up: 38,
17920
+ right: 39,
17921
+ down: 40,
17922
+ esc: 27
17923
+ };
17924
+ /* harmony default export */ var aria_utils = (aria.Utils);
17925
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js
17926
+
17927
+
17928
+
17929
+
17930
+
17931
+
17932
+
17933
+
17934
+
17935
+
17936
+
17937
+ const {
17938
+ keys: KeyCode
17939
+ } = aria_utils;
17940
+ const DefaultProps = {
17941
+ expandTrigger: 'click',
17942
+ // or hover
17943
+ multiple: false,
17944
+ checkStrictly: false,
17945
+ // whether all nodes can be selected
17946
+ emitPath: true,
17947
+ // wether to emit an array of all levels value in which node is located
17948
+ lazy: false,
17949
+ lazyLoad: noop,
17950
+ value: 'value',
17951
+ label: 'label',
17952
+ children: 'children',
17953
+ leaf: 'leaf',
17954
+ disabled: 'disabled',
17955
+ hoverThreshold: 500
17956
+ };
17957
+ const cascader_panelvue_type_script_lang_js_isLeaf = el => !el.getAttribute('aria-owns');
17958
+ const getSibling = (el, distance) => {
17959
+ const {
17960
+ parentNode
17961
+ } = el;
17962
+ if (parentNode) {
17963
+ const siblings = parentNode.querySelectorAll('.p-cascader-node[tabindex="-1"]');
17964
+ const index = Array.prototype.indexOf.call(siblings, el);
17965
+ return siblings[index + distance] || null;
17966
+ }
17967
+ return null;
17968
+ };
17969
+ const getMenuIndex = (el, distance) => {
17970
+ if (!el) return;
17971
+ const pieces = el.id.split('-');
17972
+ return Number(pieces[pieces.length - 2]);
17973
+ };
17974
+ const focusNode = el => {
17975
+ if (!el) return;
17976
+ el.focus();
17977
+ !cascader_panelvue_type_script_lang_js_isLeaf(el) && el.click();
17978
+ };
17979
+ const checkNode = el => {
17980
+ if (!el) return;
17981
+ const input = el.querySelector('input');
17982
+ if (input) {
17983
+ input.click();
17984
+ } else if (cascader_panelvue_type_script_lang_js_isLeaf(el)) {
17985
+ el.click();
17986
+ }
17987
+ };
17988
+ /* harmony default export */ var cascader_panelvue_type_script_lang_js = ({
17989
+ name: 'PCascaderPanel',
17990
+ components: {
17991
+ CascaderMenu: cascader_menu
17992
+ },
17993
+ props: {
17994
+ value: {},
17995
+ options: Array,
17996
+ props: Object,
17997
+ border: {
17998
+ type: Boolean,
17999
+ default: true
18000
+ },
18001
+ renderLabel: Function
18002
+ },
18003
+ provide() {
18004
+ return {
18005
+ panel: this
18006
+ };
18007
+ },
18008
+ data() {
18009
+ return {
18010
+ checkedValue: null,
18011
+ checkedNodePaths: [],
18012
+ store: [],
18013
+ menus: [],
18014
+ activePath: [],
18015
+ loadCount: 0
18016
+ };
18017
+ },
18018
+ computed: {
18019
+ config() {
18020
+ return merge({
18021
+ ...DefaultProps
18022
+ }, this.props || {});
18023
+ },
18024
+ multiple() {
18025
+ return this.config.multiple;
18026
+ },
18027
+ checkStrictly() {
18028
+ return this.config.checkStrictly;
18029
+ },
18030
+ leafOnly() {
18031
+ return !this.checkStrictly;
18032
+ },
18033
+ isHoverMenu() {
18034
+ return this.config.expandTrigger === 'hover';
18035
+ },
18036
+ renderLabelFn() {
18037
+ return this.renderLabel || this.$scopedSlots.default;
18038
+ }
18039
+ },
18040
+ watch: {
18041
+ value() {
18042
+ this.syncCheckedValue();
18043
+ this.checkStrictly && this.calculateCheckedNodePaths();
18044
+ },
18045
+ options: {
18046
+ handler: function () {
18047
+ this.initStore();
18048
+ },
18049
+ immediate: true,
18050
+ deep: true
18051
+ },
18052
+ checkedValue(val) {
18053
+ if (!util_isEqual(val, this.value)) {
18054
+ this.checkStrictly && this.calculateCheckedNodePaths();
18055
+ this.$emit('input', val);
18056
+ this.$emit('change', val);
18057
+ }
18058
+ }
18059
+ },
18060
+ mounted() {
18061
+ if (!this.isEmptyValue(this.value)) {
18062
+ this.syncCheckedValue();
18063
+ }
18064
+ },
18065
+ methods: {
18066
+ initStore() {
18067
+ const {
18068
+ config,
18069
+ options
18070
+ } = this;
18071
+ if (config.lazy && util_isEmpty(options)) {
18072
+ this.lazyLoad();
18073
+ } else {
18074
+ this.store = new store_Store(options, config);
18075
+ this.menus = [this.store.getNodes()];
18076
+ this.syncMenuState();
18077
+ }
18078
+ },
18079
+ syncCheckedValue() {
18080
+ const {
18081
+ value,
18082
+ checkedValue
18083
+ } = this;
18084
+ if (!util_isEqual(value, checkedValue)) {
18085
+ this.activePath = [];
18086
+ this.checkedValue = value;
18087
+ this.syncMenuState();
18088
+ }
18089
+ },
18090
+ syncMenuState() {
18091
+ const {
18092
+ multiple,
18093
+ checkStrictly
18094
+ } = this;
18095
+ this.syncActivePath();
18096
+ multiple && this.syncMultiCheckState();
18097
+ checkStrictly && this.calculateCheckedNodePaths();
18098
+ this.$nextTick(this.scrollIntoView);
18099
+ },
18100
+ syncMultiCheckState() {
18101
+ const nodes = this.getFlattedNodes(this.leafOnly);
18102
+ nodes.forEach(node => {
18103
+ node.syncCheckState(this.checkedValue);
18104
+ });
18105
+ },
18106
+ isEmptyValue(val) {
18107
+ const {
18108
+ multiple,
18109
+ config
18110
+ } = this;
18111
+ const {
18112
+ emitPath
18113
+ } = config;
18114
+ if (multiple || emitPath) {
18115
+ return util_isEmpty(val);
18116
+ }
18117
+ return false;
18118
+ },
18119
+ syncActivePath() {
18120
+ const {
18121
+ store,
18122
+ multiple,
18123
+ activePath,
18124
+ checkedValue
18125
+ } = this;
18126
+ if (!util_isEmpty(activePath)) {
18127
+ const nodes = activePath.map(node => this.getNodeByValue(node.getValue()));
18128
+ this.expandNodes(nodes);
18129
+ } else if (!this.isEmptyValue(checkedValue)) {
18130
+ const value = multiple ? checkedValue[0] : checkedValue;
18131
+ const checkedNode = this.getNodeByValue(value) || {};
18132
+ const nodes = (checkedNode.pathNodes || []).slice(0, -1);
18133
+ this.expandNodes(nodes);
18134
+ } else {
18135
+ this.activePath = [];
18136
+ this.menus = [store.getNodes()];
18137
+ }
18138
+ },
18139
+ expandNodes(nodes) {
18140
+ nodes.forEach(node => this.handleExpand(node, true /* silent */));
18141
+ },
18142
+ calculateCheckedNodePaths() {
18143
+ const {
18144
+ checkedValue,
18145
+ multiple
18146
+ } = this;
18147
+ const checkedValues = multiple ? coerceTruthyValueToArray(checkedValue) : [checkedValue];
18148
+ this.checkedNodePaths = checkedValues.map(v => {
18149
+ const checkedNode = this.getNodeByValue(v);
18150
+ return checkedNode ? checkedNode.pathNodes : [];
18151
+ });
18152
+ },
18153
+ handleKeyDown(e) {
18154
+ const {
18155
+ target,
18156
+ keyCode
18157
+ } = e;
18158
+ switch (keyCode) {
18159
+ case KeyCode.up:
18160
+ const prev = getSibling(target, -1);
18161
+ focusNode(prev);
18162
+ break;
18163
+ case KeyCode.down:
18164
+ const next = getSibling(target, 1);
18165
+ focusNode(next);
18166
+ break;
18167
+ case KeyCode.left:
18168
+ const preMenu = this.$refs.menu[getMenuIndex(target) - 1];
18169
+ if (preMenu) {
18170
+ const expandedNode = preMenu.$el.querySelector('.p-cascader-node[aria-expanded="true"]');
18171
+ focusNode(expandedNode);
18172
+ }
18173
+ break;
18174
+ case KeyCode.right:
18175
+ const nextMenu = this.$refs.menu[getMenuIndex(target) + 1];
18176
+ if (nextMenu) {
18177
+ const firstNode = nextMenu.$el.querySelector('.p-cascader-node[tabindex="-1"]');
18178
+ focusNode(firstNode);
18179
+ }
18180
+ break;
18181
+ case KeyCode.enter:
18182
+ checkNode(target);
18183
+ break;
18184
+ case KeyCode.esc:
18185
+ case KeyCode.tab:
18186
+ this.$emit('close');
18187
+ break;
18188
+ default:
18189
+ return;
18190
+ }
18191
+ },
18192
+ handleExpand(node, silent) {
18193
+ const {
18194
+ activePath
18195
+ } = this;
18196
+ const {
18197
+ level
18198
+ } = node;
18199
+ const path = activePath.slice(0, level - 1);
18200
+ const menus = this.menus.slice(0, level);
18201
+ if (!node.isLeaf) {
18202
+ path.push(node);
18203
+ menus.push(node.children);
18204
+ }
18205
+ this.activePath = path;
18206
+ this.menus = menus;
18207
+ if (!silent) {
18208
+ const pathValues = path.map(node => node.getValue());
18209
+ const activePathValues = activePath.map(node => node.getValue());
18210
+ if (!valueEquals(pathValues, activePathValues)) {
18211
+ this.$emit('active-item-change', pathValues); // Deprecated
18212
+ this.$emit('expand-change', pathValues);
18213
+ }
18214
+ }
18215
+ },
18216
+ handleCheckChange(value) {
18217
+ this.checkedValue = value;
18218
+ },
18219
+ lazyLoad(node, onFullfiled) {
18220
+ const {
18221
+ config
18222
+ } = this;
18223
+ if (!node) {
18224
+ node = node || {
18225
+ root: true,
18226
+ level: 0
18227
+ };
18228
+ this.store = new store_Store([], config);
18229
+ this.menus = [this.store.getNodes()];
18230
+ }
18231
+ node.loading = true;
18232
+ const resolve = dataList => {
18233
+ const parent = node.root ? null : node;
18234
+ dataList && dataList.length && this.store.appendNodes(dataList, parent);
18235
+ node.loading = false;
18236
+ node.loaded = true;
18237
+
18238
+ // dispose default value on lazy load mode
18239
+ if (Array.isArray(this.checkedValue)) {
18240
+ const nodeValue = this.checkedValue[this.loadCount++];
18241
+ const valueKey = this.config.value;
18242
+ const leafKey = this.config.leaf;
18243
+ if (Array.isArray(dataList) && dataList.filter(item => item[valueKey] === nodeValue).length > 0) {
18244
+ const checkedNode = this.store.getNodeByValue(nodeValue);
18245
+ if (!checkedNode.data[leafKey]) {
18246
+ this.lazyLoad(checkedNode, () => {
18247
+ this.handleExpand(checkedNode);
18248
+ });
18249
+ }
18250
+ if (this.loadCount === this.checkedValue.length) {
18251
+ this.$parent.computePresentText();
18252
+ }
18253
+ }
18254
+ }
18255
+ onFullfiled && onFullfiled(dataList);
18256
+ };
18257
+ config.lazyLoad(node, resolve);
18258
+ },
18259
+ /**
18260
+ * public methods
18261
+ */
18262
+ calculateMultiCheckedValue() {
18263
+ this.checkedValue = this.getCheckedNodes(this.leafOnly).map(node => node.getValueByOption());
18264
+ },
18265
+ scrollIntoView() {
18266
+ if (this.$isServer) return;
18267
+ const menus = this.$refs.menu || [];
18268
+ menus.forEach(menu => {
18269
+ const menuElement = menu.$el;
18270
+ if (menuElement) {
18271
+ const container = menuElement.querySelector('.el-scrollbar__wrap');
18272
+ const activeNode = menuElement.querySelector('.p-cascader-node.is-active') || menuElement.querySelector('.p-cascader-node.in-active-path');
18273
+ scroll_into_view_default()(container, activeNode);
18274
+ }
18275
+ });
18276
+ },
18277
+ getNodeByValue(val) {
18278
+ return this.store.getNodeByValue(val);
18279
+ },
18280
+ getFlattedNodes(leafOnly) {
18281
+ const cached = !this.config.lazy;
18282
+ return this.store.getFlattedNodes(leafOnly, cached);
18283
+ },
18284
+ getCheckedNodes(leafOnly) {
18285
+ const {
18286
+ checkedValue,
18287
+ multiple
18288
+ } = this;
18289
+ if (multiple) {
18290
+ const nodes = this.getFlattedNodes(leafOnly);
18291
+ return nodes.filter(node => node.checked);
18292
+ } else {
18293
+ return this.isEmptyValue(checkedValue) ? [] : [this.getNodeByValue(checkedValue)];
18294
+ }
18295
+ },
18296
+ clearCheckedNodes() {
18297
+ const {
18298
+ config,
18299
+ leafOnly
18300
+ } = this;
18301
+ const {
18302
+ multiple,
18303
+ emitPath
18304
+ } = config;
18305
+ if (multiple) {
18306
+ this.getCheckedNodes(leafOnly).filter(node => !node.isDisabled).forEach(node => node.doCheck(false));
18307
+ this.calculateMultiCheckedValue();
18308
+ } else {
18309
+ this.checkedValue = emitPath ? [] : null;
18310
+ }
18311
+ }
18312
+ }
18313
+ });
18314
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js
18315
+ /* harmony default export */ var src_cascader_panelvue_type_script_lang_js = (cascader_panelvue_type_script_lang_js);
18316
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/src/cascader-panel.vue
18317
+
18318
+
18319
+
18320
+
18321
+
18322
+ /* normalize component */
18323
+
18324
+ var cascader_panel_component = normalizeComponent(
18325
+ src_cascader_panelvue_type_script_lang_js,
18326
+ cascader_panelvue_type_template_id_4484171a_render,
18327
+ cascader_panelvue_type_template_id_4484171a_staticRenderFns,
18328
+ false,
18329
+ null,
18330
+ null,
18331
+ null
18332
+
18333
+ )
18334
+
18335
+ /* harmony default export */ var cascader_panel = (cascader_panel_component.exports);
18336
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader-panel/index.js
18337
+
18338
+
18339
+ /* istanbul ignore next */
18340
+ cascader_panel.install = function (Vue) {
18341
+ Vue.component(cascader_panel.name, cascader_panel);
18342
+ };
18343
+ /* harmony default export */ var p_cascader_panel = (cascader_panel);
18344
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/package-admin/p-cascader/src/cascader.vue?vue&type=script&lang=js
18345
+
18346
+
18347
+
18348
+
18349
+
18350
+
18351
+
18352
+
18353
+
18354
+
18355
+
18356
+
18357
+
18358
+
18359
+
18360
+
18361
+
18362
+
18363
+
18364
+
18365
+
18366
+ const {
18367
+ keys: cascadervue_type_script_lang_js_KeyCode
18368
+ } = aria_utils;
18369
+ const MigratingProps = {
18370
+ expandTrigger: {
18371
+ newProp: 'expandTrigger',
18372
+ type: String
18373
+ },
18374
+ changeOnSelect: {
18375
+ newProp: 'checkStrictly',
18376
+ type: Boolean
18377
+ },
18378
+ hoverThreshold: {
18379
+ newProp: 'hoverThreshold',
18380
+ type: Number
18381
+ }
18382
+ };
18383
+ const PopperMixin = {
18384
+ props: {
18385
+ placement: {
18386
+ type: String,
18387
+ default: 'bottom-start'
18388
+ },
18389
+ appendToBody: vue_popper.props.appendToBody,
18390
+ visibleArrow: {
18391
+ type: Boolean,
18392
+ default: true
18393
+ },
18394
+ arrowOffset: vue_popper.props.arrowOffset,
18395
+ offset: vue_popper.props.offset,
18396
+ boundariesPadding: vue_popper.props.boundariesPadding,
18397
+ popperOptions: vue_popper.props.popperOptions,
18398
+ transformOrigin: vue_popper.props.transformOrigin
18399
+ },
18400
+ methods: vue_popper.methods,
18401
+ data: vue_popper.data,
18402
+ beforeDestroy: vue_popper.beforeDestroy
18403
+ };
18404
+ const InputSizeMap = {
18405
+ medium: 36,
18406
+ small: 32,
18407
+ mini: 28
18408
+ };
18409
+ /* harmony default export */ var cascadervue_type_script_lang_js = ({
18410
+ name: 'PCascader',
18411
+ directives: {
18412
+ Clickoutside: clickoutside
18413
+ },
18414
+ mixins: [PopperMixin, emitter, mixins_locale, migrating],
18415
+ inject: {
18416
+ elForm: {
18417
+ default: ''
18418
+ },
18419
+ elFormItem: {
18420
+ default: ''
18421
+ }
18422
+ },
18423
+ components: {
18424
+ PInput: p_input,
18425
+ PTag: p_tag,
18426
+ PScrollbar: p_scrollbar,
18427
+ PCascaderPanel: p_cascader_panel
18428
+ },
18429
+ props: {
18430
+ value: {},
18431
+ options: Array,
18432
+ props: Object,
18433
+ size: String,
18434
+ placeholder: {
18435
+ type: String,
18436
+ default: () => t('el.cascader.placeholder')
18437
+ },
18438
+ disabled: Boolean,
18439
+ clearable: Boolean,
18440
+ filterable: Boolean,
18441
+ filterMethod: Function,
18442
+ separator: {
18443
+ type: String,
18444
+ default: ' / '
18445
+ },
18446
+ showAllLevels: {
18447
+ type: Boolean,
18448
+ default: true
18449
+ },
18450
+ showLastLevels: {
18451
+ type: Number,
18452
+ default: null,
18453
+ validator: val => val === null || Number.isInteger(val) && val > 0
18454
+ },
18455
+ collapseTags: Boolean,
18456
+ debounce: {
18457
+ type: Number,
18458
+ default: 300
18459
+ },
18460
+ beforeFilter: {
18461
+ type: Function,
18462
+ default: () => () => {}
18463
+ },
18464
+ popperClass: String
18465
+ },
18466
+ data() {
18467
+ return {
18468
+ dropDownVisible: false,
18469
+ checkedValue: this.value,
18470
+ inputHover: false,
18471
+ inputValue: null,
18472
+ presentText: null,
18473
+ presentTags: [],
18474
+ checkedNodes: [],
18475
+ filtering: false,
18476
+ suggestions: [],
18477
+ inputInitialHeight: 0,
18478
+ pressDeleteCount: 0
18479
+ };
18480
+ },
18481
+ computed: {
18482
+ realSize() {
18483
+ const _elFormItemSize = (this.elFormItem || {}).elFormItemSize;
18484
+ return this.size || _elFormItemSize || (this.$ELEMENT || {}).size;
18485
+ },
18486
+ tagSize() {
18487
+ return ['small', 'mini'].indexOf(this.realSize) > -1 ? 'mini' : 'small';
18488
+ },
18489
+ isDisabled() {
18490
+ return this.disabled || (this.elForm || {}).disabled;
18491
+ },
18492
+ config() {
18493
+ const config = this.props || {};
18494
+ const {
18495
+ $attrs
18496
+ } = this;
18497
+ Object.keys(MigratingProps).forEach(oldProp => {
18498
+ const {
18499
+ newProp,
18500
+ type
18501
+ } = MigratingProps[oldProp];
18502
+ let oldValue = $attrs[oldProp] || $attrs[kebabCase(oldProp)];
18503
+ if (isDef(oldProp) && !isDef(config[newProp])) {
18504
+ if (type === Boolean && oldValue === '') {
18505
+ oldValue = true;
18506
+ }
18507
+ config[newProp] = oldValue;
18508
+ }
18509
+ });
18510
+ return config;
18511
+ },
18512
+ multiple() {
18513
+ return this.config.multiple;
18514
+ },
18515
+ leafOnly() {
18516
+ return !this.config.checkStrictly;
18517
+ },
18518
+ readonly() {
18519
+ return !this.filterable || this.multiple;
18520
+ },
18521
+ clearBtnVisible() {
18522
+ if (!this.clearable || this.isDisabled || this.filtering || !this.inputHover) {
18523
+ return false;
18524
+ }
18525
+ return this.multiple ? !!this.checkedNodes.filter(node => !node.isDisabled).length : !!this.presentText;
18526
+ },
18527
+ panel() {
18528
+ return this.$refs.panel;
18529
+ }
18530
+ },
18531
+ watch: {
18532
+ disabled() {
18533
+ this.computePresentContent();
18534
+ },
18535
+ value(val) {
18536
+ if (!util_isEqual(val, this.checkedValue)) {
18537
+ this.checkedValue = val;
18538
+ this.computePresentContent();
18539
+ }
18540
+ },
18541
+ checkedValue(val) {
18542
+ const {
18543
+ value,
18544
+ dropDownVisible
18545
+ } = this;
18546
+ const {
18547
+ checkStrictly,
18548
+ multiple
18549
+ } = this.config;
18550
+ if (!util_isEqual(val, value) || types_isUndefined(value)) {
18551
+ this.computePresentContent();
18552
+ // hide dropdown when single mode
18553
+ if (!multiple && !checkStrictly && dropDownVisible) {
18554
+ this.toggleDropDownVisible(false);
18555
+ }
18556
+ this.$emit('input', val);
18557
+ this.$emit('change', val);
18558
+ this.dispatch('ElFormItem', 'el.form.change', [val]);
18559
+ }
18560
+ },
18561
+ options: {
18562
+ handler: function () {
18563
+ this.$nextTick(this.computePresentContent);
18564
+ },
18565
+ deep: true
18566
+ },
18567
+ presentText(val) {
18568
+ this.inputValue = val;
18569
+ },
18570
+ presentTags(val, oldVal) {
18571
+ if (this.multiple && (val.length || oldVal.length)) {
18572
+ this.$nextTick(this.updateStyle);
18573
+ }
18574
+ },
18575
+ filtering(val) {
18576
+ this.$nextTick(this.updatePopper);
18577
+ }
18578
+ },
18579
+ mounted() {
18580
+ const {
18581
+ input
18582
+ } = this.$refs;
18583
+ if (input && input.$el) {
18584
+ this.inputInitialHeight = input.$el.offsetHeight || InputSizeMap[this.realSize] || 40;
18585
+ }
18586
+ if (!this.isEmptyValue(this.value)) {
18587
+ this.computePresentContent();
18588
+ }
18589
+ this.filterHandler = debounce_default()(this.debounce, () => {
18590
+ const {
18591
+ inputValue
18592
+ } = this;
18593
+ if (!inputValue) {
18594
+ this.filtering = false;
18595
+ return;
18596
+ }
18597
+ const before = this.beforeFilter(inputValue);
18598
+ if (before && before.then) {
18599
+ before.then(this.getSuggestions);
18600
+ } else if (before !== false) {
18601
+ this.getSuggestions();
18602
+ } else {
18603
+ this.filtering = false;
18604
+ }
18605
+ });
18606
+ addResizeListener(this.$el, this.updateStyle);
18607
+ },
18608
+ beforeDestroy() {
18609
+ removeResizeListener(this.$el, this.updateStyle);
18610
+ },
18611
+ methods: {
18612
+ getMigratingConfig() {
18613
+ return {
18614
+ props: {
18615
+ 'expand-trigger': 'expand-trigger is removed, use `props.expandTrigger` instead.',
18616
+ 'change-on-select': 'change-on-select is removed, use `props.checkStrictly` instead.',
18617
+ 'hover-threshold': 'hover-threshold is removed, use `props.hoverThreshold` instead'
18618
+ },
18619
+ events: {
18620
+ 'active-item-change': 'active-item-change is renamed to expand-change'
18621
+ }
18622
+ };
18623
+ },
18624
+ toggleDropDownVisible(visible) {
18625
+ if (this.isDisabled) return;
18626
+ const {
18627
+ dropDownVisible
18628
+ } = this;
18629
+ const {
18630
+ input
18631
+ } = this.$refs;
18632
+ visible = isDef(visible) ? visible : !dropDownVisible;
18633
+ if (visible !== dropDownVisible) {
18634
+ this.dropDownVisible = visible;
18635
+ if (visible) {
18636
+ this.$nextTick(() => {
18637
+ this.updatePopper();
18638
+ this.panel.scrollIntoView();
18639
+ });
18640
+ }
18641
+ input.$refs.input.setAttribute('aria-expanded', visible);
18642
+ this.$emit('visible-change', visible);
18643
+ }
18644
+ },
18645
+ handleDropdownLeave() {
18646
+ this.filtering = false;
18647
+ this.inputValue = this.presentText;
18648
+ this.doDestroy();
18649
+ },
18650
+ handleKeyDown(event) {
18651
+ switch (event.keyCode) {
18652
+ case cascadervue_type_script_lang_js_KeyCode.enter:
18653
+ this.toggleDropDownVisible();
18654
+ break;
18655
+ case cascadervue_type_script_lang_js_KeyCode.down:
18656
+ this.toggleDropDownVisible(true);
18657
+ this.focusFirstNode();
18658
+ event.preventDefault();
18659
+ break;
18660
+ case cascadervue_type_script_lang_js_KeyCode.esc:
18661
+ case cascadervue_type_script_lang_js_KeyCode.tab:
18662
+ this.toggleDropDownVisible(false);
18663
+ break;
18664
+ }
18665
+ },
18666
+ handleFocus(e) {
18667
+ this.$emit('focus', e);
18668
+ },
18669
+ handleBlur(e) {
18670
+ this.$emit('blur', e);
18671
+ },
18672
+ handleInput(val, event) {
18673
+ !this.dropDownVisible && this.toggleDropDownVisible(true);
18674
+ if (event && event.isComposing) return;
18675
+ if (val) {
18676
+ this.filterHandler();
18677
+ } else {
18678
+ this.filtering = false;
18679
+ }
18680
+ },
18681
+ handleClear() {
18682
+ this.presentText = '';
18683
+ this.panel.clearCheckedNodes();
18684
+ },
18685
+ handleExpandChange(value) {
18686
+ this.$nextTick(this.updatePopper.bind(this));
18687
+ this.$emit('expand-change', value);
18688
+ this.$emit('active-item-change', value); // Deprecated
18689
+ },
18690
+ focusFirstNode() {
18691
+ this.$nextTick(() => {
18692
+ const {
18693
+ filtering
18694
+ } = this;
18695
+ const {
18696
+ popper,
18697
+ suggestionPanel
18698
+ } = this.$refs;
18699
+ let firstNode = null;
18700
+ if (filtering && suggestionPanel) {
18701
+ firstNode = suggestionPanel.$el.querySelector('.p-cascader__suggestion-item');
18702
+ } else {
18703
+ const firstMenu = popper.querySelector('.p-cascader-menu');
18704
+ firstNode = firstMenu.querySelector('.p-cascader-node[tabindex="-1"]');
18705
+ }
18706
+ if (firstNode) {
18707
+ firstNode.focus();
18708
+ !filtering && firstNode.click();
18709
+ }
18710
+ });
18711
+ },
18712
+ computePresentContent() {
18713
+ // nextTick is required, because checked nodes may not change right now
18714
+ this.$nextTick(() => {
18715
+ if (this.config.multiple) {
18716
+ this.computePresentTags();
18717
+ this.presentText = this.presentTags.length ? ' ' : null;
18718
+ } else {
18719
+ this.computePresentText();
18720
+ }
18721
+ });
18722
+ },
18723
+ isEmptyValue(val) {
18724
+ const {
18725
+ multiple
18726
+ } = this;
18727
+ const {
18728
+ emitPath
18729
+ } = this.panel.config;
18730
+ if (multiple || emitPath) {
18731
+ return util_isEmpty(val);
18732
+ }
18733
+ return false;
18734
+ },
18735
+ computePresentText() {
18736
+ const {
18737
+ checkedValue,
18738
+ config
18739
+ } = this;
18740
+ if (!this.isEmptyValue(checkedValue)) {
18741
+ const node = this.panel.getNodeByValue(checkedValue);
18742
+ if (node && (config.checkStrictly || node.isLeaf)) {
18743
+ this.presentText = node.getText(this.showAllLevels, this.separator, this.showLastLevels);
18744
+ return;
18745
+ }
18746
+ }
18747
+ this.presentText = null;
18748
+ },
18749
+ computePresentTags() {
18750
+ const {
18751
+ isDisabled,
18752
+ leafOnly,
18753
+ showAllLevels,
18754
+ separator,
18755
+ collapseTags
18756
+ } = this;
18757
+ const checkedNodes = this.getCheckedNodes(leafOnly);
18758
+ const tags = [];
18759
+ const genTag = node => ({
18760
+ node,
18761
+ key: node.uid,
18762
+ text: node.getText(showAllLevels, separator, this.showLastLevels),
18763
+ hitState: false,
18764
+ closable: !isDisabled && !node.isDisabled
18765
+ });
18766
+ if (checkedNodes.length) {
18767
+ const [first, ...rest] = checkedNodes;
18768
+ const restCount = rest.length;
18769
+ tags.push(genTag(first));
18770
+ if (restCount) {
18771
+ if (collapseTags) {
18772
+ tags.push({
18773
+ key: -1,
18774
+ text: `+ ${restCount}`,
18775
+ closable: false
18776
+ });
18777
+ } else {
18778
+ rest.forEach(node => tags.push(genTag(node)));
18779
+ }
18780
+ }
18781
+ }
18782
+ this.checkedNodes = checkedNodes;
18783
+ this.presentTags = tags;
18784
+ },
18785
+ getSuggestions() {
18786
+ let {
18787
+ filterMethod
18788
+ } = this;
18789
+ if (!isFunction(filterMethod)) {
18790
+ filterMethod = (node, keyword) => node.text.includes(keyword);
18791
+ }
18792
+ const suggestions = this.panel.getFlattedNodes(this.leafOnly).filter(node => {
18793
+ if (node.isDisabled) return false;
18794
+ node.text = node.getText(this.showAllLevels, this.separator, this.showLastLevels) || '';
18795
+ return filterMethod(node, this.inputValue);
18796
+ });
18797
+ if (this.multiple) {
18798
+ this.presentTags.forEach(tag => {
18799
+ tag.hitState = false;
18800
+ });
18801
+ } else {
18802
+ suggestions.forEach(node => {
18803
+ node.checked = util_isEqual(this.checkedValue, node.getValueByOption());
18804
+ });
18805
+ }
18806
+ this.filtering = true;
18807
+ this.suggestions = suggestions;
18808
+ this.$nextTick(this.updatePopper);
18809
+ },
18810
+ handleSuggestionKeyDown(event) {
18811
+ const {
18812
+ keyCode,
18813
+ target
18814
+ } = event;
18815
+ switch (keyCode) {
18816
+ case cascadervue_type_script_lang_js_KeyCode.enter:
18817
+ target.click();
18818
+ break;
18819
+ case cascadervue_type_script_lang_js_KeyCode.up:
18820
+ const prev = target.previousElementSibling;
18821
+ prev && prev.focus();
18822
+ break;
18823
+ case cascadervue_type_script_lang_js_KeyCode.down:
18824
+ const next = target.nextElementSibling;
18825
+ next && next.focus();
18826
+ break;
18827
+ case cascadervue_type_script_lang_js_KeyCode.esc:
18828
+ case cascadervue_type_script_lang_js_KeyCode.tab:
18829
+ this.toggleDropDownVisible(false);
18830
+ break;
18831
+ }
18832
+ },
18833
+ handleDelete() {
18834
+ const {
18835
+ inputValue,
18836
+ pressDeleteCount,
18837
+ presentTags
18838
+ } = this;
18839
+ const lastIndex = presentTags.length - 1;
18840
+ const lastTag = presentTags[lastIndex];
18841
+ this.pressDeleteCount = inputValue ? 0 : pressDeleteCount + 1;
18842
+ if (!lastTag) return;
18843
+ if (this.pressDeleteCount) {
18844
+ if (lastTag.hitState) {
18845
+ this.deleteTag(lastTag);
18846
+ } else {
18847
+ lastTag.hitState = true;
18848
+ }
18849
+ }
18850
+ },
18851
+ handleSuggestionClick(index) {
18852
+ const {
18853
+ multiple
18854
+ } = this;
18855
+ const targetNode = this.suggestions[index];
18856
+ if (multiple) {
18857
+ const {
18858
+ checked
18859
+ } = targetNode;
18860
+ targetNode.doCheck(!checked);
18861
+ this.panel.calculateMultiCheckedValue();
18862
+ } else {
18863
+ this.checkedValue = targetNode.getValueByOption();
18864
+ this.toggleDropDownVisible(false);
18865
+ }
18866
+ },
18867
+ deleteTag(tag) {
18868
+ const {
18869
+ checkedValue
18870
+ } = this;
18871
+ const current = tag.node.getValueByOption();
18872
+ const val = checkedValue.find(n => util_isEqual(n, current));
18873
+ this.checkedValue = checkedValue.filter(n => !util_isEqual(n, current));
18874
+ this.$emit('remove-tag', val);
18875
+ },
18876
+ updateStyle() {
18877
+ const {
18878
+ $el,
18879
+ inputInitialHeight
18880
+ } = this;
18881
+ if (this.$isServer || !$el) return;
18882
+ const {
18883
+ suggestionPanel
18884
+ } = this.$refs;
18885
+ const inputInner = $el.querySelector('.el-input__inner');
18886
+ if (!inputInner) return;
18887
+ const tags = $el.querySelector('.p-cascader__tags');
18888
+ let suggestionPanelEl = null;
18889
+ if (suggestionPanel && (suggestionPanelEl = suggestionPanel.$el)) {
18890
+ const suggestionList = suggestionPanelEl.querySelector('.p-cascader__suggestion-list');
18891
+ suggestionList.style.minWidth = inputInner.offsetWidth + 'px';
18892
+ }
18893
+ if (tags) {
18894
+ const offsetHeight = Math.round(tags.getBoundingClientRect().height);
18895
+ const height = Math.max(offsetHeight + 6, inputInitialHeight) + 'px';
18896
+ inputInner.style.height = height;
18897
+ if (this.dropDownVisible) {
18898
+ this.updatePopper();
18899
+ }
18900
+ }
18901
+ },
18902
+ /**
18903
+ * public methods
18904
+ */
18905
+ getCheckedNodes(leafOnly) {
18906
+ return this.panel.getCheckedNodes(leafOnly);
18907
+ }
18908
+ }
18909
+ });
18910
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader/src/cascader.vue?vue&type=script&lang=js
18911
+ /* harmony default export */ var src_cascadervue_type_script_lang_js = (cascadervue_type_script_lang_js);
18912
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader/src/cascader.vue
18913
+
18914
+
18915
+
18916
+
18917
+
18918
+ /* normalize component */
18919
+
18920
+ var cascader_component = normalizeComponent(
18921
+ src_cascadervue_type_script_lang_js,
18922
+ cascadervue_type_template_id_93427a92_render,
18923
+ cascadervue_type_template_id_93427a92_staticRenderFns,
18924
+ false,
18925
+ null,
18926
+ null,
18927
+ null
18928
+
18929
+ )
18930
+
18931
+ /* harmony default export */ var cascader = (cascader_component.exports);
18932
+ // CONCATENATED MODULE: ./src/package-admin/p-cascader/index.js
18933
+
18934
+
18935
+ /* istanbul ignore next */
18936
+ cascader.install = function (Vue) {
18937
+ Vue.component(cascader.name, cascader);
18938
+ };
18939
+ /* harmony default export */ var p_cascader = (cascader);
16436
18940
  // EXTERNAL MODULE: ./src/theme-chalk/src/index.scss
16437
18941
  var theme_chalk_src = __webpack_require__("b531");
16438
18942
 
@@ -16450,6 +18954,10 @@ var theme_chalk_src = __webpack_require__("b531");
16450
18954
 
16451
18955
 
16452
18956
 
18957
+
18958
+
18959
+
18960
+
16453
18961
  // 导入语言包
16454
18962
 
16455
18963
 
@@ -16457,7 +18965,7 @@ var theme_chalk_src = __webpack_require__("b531");
16457
18965
 
16458
18966
 
16459
18967
  // 所有组件
16460
- const components = [p_table, p_input, p_tag, p_tooltip, p_scrollbar, p_select, p_option, p_option_group, select_dropdown, Table_column, p_test_button];
18968
+ const components = [p_table, p_input, p_tag, p_tooltip, p_scrollbar, p_select, p_option, p_option_group, select_dropdown, Table_column, p_test_button, p_cascader, p_cascader_panel, p_checkbox, p_radio];
16461
18969
 
16462
18970
  // install 方法
16463
18971
  const install = function (Vue) {