@weitutech/by-components 1.2.19 → 1.2.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.
@@ -92423,13 +92423,22 @@ var BatchQuerySelector_component = normalizeComponent(
92423
92423
  )
92424
92424
 
92425
92425
  /* harmony default export */ var BatchQuerySelector = (BatchQuerySelector_component.exports);
92426
- ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-input/ByCommonInput.vue?vue&type=template&id=71d628fa
92427
- var ByCommonInputvue_type_template_id_71d628fa_render = function render() {
92426
+ ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-input/ByCommonInput.vue?vue&type=template&id=5ab04f01
92427
+ var ByCommonInputvue_type_template_id_5ab04f01_render = function render() {
92428
92428
  var _vm = this,
92429
92429
  _c = _vm._self._c;
92430
92430
  return _c('div', {
92431
- staticClass: "by-common-input-container"
92431
+ staticClass: "by-common-input-container",
92432
+ class: {
92433
+ 'has-batch-suffix': _vm.showBatchInput,
92434
+ 'is-clearable': _vm.showBatchInput && _vm.isClearable
92435
+ }
92436
+ }, [_c('div', {
92437
+ staticClass: "input-wrap"
92432
92438
  }, [_c('el-input', _vm._b({
92439
+ class: {
92440
+ 'has-batch-suffix': _vm.showBatchInput
92441
+ },
92433
92442
  attrs: {
92434
92443
  "value": _vm.localValue,
92435
92444
  "size": _vm.actualSize
@@ -92440,7 +92449,9 @@ var ByCommonInputvue_type_template_id_71d628fa_render = function render() {
92440
92449
  "blur": _vm.handleBlur,
92441
92450
  "focus": _vm.handleFocus
92442
92451
  }
92443
- }, 'el-input', _vm.$attrs, false)), _vm.showBatchInput ? _c('el-popover', {
92452
+ }, 'el-input', _vm.$attrs, false)), _vm.showBatchInput ? _c('div', {
92453
+ staticClass: "batch-input-suffix"
92454
+ }, [_c('el-popover', {
92444
92455
  attrs: {
92445
92456
  "placement": "bottom-end",
92446
92457
  "width": _vm.batchInputPopoverWidth,
@@ -92490,24 +92501,26 @@ var ByCommonInputvue_type_template_id_71d628fa_render = function render() {
92490
92501
  "click": _vm.handleBatchInputConfirm
92491
92502
  }
92492
92503
  }, [_vm._v("确定")])], 1)], 1), _c('el-button', {
92493
- staticClass: "batch-input-btn",
92504
+ staticClass: "batch-input-btn batch-input-btn--inner",
92505
+ class: `batch-input-btn--${_vm.actualSize}`,
92494
92506
  attrs: {
92495
92507
  "slot": "reference",
92508
+ "type": "text",
92509
+ "disabled": _vm.isDisabled,
92496
92510
  "size": _vm.actualSize
92497
92511
  },
92498
92512
  on: {
92499
- "click": _vm.handleOpenBatchInput
92513
+ "click": function ($event) {
92514
+ $event.stopPropagation();
92515
+ return _vm.handleOpenBatchInput.apply(null, arguments);
92516
+ }
92500
92517
  },
92501
92518
  slot: "reference"
92502
92519
  }, [_c('i', {
92503
- staticClass: "el-icon-edit-outline",
92504
- staticStyle: {
92505
- "transform": "scale(2)",
92506
- "display": "inline-block"
92507
- }
92508
- })])], 1) : _vm._e()], 1);
92520
+ staticClass: "el-icon-edit-outline"
92521
+ })])], 1)], 1) : _vm._e()], 1)]);
92509
92522
  };
92510
- var ByCommonInputvue_type_template_id_71d628fa_staticRenderFns = [];
92523
+ var ByCommonInputvue_type_template_id_5ab04f01_staticRenderFns = [];
92511
92524
 
92512
92525
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-input/ByCommonInput.vue?vue&type=script&lang=js
92513
92526
 
@@ -92572,6 +92585,14 @@ var ByCommonInputvue_type_template_id_71d628fa_staticRenderFns = [];
92572
92585
  // 获取实际的 size 值,优先使用 $attrs 中的 size
92573
92586
  actualSize() {
92574
92587
  return this.$attrs.size || this.size;
92588
+ },
92589
+ isClearable() {
92590
+ const val = this.$attrs.clearable;
92591
+ return val === '' || val === true || val === 'true';
92592
+ },
92593
+ isDisabled() {
92594
+ const val = this.$attrs.disabled;
92595
+ return val === '' || val === true || val === 'true';
92575
92596
  }
92576
92597
  },
92577
92598
  watch: {
@@ -92668,8 +92689,8 @@ var ByCommonInputvue_type_template_id_71d628fa_staticRenderFns = [];
92668
92689
  ;
92669
92690
  var ByCommonInput_component = normalizeComponent(
92670
92691
  common_input_ByCommonInputvue_type_script_lang_js,
92671
- ByCommonInputvue_type_template_id_71d628fa_render,
92672
- ByCommonInputvue_type_template_id_71d628fa_staticRenderFns,
92692
+ ByCommonInputvue_type_template_id_5ab04f01_render,
92693
+ ByCommonInputvue_type_template_id_5ab04f01_staticRenderFns,
92673
92694
  false,
92674
92695
  null,
92675
92696
  null,
@@ -101526,8 +101547,8 @@ var ByGridLayout_component = normalizeComponent(
101526
101547
  )
101527
101548
 
101528
101549
  /* harmony default export */ var ByGridLayout = (ByGridLayout_component.exports);
101529
- ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=template&id=275b5251
101530
- var ByTagvue_type_template_id_275b5251_render = function render() {
101550
+ ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=template&id=246a25ba
101551
+ var ByTagvue_type_template_id_246a25ba_render = function render() {
101531
101552
  var _vm = this,
101532
101553
  _c = _vm._self._c;
101533
101554
  return _c('el-tag', _vm._g(_vm._b({
@@ -101536,18 +101557,21 @@ var ByTagvue_type_template_id_275b5251_render = function render() {
101536
101557
  "type": _vm.elTagType,
101537
101558
  "color": _vm.elTagColor
101538
101559
  }
101539
- }, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.icon || _vm.$scopedSlots.icon || _vm.$slots.icon ? _c('span', {
101560
+ }, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.hasProvidedIconSlot ? _c('span', {
101540
101561
  staticClass: "by-tag__icon",
101541
101562
  attrs: {
101542
101563
  "aria-hidden": "true"
101543
101564
  }
101544
- }, [_vm._t("icon", function () {
101545
- return [_vm.icon ? _c('i', {
101546
- class: ['by-tag__icon-inner', _vm.icon]
101547
- }) : _vm._e()];
101548
- })], 2) : _vm._e(), _vm._t("default")], 2);
101565
+ }, [_vm._t("icon")], 2) : _vm.icon ? _c('span', {
101566
+ staticClass: "by-tag__icon",
101567
+ attrs: {
101568
+ "aria-hidden": "true"
101569
+ }
101570
+ }, [_c('i', {
101571
+ class: _vm.icon
101572
+ })]) : _vm._e(), _vm._t("default")], 2);
101549
101573
  };
101550
- var ByTagvue_type_template_id_275b5251_staticRenderFns = [];
101574
+ var ByTagvue_type_template_id_246a25ba_staticRenderFns = [];
101551
101575
 
101552
101576
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=script&lang=js
101553
101577
 
@@ -101558,6 +101582,11 @@ var ByTagvue_type_template_id_275b5251_staticRenderFns = [];
101558
101582
  */
101559
101583
  const NATIVE_TYPES = ['primary', 'success', 'info', 'warning', 'danger'];
101560
101584
  const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', 'purple', 'violet', 'lavender', 'indigo', 'cyan', 'teal', 'aqua', 'ink', 'mint', 'lime', 'forest', 'olive', 'sage', 'crimson', 'rose', 'pink', 'blossom', 'magenta', 'scarlet', 'orange', 'coral', 'brick', 'amber', 'gold', 'lemon', 'brown', 'sand', 'beige', 'wine', 'silver', 'copper'];
101585
+ function slotHasContent(nodes) {
101586
+ if (!nodes) return false;
101587
+ if (Array.isArray(nodes)) return nodes.length > 0;
101588
+ return true;
101589
+ }
101561
101590
  /* harmony default export */ var ByTagvue_type_script_lang_js = ({
101562
101591
  name: 'ByTag',
101563
101592
  inheritAttrs: false,
@@ -101593,8 +101622,22 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101593
101622
  isExtendedType() {
101594
101623
  return this.type && EXTENDED_TYPES.includes(this.type);
101595
101624
  },
101625
+ /**
101626
+ * 是否真正传入了 #icon 插槽(需有内容)。
101627
+ * 不能只用 !!$scopedSlots.icon:lib 打包 + 嵌套 scopedSlot 场景下可能存在空函数。
101628
+ */
101629
+ hasProvidedIconSlot() {
101630
+ if (slotHasContent(this.$slots && this.$slots.icon)) {
101631
+ return true;
101632
+ }
101633
+ const scopedIcon = this.$scopedSlots && this.$scopedSlots.icon;
101634
+ if (typeof scopedIcon !== 'function') {
101635
+ return false;
101636
+ }
101637
+ return slotHasContent(scopedIcon({}));
101638
+ },
101596
101639
  hasIcon() {
101597
- return Boolean(this.icon || this.$scopedSlots && this.$scopedSlots.icon || this.$slots && this.$slots.icon);
101640
+ return Boolean(this.icon) || this.hasProvidedIconSlot;
101598
101641
  },
101599
101642
  elTagType() {
101600
101643
  if (this.isNativeType) return this.type;
@@ -101632,8 +101675,6 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101632
101675
  if (this.isExtendedType) {
101633
101676
  delete attrs.color;
101634
101677
  }
101635
- // 防御:避免 icon 被透传到 el-tag DOM(旧构建/异常透传时)
101636
- delete attrs.icon;
101637
101678
  return attrs;
101638
101679
  }
101639
101680
  }
@@ -101650,8 +101691,8 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101650
101691
  ;
101651
101692
  var ByTag_component = normalizeComponent(
101652
101693
  by_tag_ByTagvue_type_script_lang_js,
101653
- ByTagvue_type_template_id_275b5251_render,
101654
- ByTagvue_type_template_id_275b5251_staticRenderFns,
101694
+ ByTagvue_type_template_id_246a25ba_render,
101695
+ ByTagvue_type_template_id_246a25ba_staticRenderFns,
101655
101696
  false,
101656
101697
  null,
101657
101698
  null,
@@ -92433,13 +92433,22 @@ var BatchQuerySelector_component = normalizeComponent(
92433
92433
  )
92434
92434
 
92435
92435
  /* harmony default export */ var BatchQuerySelector = (BatchQuerySelector_component.exports);
92436
- ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-input/ByCommonInput.vue?vue&type=template&id=71d628fa
92437
- var ByCommonInputvue_type_template_id_71d628fa_render = function render() {
92436
+ ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-input/ByCommonInput.vue?vue&type=template&id=5ab04f01
92437
+ var ByCommonInputvue_type_template_id_5ab04f01_render = function render() {
92438
92438
  var _vm = this,
92439
92439
  _c = _vm._self._c;
92440
92440
  return _c('div', {
92441
- staticClass: "by-common-input-container"
92441
+ staticClass: "by-common-input-container",
92442
+ class: {
92443
+ 'has-batch-suffix': _vm.showBatchInput,
92444
+ 'is-clearable': _vm.showBatchInput && _vm.isClearable
92445
+ }
92446
+ }, [_c('div', {
92447
+ staticClass: "input-wrap"
92442
92448
  }, [_c('el-input', _vm._b({
92449
+ class: {
92450
+ 'has-batch-suffix': _vm.showBatchInput
92451
+ },
92443
92452
  attrs: {
92444
92453
  "value": _vm.localValue,
92445
92454
  "size": _vm.actualSize
@@ -92450,7 +92459,9 @@ var ByCommonInputvue_type_template_id_71d628fa_render = function render() {
92450
92459
  "blur": _vm.handleBlur,
92451
92460
  "focus": _vm.handleFocus
92452
92461
  }
92453
- }, 'el-input', _vm.$attrs, false)), _vm.showBatchInput ? _c('el-popover', {
92462
+ }, 'el-input', _vm.$attrs, false)), _vm.showBatchInput ? _c('div', {
92463
+ staticClass: "batch-input-suffix"
92464
+ }, [_c('el-popover', {
92454
92465
  attrs: {
92455
92466
  "placement": "bottom-end",
92456
92467
  "width": _vm.batchInputPopoverWidth,
@@ -92500,24 +92511,26 @@ var ByCommonInputvue_type_template_id_71d628fa_render = function render() {
92500
92511
  "click": _vm.handleBatchInputConfirm
92501
92512
  }
92502
92513
  }, [_vm._v("确定")])], 1)], 1), _c('el-button', {
92503
- staticClass: "batch-input-btn",
92514
+ staticClass: "batch-input-btn batch-input-btn--inner",
92515
+ class: `batch-input-btn--${_vm.actualSize}`,
92504
92516
  attrs: {
92505
92517
  "slot": "reference",
92518
+ "type": "text",
92519
+ "disabled": _vm.isDisabled,
92506
92520
  "size": _vm.actualSize
92507
92521
  },
92508
92522
  on: {
92509
- "click": _vm.handleOpenBatchInput
92523
+ "click": function ($event) {
92524
+ $event.stopPropagation();
92525
+ return _vm.handleOpenBatchInput.apply(null, arguments);
92526
+ }
92510
92527
  },
92511
92528
  slot: "reference"
92512
92529
  }, [_c('i', {
92513
- staticClass: "el-icon-edit-outline",
92514
- staticStyle: {
92515
- "transform": "scale(2)",
92516
- "display": "inline-block"
92517
- }
92518
- })])], 1) : _vm._e()], 1);
92530
+ staticClass: "el-icon-edit-outline"
92531
+ })])], 1)], 1) : _vm._e()], 1)]);
92519
92532
  };
92520
- var ByCommonInputvue_type_template_id_71d628fa_staticRenderFns = [];
92533
+ var ByCommonInputvue_type_template_id_5ab04f01_staticRenderFns = [];
92521
92534
 
92522
92535
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-input/ByCommonInput.vue?vue&type=script&lang=js
92523
92536
 
@@ -92582,6 +92595,14 @@ var ByCommonInputvue_type_template_id_71d628fa_staticRenderFns = [];
92582
92595
  // 获取实际的 size 值,优先使用 $attrs 中的 size
92583
92596
  actualSize() {
92584
92597
  return this.$attrs.size || this.size;
92598
+ },
92599
+ isClearable() {
92600
+ const val = this.$attrs.clearable;
92601
+ return val === '' || val === true || val === 'true';
92602
+ },
92603
+ isDisabled() {
92604
+ const val = this.$attrs.disabled;
92605
+ return val === '' || val === true || val === 'true';
92585
92606
  }
92586
92607
  },
92587
92608
  watch: {
@@ -92678,8 +92699,8 @@ var ByCommonInputvue_type_template_id_71d628fa_staticRenderFns = [];
92678
92699
  ;
92679
92700
  var ByCommonInput_component = normalizeComponent(
92680
92701
  common_input_ByCommonInputvue_type_script_lang_js,
92681
- ByCommonInputvue_type_template_id_71d628fa_render,
92682
- ByCommonInputvue_type_template_id_71d628fa_staticRenderFns,
92702
+ ByCommonInputvue_type_template_id_5ab04f01_render,
92703
+ ByCommonInputvue_type_template_id_5ab04f01_staticRenderFns,
92683
92704
  false,
92684
92705
  null,
92685
92706
  null,
@@ -101536,8 +101557,8 @@ var ByGridLayout_component = normalizeComponent(
101536
101557
  )
101537
101558
 
101538
101559
  /* harmony default export */ var ByGridLayout = (ByGridLayout_component.exports);
101539
- ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=template&id=275b5251
101540
- var ByTagvue_type_template_id_275b5251_render = function render() {
101560
+ ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=template&id=246a25ba
101561
+ var ByTagvue_type_template_id_246a25ba_render = function render() {
101541
101562
  var _vm = this,
101542
101563
  _c = _vm._self._c;
101543
101564
  return _c('el-tag', _vm._g(_vm._b({
@@ -101546,18 +101567,21 @@ var ByTagvue_type_template_id_275b5251_render = function render() {
101546
101567
  "type": _vm.elTagType,
101547
101568
  "color": _vm.elTagColor
101548
101569
  }
101549
- }, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.icon || _vm.$scopedSlots.icon || _vm.$slots.icon ? _c('span', {
101570
+ }, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.hasProvidedIconSlot ? _c('span', {
101550
101571
  staticClass: "by-tag__icon",
101551
101572
  attrs: {
101552
101573
  "aria-hidden": "true"
101553
101574
  }
101554
- }, [_vm._t("icon", function () {
101555
- return [_vm.icon ? _c('i', {
101556
- class: ['by-tag__icon-inner', _vm.icon]
101557
- }) : _vm._e()];
101558
- })], 2) : _vm._e(), _vm._t("default")], 2);
101575
+ }, [_vm._t("icon")], 2) : _vm.icon ? _c('span', {
101576
+ staticClass: "by-tag__icon",
101577
+ attrs: {
101578
+ "aria-hidden": "true"
101579
+ }
101580
+ }, [_c('i', {
101581
+ class: _vm.icon
101582
+ })]) : _vm._e(), _vm._t("default")], 2);
101559
101583
  };
101560
- var ByTagvue_type_template_id_275b5251_staticRenderFns = [];
101584
+ var ByTagvue_type_template_id_246a25ba_staticRenderFns = [];
101561
101585
 
101562
101586
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=script&lang=js
101563
101587
 
@@ -101568,6 +101592,11 @@ var ByTagvue_type_template_id_275b5251_staticRenderFns = [];
101568
101592
  */
101569
101593
  const NATIVE_TYPES = ['primary', 'success', 'info', 'warning', 'danger'];
101570
101594
  const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', 'purple', 'violet', 'lavender', 'indigo', 'cyan', 'teal', 'aqua', 'ink', 'mint', 'lime', 'forest', 'olive', 'sage', 'crimson', 'rose', 'pink', 'blossom', 'magenta', 'scarlet', 'orange', 'coral', 'brick', 'amber', 'gold', 'lemon', 'brown', 'sand', 'beige', 'wine', 'silver', 'copper'];
101595
+ function slotHasContent(nodes) {
101596
+ if (!nodes) return false;
101597
+ if (Array.isArray(nodes)) return nodes.length > 0;
101598
+ return true;
101599
+ }
101571
101600
  /* harmony default export */ var ByTagvue_type_script_lang_js = ({
101572
101601
  name: 'ByTag',
101573
101602
  inheritAttrs: false,
@@ -101603,8 +101632,22 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101603
101632
  isExtendedType() {
101604
101633
  return this.type && EXTENDED_TYPES.includes(this.type);
101605
101634
  },
101635
+ /**
101636
+ * 是否真正传入了 #icon 插槽(需有内容)。
101637
+ * 不能只用 !!$scopedSlots.icon:lib 打包 + 嵌套 scopedSlot 场景下可能存在空函数。
101638
+ */
101639
+ hasProvidedIconSlot() {
101640
+ if (slotHasContent(this.$slots && this.$slots.icon)) {
101641
+ return true;
101642
+ }
101643
+ const scopedIcon = this.$scopedSlots && this.$scopedSlots.icon;
101644
+ if (typeof scopedIcon !== 'function') {
101645
+ return false;
101646
+ }
101647
+ return slotHasContent(scopedIcon({}));
101648
+ },
101606
101649
  hasIcon() {
101607
- return Boolean(this.icon || this.$scopedSlots && this.$scopedSlots.icon || this.$slots && this.$slots.icon);
101650
+ return Boolean(this.icon) || this.hasProvidedIconSlot;
101608
101651
  },
101609
101652
  elTagType() {
101610
101653
  if (this.isNativeType) return this.type;
@@ -101642,8 +101685,6 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101642
101685
  if (this.isExtendedType) {
101643
101686
  delete attrs.color;
101644
101687
  }
101645
- // 防御:避免 icon 被透传到 el-tag DOM(旧构建/异常透传时)
101646
- delete attrs.icon;
101647
101688
  return attrs;
101648
101689
  }
101649
101690
  }
@@ -101660,8 +101701,8 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101660
101701
  ;
101661
101702
  var ByTag_component = normalizeComponent(
101662
101703
  by_tag_ByTagvue_type_script_lang_js,
101663
- ByTagvue_type_template_id_275b5251_render,
101664
- ByTagvue_type_template_id_275b5251_staticRenderFns,
101704
+ ByTagvue_type_template_id_246a25ba_render,
101705
+ ByTagvue_type_template_id_246a25ba_staticRenderFns,
101665
101706
  false,
101666
101707
  null,
101667
101708
  null,