@weitutech/by-components 1.1.197 → 1.1.198

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.
@@ -97565,32 +97565,30 @@ var ByTag_component = normalizeComponent(
97565
97565
  )
97566
97566
 
97567
97567
  /* harmony default export */ var ByTag = (ByTag_component.exports);
97568
- ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-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-view/ByCardView.vue?vue&type=template&id=c807fa9e
97569
- var ByCardViewvue_type_template_id_c807fa9e_render = function render() {
97568
+ ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-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-view/ByCardView.vue?vue&type=template&id=717526d6
97569
+ var ByCardViewvue_type_template_id_717526d6_render = function render() {
97570
97570
  var _vm = this,
97571
97571
  _c = _vm._self._c;
97572
97572
  return _c('div', {
97573
- staticClass: "config-section by-card-view",
97573
+ staticClass: "by-card-view",
97574
97574
  class: {
97575
- 'config-section--plain': _vm.plain
97575
+ 'by-card-view--plain': _vm.plain
97576
97576
  }
97577
97577
  }, [_vm.customHeader ? _vm._t("header") : _vm.showTitleRow ? _c('div', {
97578
- staticClass: "section-title"
97578
+ staticClass: "by-card-view__head"
97579
97579
  }, [_vm.hasTitleText ? _c('span', {
97580
- staticClass: "section-title-text"
97581
- }, [_vm._t("title", function () {
97582
- return [_vm._v(_vm._s(_vm.title))];
97583
- })], 2) : _vm._e(), _vm.$slots.extra ? _c('div', {
97584
- staticClass: "section-title-switch"
97580
+ staticClass: "by-card-view__head-text"
97581
+ }, [_vm.titleSlotLen > 0 ? _vm._t("title") : [_vm._v(_vm._s(_vm.effectiveTitle))]], 2) : _vm._e(), _vm.extraSlotLen > 0 ? _c('div', {
97582
+ staticClass: "by-card-view__head-extra"
97585
97583
  }, [_vm._t("extra")], 2) : _vm._e()]) : _vm._e(), _c('div', {
97586
- staticClass: "section-content"
97584
+ staticClass: "by-card-view__body"
97587
97585
  }, [_vm._t("default")], 2)], 2);
97588
97586
  };
97589
- var ByCardViewvue_type_template_id_c807fa9e_staticRenderFns = [];
97587
+ var ByCardViewvue_type_template_id_717526d6_staticRenderFns = [];
97590
97588
 
97591
97589
  ;// ./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-view/ByCardView.vue?vue&type=script&lang=js
97592
97590
  /**
97593
- * 卡片区块:标题 + 可自定义正文,默认带边框卡片,plain 时无边框与背景融为一体。
97591
+ * 卡片区块:标题 + 可自定义正文。样式类名为 .by-card-view*,不与宿主 .section-title 等冲突。
97594
97592
  *
97595
97593
  * @example
97596
97594
  * <by-card-view title="展示名称">…</by-card-view>
@@ -97603,30 +97601,61 @@ var ByCardViewvue_type_template_id_c807fa9e_staticRenderFns = [];
97603
97601
  /* harmony default export */ var ByCardViewvue_type_script_lang_js = ({
97604
97602
  name: 'ByCardView',
97605
97603
  props: {
97606
- /** 标题文案;复杂标题请用 #title 插槽 */
97604
+ /** 标题文案 */
97607
97605
  title: {
97608
97606
  type: String,
97609
97607
  default: ''
97610
97608
  },
97611
- /** true 时使用无边框模式(config-section--plain) */
97609
+ /** title 相同含义;个别工程里 title 易被吞时可改用 heading */
97610
+ heading: {
97611
+ type: String,
97612
+ default: ''
97613
+ },
97614
+ /** 无边框模式 */
97612
97615
  plain: {
97613
97616
  type: Boolean,
97614
97617
  default: false
97615
97618
  },
97616
- /**
97617
- * 为 true 时用 #header 插槽整块替换默认标题行(需同时写 template #header)
97618
- */
97619
+ /** 为 true 时用 #header 整块替换默认标题行 */
97619
97620
  customHeader: {
97620
97621
  type: Boolean,
97621
97622
  default: false
97622
97623
  }
97623
97624
  },
97624
97625
  computed: {
97626
+ effectiveTitle() {
97627
+ const h = this.heading;
97628
+ if (h != null && String(h).length > 0) return String(h);
97629
+ const t = this.title;
97630
+ return t != null ? String(t) : '';
97631
+ },
97632
+ titleSlotLen() {
97633
+ return this.namedSlotLen('title');
97634
+ },
97635
+ extraSlotLen() {
97636
+ return this.namedSlotLen('extra');
97637
+ },
97625
97638
  showTitleRow() {
97626
- return this.title || this.$slots.title || this.$slots.extra;
97639
+ return this.effectiveTitle.length > 0 || this.titleSlotLen > 0 || this.extraSlotLen > 0;
97627
97640
  },
97628
97641
  hasTitleText() {
97629
- return this.title || this.$slots.title;
97642
+ return this.effectiveTitle.length > 0 || this.titleSlotLen > 0;
97643
+ }
97644
+ },
97645
+ methods: {
97646
+ namedSlotLen(name) {
97647
+ const s = this.$slots[name];
97648
+ if (s == null) return 0;
97649
+ if (typeof s === 'function') {
97650
+ try {
97651
+ const v = s();
97652
+ if (v == null) return 0;
97653
+ return Array.isArray(v) ? v.length : 1;
97654
+ } catch (e) {
97655
+ return 0;
97656
+ }
97657
+ }
97658
+ return Array.isArray(s) ? s.length : 0;
97630
97659
  }
97631
97660
  }
97632
97661
  });
@@ -97642,8 +97671,8 @@ var ByCardViewvue_type_template_id_c807fa9e_staticRenderFns = [];
97642
97671
  ;
97643
97672
  var ByCardView_component = normalizeComponent(
97644
97673
  card_view_ByCardViewvue_type_script_lang_js,
97645
- ByCardViewvue_type_template_id_c807fa9e_render,
97646
- ByCardViewvue_type_template_id_c807fa9e_staticRenderFns,
97674
+ ByCardViewvue_type_template_id_717526d6_render,
97675
+ ByCardViewvue_type_template_id_717526d6_staticRenderFns,
97647
97676
  false,
97648
97677
  null,
97649
97678
  null,
@@ -97575,32 +97575,30 @@ var ByTag_component = normalizeComponent(
97575
97575
  )
97576
97576
 
97577
97577
  /* harmony default export */ var ByTag = (ByTag_component.exports);
97578
- ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-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-view/ByCardView.vue?vue&type=template&id=c807fa9e
97579
- var ByCardViewvue_type_template_id_c807fa9e_render = function render() {
97578
+ ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8cd600e8-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-view/ByCardView.vue?vue&type=template&id=717526d6
97579
+ var ByCardViewvue_type_template_id_717526d6_render = function render() {
97580
97580
  var _vm = this,
97581
97581
  _c = _vm._self._c;
97582
97582
  return _c('div', {
97583
- staticClass: "config-section by-card-view",
97583
+ staticClass: "by-card-view",
97584
97584
  class: {
97585
- 'config-section--plain': _vm.plain
97585
+ 'by-card-view--plain': _vm.plain
97586
97586
  }
97587
97587
  }, [_vm.customHeader ? _vm._t("header") : _vm.showTitleRow ? _c('div', {
97588
- staticClass: "section-title"
97588
+ staticClass: "by-card-view__head"
97589
97589
  }, [_vm.hasTitleText ? _c('span', {
97590
- staticClass: "section-title-text"
97591
- }, [_vm._t("title", function () {
97592
- return [_vm._v(_vm._s(_vm.title))];
97593
- })], 2) : _vm._e(), _vm.$slots.extra ? _c('div', {
97594
- staticClass: "section-title-switch"
97590
+ staticClass: "by-card-view__head-text"
97591
+ }, [_vm.titleSlotLen > 0 ? _vm._t("title") : [_vm._v(_vm._s(_vm.effectiveTitle))]], 2) : _vm._e(), _vm.extraSlotLen > 0 ? _c('div', {
97592
+ staticClass: "by-card-view__head-extra"
97595
97593
  }, [_vm._t("extra")], 2) : _vm._e()]) : _vm._e(), _c('div', {
97596
- staticClass: "section-content"
97594
+ staticClass: "by-card-view__body"
97597
97595
  }, [_vm._t("default")], 2)], 2);
97598
97596
  };
97599
- var ByCardViewvue_type_template_id_c807fa9e_staticRenderFns = [];
97597
+ var ByCardViewvue_type_template_id_717526d6_staticRenderFns = [];
97600
97598
 
97601
97599
  ;// ./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-view/ByCardView.vue?vue&type=script&lang=js
97602
97600
  /**
97603
- * 卡片区块:标题 + 可自定义正文,默认带边框卡片,plain 时无边框与背景融为一体。
97601
+ * 卡片区块:标题 + 可自定义正文。样式类名为 .by-card-view*,不与宿主 .section-title 等冲突。
97604
97602
  *
97605
97603
  * @example
97606
97604
  * <by-card-view title="展示名称">…</by-card-view>
@@ -97613,30 +97611,61 @@ var ByCardViewvue_type_template_id_c807fa9e_staticRenderFns = [];
97613
97611
  /* harmony default export */ var ByCardViewvue_type_script_lang_js = ({
97614
97612
  name: 'ByCardView',
97615
97613
  props: {
97616
- /** 标题文案;复杂标题请用 #title 插槽 */
97614
+ /** 标题文案 */
97617
97615
  title: {
97618
97616
  type: String,
97619
97617
  default: ''
97620
97618
  },
97621
- /** true 时使用无边框模式(config-section--plain) */
97619
+ /** title 相同含义;个别工程里 title 易被吞时可改用 heading */
97620
+ heading: {
97621
+ type: String,
97622
+ default: ''
97623
+ },
97624
+ /** 无边框模式 */
97622
97625
  plain: {
97623
97626
  type: Boolean,
97624
97627
  default: false
97625
97628
  },
97626
- /**
97627
- * 为 true 时用 #header 插槽整块替换默认标题行(需同时写 template #header)
97628
- */
97629
+ /** 为 true 时用 #header 整块替换默认标题行 */
97629
97630
  customHeader: {
97630
97631
  type: Boolean,
97631
97632
  default: false
97632
97633
  }
97633
97634
  },
97634
97635
  computed: {
97636
+ effectiveTitle() {
97637
+ const h = this.heading;
97638
+ if (h != null && String(h).length > 0) return String(h);
97639
+ const t = this.title;
97640
+ return t != null ? String(t) : '';
97641
+ },
97642
+ titleSlotLen() {
97643
+ return this.namedSlotLen('title');
97644
+ },
97645
+ extraSlotLen() {
97646
+ return this.namedSlotLen('extra');
97647
+ },
97635
97648
  showTitleRow() {
97636
- return this.title || this.$slots.title || this.$slots.extra;
97649
+ return this.effectiveTitle.length > 0 || this.titleSlotLen > 0 || this.extraSlotLen > 0;
97637
97650
  },
97638
97651
  hasTitleText() {
97639
- return this.title || this.$slots.title;
97652
+ return this.effectiveTitle.length > 0 || this.titleSlotLen > 0;
97653
+ }
97654
+ },
97655
+ methods: {
97656
+ namedSlotLen(name) {
97657
+ const s = this.$slots[name];
97658
+ if (s == null) return 0;
97659
+ if (typeof s === 'function') {
97660
+ try {
97661
+ const v = s();
97662
+ if (v == null) return 0;
97663
+ return Array.isArray(v) ? v.length : 1;
97664
+ } catch (e) {
97665
+ return 0;
97666
+ }
97667
+ }
97668
+ return Array.isArray(s) ? s.length : 0;
97640
97669
  }
97641
97670
  }
97642
97671
  });
@@ -97652,8 +97681,8 @@ var ByCardViewvue_type_template_id_c807fa9e_staticRenderFns = [];
97652
97681
  ;
97653
97682
  var ByCardView_component = normalizeComponent(
97654
97683
  card_view_ByCardViewvue_type_script_lang_js,
97655
- ByCardViewvue_type_template_id_c807fa9e_render,
97656
- ByCardViewvue_type_template_id_c807fa9e_staticRenderFns,
97684
+ ByCardViewvue_type_template_id_717526d6_render,
97685
+ ByCardViewvue_type_template_id_717526d6_staticRenderFns,
97657
97686
  false,
97658
97687
  null,
97659
97688
  null,