@tmagic/form 1.2.7 → 1.2.9

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.
@@ -169,7 +169,7 @@
169
169
  return valuesTmp || {};
170
170
  };
171
171
 
172
- const _hoisted_1$c = ["innerHTML"];
172
+ const _hoisted_1$b = ["innerHTML"];
173
173
  const _hoisted_2$7 = ["innerHTML"];
174
174
  const _hoisted_3$7 = ["innerHTML"];
175
175
  const _hoisted_4$6 = ["innerHTML"];
@@ -368,7 +368,7 @@
368
368
  label: vue.withCtx(() => [
369
369
  vue.createElementVNode("span", {
370
370
  innerHTML: vue.unref(type) === "checkbox" ? "" : __props.config.text
371
- }, null, 8, _hoisted_1$c)
371
+ }, null, 8, _hoisted_1$b)
372
372
  ]),
373
373
  default: vue.withCtx(() => [
374
374
  vue.unref(tooltip) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), { key: 0 }, {
@@ -600,7 +600,7 @@
600
600
  }
601
601
  });
602
602
 
603
- const _hoisted_1$b = ["innerHTML"];
603
+ const _hoisted_1$a = ["innerHTML"];
604
604
  const _hoisted_2$6 = ["innerHTML"];
605
605
  const _hoisted_3$6 = { key: 1 };
606
606
  const _hoisted_4$5 = ["innerHTML"];
@@ -675,7 +675,7 @@
675
675
  default: vue.withCtx(() => [
676
676
  vue.createElementVNode("span", {
677
677
  innerHTML: __props.config.legend
678
- }, null, 8, _hoisted_1$b),
678
+ }, null, 8, _hoisted_1$a),
679
679
  __props.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
680
680
  key: 0,
681
681
  innerHTML: __props.config.extra,
@@ -740,7 +740,7 @@
740
740
  }
741
741
  });
742
742
 
743
- const _hoisted_1$a = { class: "m-fields-group-list-item" };
743
+ const _hoisted_1$9 = { class: "m-fields-group-list-item" };
744
744
  const _hoisted_2$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u79FB");
745
745
  const _hoisted_3$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u79FB");
746
746
  const _hoisted_4$4 = ["innerHTML"];
@@ -808,7 +808,7 @@
808
808
  };
809
809
  const onAddDiffCount = () => emit("addDiffCount");
810
810
  return (_ctx, _cache) => {
811
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
811
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
812
812
  vue.createElementVNode("div", null, [
813
813
  vue.createVNode(vue.unref(design.TMagicIcon), {
814
814
  style: { "margin-right": "7px" },
@@ -902,7 +902,7 @@
902
902
  }
903
903
  });
904
904
 
905
- const _hoisted_1$9 = { class: "m-fields-group-list" };
905
+ const _hoisted_1$8 = { class: "m-fields-group-list" };
906
906
  const _hoisted_2$4 = ["innerHTML"];
907
907
  const _hoisted_3$4 = {
908
908
  key: 1,
@@ -997,7 +997,7 @@
997
997
  const onAddDiffCount = () => emit("addDiffCount");
998
998
  const getLastValues = (item, index) => item?.[index] || {};
999
999
  return (_ctx, _cache) => {
1000
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
1000
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
1001
1001
  __props.config.extra ? (vue.openBlock(), vue.createElementBlock("div", {
1002
1002
  key: 0,
1003
1003
  innerHTML: __props.config.extra,
@@ -1049,7 +1049,7 @@
1049
1049
  }
1050
1050
  });
1051
1051
 
1052
- const _hoisted_1$8 = { class: "clearfix" };
1052
+ const _hoisted_1$7 = { class: "clearfix" };
1053
1053
  const _hoisted_2$3 = ["innerHTML"];
1054
1054
  const _hoisted_3$3 = {
1055
1055
  key: 0,
@@ -1089,7 +1089,7 @@
1089
1089
  "body-style": { display: expand.value ? "block" : "none" }
1090
1090
  }, {
1091
1091
  header: vue.withCtx(() => [
1092
- vue.createElementVNode("div", _hoisted_1$8, [
1092
+ vue.createElementVNode("div", _hoisted_1$7, [
1093
1093
  vue.createElementVNode("a", {
1094
1094
  href: "javascript:",
1095
1095
  style: { "width": "100%", "display": "block" },
@@ -1335,7 +1335,7 @@
1335
1335
  }
1336
1336
  });
1337
1337
 
1338
- const _hoisted_1$7 = ["innerHTML"];
1338
+ const _hoisted_1$6 = ["innerHTML"];
1339
1339
  const _hoisted_2$2 = { class: "el-form-item__content" };
1340
1340
  const _hoisted_3$2 = ["innerHTML"];
1341
1341
  const _hoisted_4$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0");
@@ -1708,7 +1708,7 @@
1708
1708
  key: 0,
1709
1709
  style: { "color": "rgba(0, 0, 0, 0.45)" },
1710
1710
  innerHTML: __props.config.extra
1711
- }, null, 8, _hoisted_1$7)) : vue.createCommentVNode("", true),
1711
+ }, null, 8, _hoisted_1$6)) : vue.createCommentVNode("", true),
1712
1712
  vue.createElementVNode("div", _hoisted_2$2, [
1713
1713
  vue.createVNode(vue.unref(design.TMagicTooltip), {
1714
1714
  content: "\u62D6\u62FD\u53EF\u6392\u5E8F",
@@ -1964,7 +1964,6 @@
1964
1964
  }
1965
1965
  });
1966
1966
 
1967
- const _hoisted_1$6 = { class: "custom-tabs-label" };
1968
1967
  const __default__$m = vue.defineComponent({
1969
1968
  name: "MFormTabs"
1970
1969
  });
@@ -2073,17 +2072,6 @@
2073
2072
  props.config.onChange(mForm, { model: props.model, prop: props.prop, config: props.config });
2074
2073
  }
2075
2074
  };
2076
- const getValues = (model, tabIndex, tab) => {
2077
- const tabName = props.config.dynamic ? (model[props?.name] || model)[tabIndex] : tab.name;
2078
- let propName = props.name;
2079
- if (tabName) {
2080
- propName = (model[props?.name] || model)[tab.name];
2081
- }
2082
- if (propName) {
2083
- return model[props.name];
2084
- }
2085
- return model;
2086
- };
2087
2075
  const onAddDiffCount = (tabIndex) => {
2088
2076
  if (!diffCount.value[tabIndex]) {
2089
2077
  diffCount.value[tabIndex] = 1;
@@ -2111,11 +2099,10 @@
2111
2099
  display$1(tab.display) && tabItems(tab).length ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(uiComponent).component), {
2112
2100
  key: tab[vue.unref(mForm)?.keyProp || "__key"] ?? tabIndex,
2113
2101
  name: filter(tab.status) || tabIndex.toString(),
2114
- label: filter(tab.title),
2115
2102
  lazy: tab.lazy || false
2116
2103
  }, {
2117
2104
  label: vue.withCtx(() => [
2118
- vue.createElementVNode("span", _hoisted_1$6, [
2105
+ vue.createElementVNode("span", null, [
2119
2106
  vue.createTextVNode(vue.toDisplayString(filter(tab.title)), 1),
2120
2107
  vue.createVNode(_component_el_badge, {
2121
2108
  hidden: !diffCount.value[tabIndex],
@@ -2130,8 +2117,8 @@
2130
2117
  key: item[vue.unref(mForm)?.keyProp || "__key"],
2131
2118
  config: item,
2132
2119
  disabled: __props.disabled,
2133
- model: getValues(__props.model, tabIndex, tab),
2134
- "last-values": getValues(__props.lastValues, tabIndex, tab),
2120
+ model: __props.config.dynamic ? (__props.name ? __props.model[__props.name] : __props.model)[tabIndex] : tab.name ? (__props.name ? __props.model[__props.name] : __props.model)[tab.name] : __props.name ? __props.model[__props.name] : __props.model,
2121
+ "last-values": vue.unref(lodashEs.isEmpty)(__props.lastValues) ? {} : __props.config.dynamic ? (__props.name ? __props.lastValues[__props.name] : __props.lastValues)[tabIndex] : tab.name ? (__props.name ? __props.lastValues[__props.name] : __props.lastValues)[tab.name] : __props.name ? __props.lastValues[__props.name] : __props.lastValues,
2135
2122
  "is-compare": __props.isCompare,
2136
2123
  prop: __props.config.dynamic ? `${__props.prop}${__props.prop ? "." : ""}${String(tabIndex)}` : __props.prop,
2137
2124
  size: __props.size,
@@ -2143,7 +2130,7 @@
2143
2130
  }), 128))
2144
2131
  ]),
2145
2132
  _: 2
2146
- }, 1032, ["name", "label", "lazy"])) : vue.createCommentVNode("", true)
2133
+ }, 1032, ["name", "lazy"])) : vue.createCommentVNode("", true)
2147
2134
  ], 64);
2148
2135
  }), 256))
2149
2136
  ]),