@weitutech/by-components 1.2.16 → 1.2.18

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.
@@ -101526,8 +101526,8 @@ var ByGridLayout_component = normalizeComponent(
101526
101526
  )
101527
101527
 
101528
101528
  /* 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=197fb365
101530
- var ByTagvue_type_template_id_197fb365_render = function render() {
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=91c49304
101530
+ var ByTagvue_type_template_id_91c49304_render = function render() {
101531
101531
  var _vm = this,
101532
101532
  _c = _vm._self._c;
101533
101533
  return _c('el-tag', _vm._g(_vm._b({
@@ -101536,14 +101536,25 @@ var ByTagvue_type_template_id_197fb365_render = function render() {
101536
101536
  "type": _vm.elTagType,
101537
101537
  "color": _vm.elTagColor
101538
101538
  }
101539
- }, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm._t("default")], 2);
101539
+ }, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.hasIcon ? _c('span', {
101540
+ staticClass: "by-tag__icon",
101541
+ attrs: {
101542
+ "aria-hidden": "true"
101543
+ }
101544
+ }, [_vm._t("icon", function () {
101545
+ return [_vm.icon ? _c('i', {
101546
+ class: _vm.icon
101547
+ }) : _vm._e()];
101548
+ })], 2) : _vm._e(), _vm._t("default")], 2);
101540
101549
  };
101541
- var ByTagvue_type_template_id_197fb365_staticRenderFns = [];
101550
+ var ByTagvue_type_template_id_91c49304_staticRenderFns = [];
101542
101551
 
101543
101552
  ;// ./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
+
101544
101554
  /**
101545
101555
  * 原生 el-tag 的 type 仅支持:primary / success / info / warning / danger
101546
- * 本组件扩展 type,扩展类型的背景、边框、文字由 style/by-tag.scss 统一配色
101556
+ * 本组件扩展 type,扩展类型的背景、边框、文字由 style/by-tag.scss 统一配色;
101557
+ * 另支持前缀图标(icon / #icon)与胶囊圆角(round)。
101547
101558
  */
101548
101559
  const NATIVE_TYPES = ['primary', 'success', 'info', 'warning', 'danger'];
101549
101560
  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'];
@@ -101560,6 +101571,19 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101560
101571
  type: {
101561
101572
  type: String,
101562
101573
  default: ''
101574
+ },
101575
+ /**
101576
+ * 前缀图标类名(如 el-icon-check);也可通过 #icon 插槽完全自定义。
101577
+ * 同时存在时优先渲染 #icon 插槽内容。
101578
+ */
101579
+ icon: {
101580
+ type: String,
101581
+ default: ''
101582
+ },
101583
+ /** 是否使用胶囊圆角(border-radius: 999px) */
101584
+ round: {
101585
+ type: Boolean,
101586
+ default: false
101563
101587
  }
101564
101588
  },
101565
101589
  computed: {
@@ -101569,6 +101593,12 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101569
101593
  isExtendedType() {
101570
101594
  return this.type && EXTENDED_TYPES.includes(this.type);
101571
101595
  },
101596
+ hasIconSlot() {
101597
+ return Boolean(this.$scopedSlots && this.$scopedSlots.icon || this.$slots && this.$slots.icon);
101598
+ },
101599
+ hasIcon() {
101600
+ return Boolean(this.icon) || this.hasIconSlot;
101601
+ },
101572
101602
  elTagType() {
101573
101603
  if (this.isNativeType) return this.type;
101574
101604
  if (this.isExtendedType) return ''; // 扩展类型完全由 by-tag.scss 配色
@@ -101579,8 +101609,21 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101579
101609
  return this.$attrs && this.$attrs.color !== undefined ? this.$attrs.color : undefined;
101580
101610
  },
101581
101611
  tagClass() {
101582
- if (!this.isExtendedType) return '';
101583
- return ['by-tag', `by-tag--${this.type}`];
101612
+ const classes = [];
101613
+ // 扩展色、圆角、图标样式均挂在 .by-tag 下;原生 type 在需要时也挂上基类
101614
+ if (this.isExtendedType || this.round || this.hasIcon) {
101615
+ classes.push('by-tag');
101616
+ }
101617
+ if (this.isExtendedType) {
101618
+ classes.push(`by-tag--${this.type}`);
101619
+ }
101620
+ if (this.round) {
101621
+ classes.push('by-tag--round');
101622
+ }
101623
+ if (this.hasIcon) {
101624
+ classes.push('by-tag--with-icon');
101625
+ }
101626
+ return classes;
101584
101627
  },
101585
101628
  tagAttrs() {
101586
101629
  const attrs = {
@@ -101608,8 +101651,8 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101608
101651
  ;
101609
101652
  var ByTag_component = normalizeComponent(
101610
101653
  by_tag_ByTagvue_type_script_lang_js,
101611
- ByTagvue_type_template_id_197fb365_render,
101612
- ByTagvue_type_template_id_197fb365_staticRenderFns,
101654
+ ByTagvue_type_template_id_91c49304_render,
101655
+ ByTagvue_type_template_id_91c49304_staticRenderFns,
101613
101656
  false,
101614
101657
  null,
101615
101658
  null,
@@ -101753,15 +101796,16 @@ var ByCardView_component = normalizeComponent(
101753
101796
  )
101754
101797
 
101755
101798
  /* harmony default export */ var ByCardView = (ByCardView_component.exports);
101756
- ;// ./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/card-selector/ByCardSelector.vue?vue&type=template&id=4f6402cc
101757
- var ByCardSelectorvue_type_template_id_4f6402cc_render = function render() {
101799
+ ;// ./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/card-selector/ByCardSelector.vue?vue&type=template&id=18565505
101800
+ var ByCardSelectorvue_type_template_id_18565505_render = function render() {
101758
101801
  var _vm = this,
101759
101802
  _c = _vm._self._c;
101760
101803
  return _c('div', {
101761
101804
  staticClass: "by-card-selector",
101762
101805
  class: [`by-card-selector--size-${_vm.size}`, `by-card-selector--direction-${_vm.direction}`, {
101763
101806
  'is-disabled': _vm.disabled,
101764
- 'by-card-selector--no-check': !_vm.showCheckmark
101807
+ 'by-card-selector--no-check': !_vm.showCheckmark,
101808
+ 'by-card-selector--fixed-width': _vm.useFixedCardWidth
101765
101809
  }],
101766
101810
  style: _vm.rootStyle,
101767
101811
  attrs: {
@@ -101891,7 +101935,7 @@ var ByCardSelectorvue_type_template_id_4f6402cc_render = function render() {
101891
101935
  staticClass: "el-icon-question"
101892
101936
  })])])], 1) : _vm._e()], 2);
101893
101937
  };
101894
- var ByCardSelectorvue_type_template_id_4f6402cc_staticRenderFns = [];
101938
+ var ByCardSelectorvue_type_template_id_18565505_staticRenderFns = [];
101895
101939
 
101896
101940
  ;// ./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/card-selector/ByCardSelector.vue?vue&type=script&lang=js
101897
101941
 
@@ -101929,6 +101973,8 @@ const VALUE_FALLBACK_FIELD = 'id';
101929
101973
  * <by-card-selector v-model="id" :options="list" />
101930
101974
  * <by-card-selector v-model="ids" :options="list" multiple />
101931
101975
  * <by-card-selector v-model="id" :options="list" :card-width="280" />
101976
+ * <!-- 设了 card-width 仍要横向均分拉伸时,显式开启 card-fill -->
101977
+ * <by-card-selector v-model="id" :options="list" :card-width="280" :card-fill="true" />
101932
101978
  * <by-card-selector v-model="id" :options="list" :show-checkmark="false" />
101933
101979
  * <by-card-selector v-model="id" :options="list" tooltips="整组说明文案" />
101934
101980
  * <!-- 业务使用 id/name 形态时无需任何额外配置 -->
@@ -101969,13 +102015,25 @@ const VALUE_FALLBACK_FIELD = 'id';
101969
102015
  validator: v => ['large', 'default', 'small'].includes(v)
101970
102016
  },
101971
102017
  /**
101972
- * 每张卡片宽度(像素,组件级统一)。未设置时列宽由 size 对应样式决定。
102018
+ * 每张卡片宽度(像素,组件级统一)。未设置时列宽由 size 对应样式决定,横向仍会均分拉伸。
101973
102019
  * 合法范围 100–600,小于 100 按 100、大于 600 按 600;可传数字或字符串(如 240、"320px")。
102020
+ * 设置后横向默认按该值固定宽度、不再拉伸;若仍要均分拉伸,请显式设 :card-fill="true"。
101974
102021
  */
101975
102022
  cardWidth: {
101976
102023
  type: [Number, String],
101977
102024
  default: null
101978
102025
  },
102026
+ /**
102027
+ * 横向是否均分拉伸。
102028
+ * - 未传(默认):有 card-width 时固定宽,无 card-width 时均分拉伸;
102029
+ * - true:强制均分拉伸(即使设置了 card-width);
102030
+ * - false:强制固定为 card-width(或 size 对应列宽基准)。
102031
+ * 纵向排列本身为固定宽,该属性对纵向无额外影响。
102032
+ */
102033
+ cardFill: {
102034
+ type: Boolean,
102035
+ default: undefined
102036
+ },
101979
102037
  /** 整组禁用 */
101980
102038
  disabled: {
101981
102039
  type: Boolean,
@@ -102067,6 +102125,14 @@ const VALUE_FALLBACK_FIELD = 'id';
102067
102125
  const MAX = 600;
102068
102126
  return Math.min(MAX, Math.max(MIN, Math.round(n)));
102069
102127
  },
102128
+ /**
102129
+ * 是否使用固定列宽(不拉伸)。
102130
+ * 显式 cardFill 优先;未传时:有 card-width → 固定,无 → 均分拉伸。
102131
+ */
102132
+ useFixedCardWidth() {
102133
+ if (typeof this.cardFill === 'boolean') return !this.cardFill;
102134
+ return this.resolvedCardWidthPx != null;
102135
+ },
102070
102136
  /** 根节点样式:纵向高度 + 可选自定义卡片宽度(CSS 变量) */
102071
102137
  rootStyle() {
102072
102138
  const style = {};
@@ -102303,8 +102369,8 @@ const VALUE_FALLBACK_FIELD = 'id';
102303
102369
  ;
102304
102370
  var ByCardSelector_component = normalizeComponent(
102305
102371
  card_selector_ByCardSelectorvue_type_script_lang_js,
102306
- ByCardSelectorvue_type_template_id_4f6402cc_render,
102307
- ByCardSelectorvue_type_template_id_4f6402cc_staticRenderFns,
102372
+ ByCardSelectorvue_type_template_id_18565505_render,
102373
+ ByCardSelectorvue_type_template_id_18565505_staticRenderFns,
102308
102374
  false,
102309
102375
  null,
102310
102376
  null,
@@ -101536,8 +101536,8 @@ var ByGridLayout_component = normalizeComponent(
101536
101536
  )
101537
101537
 
101538
101538
  /* 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=197fb365
101540
- var ByTagvue_type_template_id_197fb365_render = function render() {
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=91c49304
101540
+ var ByTagvue_type_template_id_91c49304_render = function render() {
101541
101541
  var _vm = this,
101542
101542
  _c = _vm._self._c;
101543
101543
  return _c('el-tag', _vm._g(_vm._b({
@@ -101546,14 +101546,25 @@ var ByTagvue_type_template_id_197fb365_render = function render() {
101546
101546
  "type": _vm.elTagType,
101547
101547
  "color": _vm.elTagColor
101548
101548
  }
101549
- }, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm._t("default")], 2);
101549
+ }, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.hasIcon ? _c('span', {
101550
+ staticClass: "by-tag__icon",
101551
+ attrs: {
101552
+ "aria-hidden": "true"
101553
+ }
101554
+ }, [_vm._t("icon", function () {
101555
+ return [_vm.icon ? _c('i', {
101556
+ class: _vm.icon
101557
+ }) : _vm._e()];
101558
+ })], 2) : _vm._e(), _vm._t("default")], 2);
101550
101559
  };
101551
- var ByTagvue_type_template_id_197fb365_staticRenderFns = [];
101560
+ var ByTagvue_type_template_id_91c49304_staticRenderFns = [];
101552
101561
 
101553
101562
  ;// ./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
+
101554
101564
  /**
101555
101565
  * 原生 el-tag 的 type 仅支持:primary / success / info / warning / danger
101556
- * 本组件扩展 type,扩展类型的背景、边框、文字由 style/by-tag.scss 统一配色
101566
+ * 本组件扩展 type,扩展类型的背景、边框、文字由 style/by-tag.scss 统一配色;
101567
+ * 另支持前缀图标(icon / #icon)与胶囊圆角(round)。
101557
101568
  */
101558
101569
  const NATIVE_TYPES = ['primary', 'success', 'info', 'warning', 'danger'];
101559
101570
  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'];
@@ -101570,6 +101581,19 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101570
101581
  type: {
101571
101582
  type: String,
101572
101583
  default: ''
101584
+ },
101585
+ /**
101586
+ * 前缀图标类名(如 el-icon-check);也可通过 #icon 插槽完全自定义。
101587
+ * 同时存在时优先渲染 #icon 插槽内容。
101588
+ */
101589
+ icon: {
101590
+ type: String,
101591
+ default: ''
101592
+ },
101593
+ /** 是否使用胶囊圆角(border-radius: 999px) */
101594
+ round: {
101595
+ type: Boolean,
101596
+ default: false
101573
101597
  }
101574
101598
  },
101575
101599
  computed: {
@@ -101579,6 +101603,12 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101579
101603
  isExtendedType() {
101580
101604
  return this.type && EXTENDED_TYPES.includes(this.type);
101581
101605
  },
101606
+ hasIconSlot() {
101607
+ return Boolean(this.$scopedSlots && this.$scopedSlots.icon || this.$slots && this.$slots.icon);
101608
+ },
101609
+ hasIcon() {
101610
+ return Boolean(this.icon) || this.hasIconSlot;
101611
+ },
101582
101612
  elTagType() {
101583
101613
  if (this.isNativeType) return this.type;
101584
101614
  if (this.isExtendedType) return ''; // 扩展类型完全由 by-tag.scss 配色
@@ -101589,8 +101619,21 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101589
101619
  return this.$attrs && this.$attrs.color !== undefined ? this.$attrs.color : undefined;
101590
101620
  },
101591
101621
  tagClass() {
101592
- if (!this.isExtendedType) return '';
101593
- return ['by-tag', `by-tag--${this.type}`];
101622
+ const classes = [];
101623
+ // 扩展色、圆角、图标样式均挂在 .by-tag 下;原生 type 在需要时也挂上基类
101624
+ if (this.isExtendedType || this.round || this.hasIcon) {
101625
+ classes.push('by-tag');
101626
+ }
101627
+ if (this.isExtendedType) {
101628
+ classes.push(`by-tag--${this.type}`);
101629
+ }
101630
+ if (this.round) {
101631
+ classes.push('by-tag--round');
101632
+ }
101633
+ if (this.hasIcon) {
101634
+ classes.push('by-tag--with-icon');
101635
+ }
101636
+ return classes;
101594
101637
  },
101595
101638
  tagAttrs() {
101596
101639
  const attrs = {
@@ -101618,8 +101661,8 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
101618
101661
  ;
101619
101662
  var ByTag_component = normalizeComponent(
101620
101663
  by_tag_ByTagvue_type_script_lang_js,
101621
- ByTagvue_type_template_id_197fb365_render,
101622
- ByTagvue_type_template_id_197fb365_staticRenderFns,
101664
+ ByTagvue_type_template_id_91c49304_render,
101665
+ ByTagvue_type_template_id_91c49304_staticRenderFns,
101623
101666
  false,
101624
101667
  null,
101625
101668
  null,
@@ -101763,15 +101806,16 @@ var ByCardView_component = normalizeComponent(
101763
101806
  )
101764
101807
 
101765
101808
  /* harmony default export */ var ByCardView = (ByCardView_component.exports);
101766
- ;// ./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/card-selector/ByCardSelector.vue?vue&type=template&id=4f6402cc
101767
- var ByCardSelectorvue_type_template_id_4f6402cc_render = function render() {
101809
+ ;// ./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/card-selector/ByCardSelector.vue?vue&type=template&id=18565505
101810
+ var ByCardSelectorvue_type_template_id_18565505_render = function render() {
101768
101811
  var _vm = this,
101769
101812
  _c = _vm._self._c;
101770
101813
  return _c('div', {
101771
101814
  staticClass: "by-card-selector",
101772
101815
  class: [`by-card-selector--size-${_vm.size}`, `by-card-selector--direction-${_vm.direction}`, {
101773
101816
  'is-disabled': _vm.disabled,
101774
- 'by-card-selector--no-check': !_vm.showCheckmark
101817
+ 'by-card-selector--no-check': !_vm.showCheckmark,
101818
+ 'by-card-selector--fixed-width': _vm.useFixedCardWidth
101775
101819
  }],
101776
101820
  style: _vm.rootStyle,
101777
101821
  attrs: {
@@ -101901,7 +101945,7 @@ var ByCardSelectorvue_type_template_id_4f6402cc_render = function render() {
101901
101945
  staticClass: "el-icon-question"
101902
101946
  })])])], 1) : _vm._e()], 2);
101903
101947
  };
101904
- var ByCardSelectorvue_type_template_id_4f6402cc_staticRenderFns = [];
101948
+ var ByCardSelectorvue_type_template_id_18565505_staticRenderFns = [];
101905
101949
 
101906
101950
  ;// ./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/card-selector/ByCardSelector.vue?vue&type=script&lang=js
101907
101951
 
@@ -101939,6 +101983,8 @@ const VALUE_FALLBACK_FIELD = 'id';
101939
101983
  * <by-card-selector v-model="id" :options="list" />
101940
101984
  * <by-card-selector v-model="ids" :options="list" multiple />
101941
101985
  * <by-card-selector v-model="id" :options="list" :card-width="280" />
101986
+ * <!-- 设了 card-width 仍要横向均分拉伸时,显式开启 card-fill -->
101987
+ * <by-card-selector v-model="id" :options="list" :card-width="280" :card-fill="true" />
101942
101988
  * <by-card-selector v-model="id" :options="list" :show-checkmark="false" />
101943
101989
  * <by-card-selector v-model="id" :options="list" tooltips="整组说明文案" />
101944
101990
  * <!-- 业务使用 id/name 形态时无需任何额外配置 -->
@@ -101979,13 +102025,25 @@ const VALUE_FALLBACK_FIELD = 'id';
101979
102025
  validator: v => ['large', 'default', 'small'].includes(v)
101980
102026
  },
101981
102027
  /**
101982
- * 每张卡片宽度(像素,组件级统一)。未设置时列宽由 size 对应样式决定。
102028
+ * 每张卡片宽度(像素,组件级统一)。未设置时列宽由 size 对应样式决定,横向仍会均分拉伸。
101983
102029
  * 合法范围 100–600,小于 100 按 100、大于 600 按 600;可传数字或字符串(如 240、"320px")。
102030
+ * 设置后横向默认按该值固定宽度、不再拉伸;若仍要均分拉伸,请显式设 :card-fill="true"。
101984
102031
  */
101985
102032
  cardWidth: {
101986
102033
  type: [Number, String],
101987
102034
  default: null
101988
102035
  },
102036
+ /**
102037
+ * 横向是否均分拉伸。
102038
+ * - 未传(默认):有 card-width 时固定宽,无 card-width 时均分拉伸;
102039
+ * - true:强制均分拉伸(即使设置了 card-width);
102040
+ * - false:强制固定为 card-width(或 size 对应列宽基准)。
102041
+ * 纵向排列本身为固定宽,该属性对纵向无额外影响。
102042
+ */
102043
+ cardFill: {
102044
+ type: Boolean,
102045
+ default: undefined
102046
+ },
101989
102047
  /** 整组禁用 */
101990
102048
  disabled: {
101991
102049
  type: Boolean,
@@ -102077,6 +102135,14 @@ const VALUE_FALLBACK_FIELD = 'id';
102077
102135
  const MAX = 600;
102078
102136
  return Math.min(MAX, Math.max(MIN, Math.round(n)));
102079
102137
  },
102138
+ /**
102139
+ * 是否使用固定列宽(不拉伸)。
102140
+ * 显式 cardFill 优先;未传时:有 card-width → 固定,无 → 均分拉伸。
102141
+ */
102142
+ useFixedCardWidth() {
102143
+ if (typeof this.cardFill === 'boolean') return !this.cardFill;
102144
+ return this.resolvedCardWidthPx != null;
102145
+ },
102080
102146
  /** 根节点样式:纵向高度 + 可选自定义卡片宽度(CSS 变量) */
102081
102147
  rootStyle() {
102082
102148
  const style = {};
@@ -102313,8 +102379,8 @@ const VALUE_FALLBACK_FIELD = 'id';
102313
102379
  ;
102314
102380
  var ByCardSelector_component = normalizeComponent(
102315
102381
  card_selector_ByCardSelectorvue_type_script_lang_js,
102316
- ByCardSelectorvue_type_template_id_4f6402cc_render,
102317
- ByCardSelectorvue_type_template_id_4f6402cc_staticRenderFns,
102382
+ ByCardSelectorvue_type_template_id_18565505_render,
102383
+ ByCardSelectorvue_type_template_id_18565505_staticRenderFns,
102318
102384
  false,
102319
102385
  null,
102320
102386
  null,