@tmagic/form 1.2.8 → 1.2.10
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.
- package/dist/style.css +2 -4
- package/dist/tmagic-form.js +22 -33
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +21 -32
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/containers/Container.vue +3 -2
- package/src/containers/Tabs.vue +22 -17
- package/src/theme/tabs.scss +2 -4
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
return valuesTmp || {};
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
const _hoisted_1$
|
|
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$
|
|
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 }, {
|
|
@@ -380,26 +380,28 @@
|
|
|
380
380
|
key: key(__props.config),
|
|
381
381
|
size: __props.size,
|
|
382
382
|
model: __props.model,
|
|
383
|
+
"last-values": __props.lastValues,
|
|
383
384
|
config: __props.config,
|
|
384
385
|
name: vue.unref(name),
|
|
385
386
|
disabled: vue.unref(disabled),
|
|
386
387
|
prop: vue.unref(itemProp),
|
|
387
388
|
onChange: onChangeHandler,
|
|
388
389
|
onAddDiffCount
|
|
389
|
-
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
|
|
390
|
+
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"]))
|
|
390
391
|
]),
|
|
391
392
|
_: 1
|
|
392
393
|
})) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(tagName)), {
|
|
393
394
|
key: key(__props.config),
|
|
394
395
|
size: __props.size,
|
|
395
396
|
model: __props.model,
|
|
397
|
+
"last-values": __props.lastValues,
|
|
396
398
|
config: __props.config,
|
|
397
399
|
name: vue.unref(name),
|
|
398
400
|
disabled: vue.unref(disabled),
|
|
399
401
|
prop: vue.unref(itemProp),
|
|
400
402
|
onChange: onChangeHandler,
|
|
401
403
|
onAddDiffCount
|
|
402
|
-
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
|
|
404
|
+
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
|
|
403
405
|
vue.unref(extra) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
404
406
|
key: 2,
|
|
405
407
|
innerHTML: vue.unref(extra),
|
|
@@ -567,7 +569,7 @@
|
|
|
567
569
|
return vue.openBlock(), vue.createBlock(_component_Container, {
|
|
568
570
|
key: key(item),
|
|
569
571
|
model: vue.unref(name) || vue.unref(name) === 0 ? __props.model[vue.unref(name)] : __props.model,
|
|
570
|
-
"last-values": vue.unref(name) || vue.unref(name) === 0 ? __props.lastValues[vue.unref(name)] : __props.lastValues,
|
|
572
|
+
"last-values": vue.unref(name) || vue.unref(name) === 0 ? __props.lastValues[vue.unref(name)] || {} : __props.lastValues,
|
|
571
573
|
"is-compare": __props.isCompare,
|
|
572
574
|
config: item,
|
|
573
575
|
size: __props.size,
|
|
@@ -600,7 +602,7 @@
|
|
|
600
602
|
}
|
|
601
603
|
});
|
|
602
604
|
|
|
603
|
-
const _hoisted_1$
|
|
605
|
+
const _hoisted_1$a = ["innerHTML"];
|
|
604
606
|
const _hoisted_2$6 = ["innerHTML"];
|
|
605
607
|
const _hoisted_3$6 = { key: 1 };
|
|
606
608
|
const _hoisted_4$5 = ["innerHTML"];
|
|
@@ -675,7 +677,7 @@
|
|
|
675
677
|
default: vue.withCtx(() => [
|
|
676
678
|
vue.createElementVNode("span", {
|
|
677
679
|
innerHTML: __props.config.legend
|
|
678
|
-
}, null, 8, _hoisted_1$
|
|
680
|
+
}, null, 8, _hoisted_1$a),
|
|
679
681
|
__props.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
680
682
|
key: 0,
|
|
681
683
|
innerHTML: __props.config.extra,
|
|
@@ -740,7 +742,7 @@
|
|
|
740
742
|
}
|
|
741
743
|
});
|
|
742
744
|
|
|
743
|
-
const _hoisted_1$
|
|
745
|
+
const _hoisted_1$9 = { class: "m-fields-group-list-item" };
|
|
744
746
|
const _hoisted_2$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u79FB");
|
|
745
747
|
const _hoisted_3$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u79FB");
|
|
746
748
|
const _hoisted_4$4 = ["innerHTML"];
|
|
@@ -808,7 +810,7 @@
|
|
|
808
810
|
};
|
|
809
811
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
810
812
|
return (_ctx, _cache) => {
|
|
811
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
813
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
|
|
812
814
|
vue.createElementVNode("div", null, [
|
|
813
815
|
vue.createVNode(vue.unref(design.TMagicIcon), {
|
|
814
816
|
style: { "margin-right": "7px" },
|
|
@@ -902,7 +904,7 @@
|
|
|
902
904
|
}
|
|
903
905
|
});
|
|
904
906
|
|
|
905
|
-
const _hoisted_1$
|
|
907
|
+
const _hoisted_1$8 = { class: "m-fields-group-list" };
|
|
906
908
|
const _hoisted_2$4 = ["innerHTML"];
|
|
907
909
|
const _hoisted_3$4 = {
|
|
908
910
|
key: 1,
|
|
@@ -997,7 +999,7 @@
|
|
|
997
999
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
998
1000
|
const getLastValues = (item, index) => item?.[index] || {};
|
|
999
1001
|
return (_ctx, _cache) => {
|
|
1000
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1002
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
|
|
1001
1003
|
__props.config.extra ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1002
1004
|
key: 0,
|
|
1003
1005
|
innerHTML: __props.config.extra,
|
|
@@ -1049,7 +1051,7 @@
|
|
|
1049
1051
|
}
|
|
1050
1052
|
});
|
|
1051
1053
|
|
|
1052
|
-
const _hoisted_1$
|
|
1054
|
+
const _hoisted_1$7 = { class: "clearfix" };
|
|
1053
1055
|
const _hoisted_2$3 = ["innerHTML"];
|
|
1054
1056
|
const _hoisted_3$3 = {
|
|
1055
1057
|
key: 0,
|
|
@@ -1089,7 +1091,7 @@
|
|
|
1089
1091
|
"body-style": { display: expand.value ? "block" : "none" }
|
|
1090
1092
|
}, {
|
|
1091
1093
|
header: vue.withCtx(() => [
|
|
1092
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
1094
|
+
vue.createElementVNode("div", _hoisted_1$7, [
|
|
1093
1095
|
vue.createElementVNode("a", {
|
|
1094
1096
|
href: "javascript:",
|
|
1095
1097
|
style: { "width": "100%", "display": "block" },
|
|
@@ -1335,7 +1337,7 @@
|
|
|
1335
1337
|
}
|
|
1336
1338
|
});
|
|
1337
1339
|
|
|
1338
|
-
const _hoisted_1$
|
|
1340
|
+
const _hoisted_1$6 = ["innerHTML"];
|
|
1339
1341
|
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1340
1342
|
const _hoisted_3$2 = ["innerHTML"];
|
|
1341
1343
|
const _hoisted_4$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0");
|
|
@@ -1708,7 +1710,7 @@
|
|
|
1708
1710
|
key: 0,
|
|
1709
1711
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1710
1712
|
innerHTML: __props.config.extra
|
|
1711
|
-
}, null, 8, _hoisted_1$
|
|
1713
|
+
}, null, 8, _hoisted_1$6)) : vue.createCommentVNode("", true),
|
|
1712
1714
|
vue.createElementVNode("div", _hoisted_2$2, [
|
|
1713
1715
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
1714
1716
|
content: "\u62D6\u62FD\u53EF\u6392\u5E8F",
|
|
@@ -1964,7 +1966,6 @@
|
|
|
1964
1966
|
}
|
|
1965
1967
|
});
|
|
1966
1968
|
|
|
1967
|
-
const _hoisted_1$6 = { class: "custom-tabs-label" };
|
|
1968
1969
|
const __default__$m = vue.defineComponent({
|
|
1969
1970
|
name: "MFormTabs"
|
|
1970
1971
|
});
|
|
@@ -2073,17 +2074,6 @@
|
|
|
2073
2074
|
props.config.onChange(mForm, { model: props.model, prop: props.prop, config: props.config });
|
|
2074
2075
|
}
|
|
2075
2076
|
};
|
|
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
2077
|
const onAddDiffCount = (tabIndex) => {
|
|
2088
2078
|
if (!diffCount.value[tabIndex]) {
|
|
2089
2079
|
diffCount.value[tabIndex] = 1;
|
|
@@ -2111,11 +2101,10 @@
|
|
|
2111
2101
|
display$1(tab.display) && tabItems(tab).length ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(uiComponent).component), {
|
|
2112
2102
|
key: tab[vue.unref(mForm)?.keyProp || "__key"] ?? tabIndex,
|
|
2113
2103
|
name: filter(tab.status) || tabIndex.toString(),
|
|
2114
|
-
label: filter(tab.title),
|
|
2115
2104
|
lazy: tab.lazy || false
|
|
2116
2105
|
}, {
|
|
2117
2106
|
label: vue.withCtx(() => [
|
|
2118
|
-
vue.createElementVNode("span",
|
|
2107
|
+
vue.createElementVNode("span", null, [
|
|
2119
2108
|
vue.createTextVNode(vue.toDisplayString(filter(tab.title)), 1),
|
|
2120
2109
|
vue.createVNode(_component_el_badge, {
|
|
2121
2110
|
hidden: !diffCount.value[tabIndex],
|
|
@@ -2130,8 +2119,8 @@
|
|
|
2130
2119
|
key: item[vue.unref(mForm)?.keyProp || "__key"],
|
|
2131
2120
|
config: item,
|
|
2132
2121
|
disabled: __props.disabled,
|
|
2133
|
-
model:
|
|
2134
|
-
"last-values":
|
|
2122
|
+
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,
|
|
2123
|
+
"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
2124
|
"is-compare": __props.isCompare,
|
|
2136
2125
|
prop: __props.config.dynamic ? `${__props.prop}${__props.prop ? "." : ""}${String(tabIndex)}` : __props.prop,
|
|
2137
2126
|
size: __props.size,
|
|
@@ -2143,7 +2132,7 @@
|
|
|
2143
2132
|
}), 128))
|
|
2144
2133
|
]),
|
|
2145
2134
|
_: 2
|
|
2146
|
-
}, 1032, ["name", "
|
|
2135
|
+
}, 1032, ["name", "lazy"])) : vue.createCommentVNode("", true)
|
|
2147
2136
|
], 64);
|
|
2148
2137
|
}), 256))
|
|
2149
2138
|
]),
|