@tmagic/form 1.2.9 → 1.2.11
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/tmagic-form.js +22 -36
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +22 -36
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/containers/Container.vue +4 -3
- package/src/containers/GroupListItem.vue +3 -5
- package/src/containers/Panel.vue +7 -7
- package/src/containers/Table.vue +2 -5
- package/types/containers/Panel.vue.d.ts +5 -4
package/dist/tmagic-form.js
CHANGED
|
@@ -377,27 +377,29 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
377
377
|
key: key(__props.config),
|
|
378
378
|
size: __props.size,
|
|
379
379
|
model: __props.model,
|
|
380
|
+
"last-values": __props.lastValues,
|
|
380
381
|
config: __props.config,
|
|
381
382
|
name: unref(name),
|
|
382
383
|
disabled: unref(disabled),
|
|
383
384
|
prop: unref(itemProp),
|
|
384
385
|
onChange: onChangeHandler,
|
|
385
386
|
onAddDiffCount
|
|
386
|
-
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
|
|
387
|
+
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"]))
|
|
387
388
|
]),
|
|
388
389
|
_: 1
|
|
389
390
|
})) : (openBlock(), createBlock(resolveDynamicComponent(unref(tagName)), {
|
|
390
391
|
key: key(__props.config),
|
|
391
392
|
size: __props.size,
|
|
392
393
|
model: __props.model,
|
|
394
|
+
"last-values": __props.lastValues,
|
|
393
395
|
config: __props.config,
|
|
394
396
|
name: unref(name),
|
|
395
397
|
disabled: unref(disabled),
|
|
396
398
|
prop: unref(itemProp),
|
|
397
399
|
onChange: onChangeHandler,
|
|
398
400
|
onAddDiffCount
|
|
399
|
-
}, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
|
|
400
|
-
unref(extra) ? (openBlock(), createElementBlock("div", {
|
|
401
|
+
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
|
|
402
|
+
unref(extra) && unref(type) !== "table" ? (openBlock(), createElementBlock("div", {
|
|
401
403
|
key: 2,
|
|
402
404
|
innerHTML: unref(extra),
|
|
403
405
|
class: "m-form-tip"
|
|
@@ -564,7 +566,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
564
566
|
return openBlock(), createBlock(_component_Container, {
|
|
565
567
|
key: key(item),
|
|
566
568
|
model: unref(name) || unref(name) === 0 ? __props.model[unref(name)] : __props.model,
|
|
567
|
-
"last-values": unref(name) || unref(name) === 0 ? __props.lastValues[unref(name)] : __props.lastValues,
|
|
569
|
+
"last-values": unref(name) || unref(name) === 0 ? __props.lastValues[unref(name)] || {} : __props.lastValues,
|
|
568
570
|
"is-compare": __props.isCompare,
|
|
569
571
|
config: item,
|
|
570
572
|
size: __props.size,
|
|
@@ -807,25 +809,17 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
807
809
|
return (_ctx, _cache) => {
|
|
808
810
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
809
811
|
createElementVNode("div", null, [
|
|
810
|
-
createVNode(unref(TMagicIcon), {
|
|
811
|
-
style: { "margin-right": "7px" },
|
|
812
|
-
onClick: expandHandler
|
|
813
|
-
}, {
|
|
814
|
-
default: withCtx(() => [
|
|
815
|
-
expand.value ? (openBlock(), createBlock(unref(CaretBottom), { key: 0 })) : (openBlock(), createBlock(unref(CaretRight), { key: 1 }))
|
|
816
|
-
]),
|
|
817
|
-
_: 1
|
|
818
|
-
}),
|
|
819
812
|
createVNode(unref(TMagicButton), {
|
|
820
813
|
text: "",
|
|
821
814
|
disabled: __props.disabled,
|
|
815
|
+
icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
|
|
822
816
|
onClick: expandHandler
|
|
823
817
|
}, {
|
|
824
818
|
default: withCtx(() => [
|
|
825
819
|
createTextVNode(toDisplayString(unref(title)), 1)
|
|
826
820
|
]),
|
|
827
821
|
_: 1
|
|
828
|
-
}, 8, ["disabled"]),
|
|
822
|
+
}, 8, ["disabled", "icon"]),
|
|
829
823
|
withDirectives(createVNode(unref(TMagicButton), {
|
|
830
824
|
style: { "color": "#f56c6c" },
|
|
831
825
|
text: "",
|
|
@@ -1046,7 +1040,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1046
1040
|
}
|
|
1047
1041
|
});
|
|
1048
1042
|
|
|
1049
|
-
const _hoisted_1$7 = {
|
|
1043
|
+
const _hoisted_1$7 = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
|
|
1050
1044
|
const _hoisted_2$3 = ["innerHTML"];
|
|
1051
1045
|
const _hoisted_3$3 = {
|
|
1052
1046
|
key: 0,
|
|
@@ -1087,23 +1081,19 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1087
1081
|
}, {
|
|
1088
1082
|
header: withCtx(() => [
|
|
1089
1083
|
createElementVNode("div", _hoisted_1$7, [
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1084
|
+
createVNode(unref(TMagicButton), {
|
|
1085
|
+
style: { "padding": "0" },
|
|
1086
|
+
text: "",
|
|
1087
|
+
icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
|
|
1093
1088
|
onClick: _cache[0] || (_cache[0] = ($event) => expand.value = !expand.value)
|
|
1094
|
-
}, [
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
createTextVNode(
|
|
1102
|
-
__props.config && __props.config.extra ? (openBlock(), createElementBlock("span", {
|
|
1103
|
-
key: 0,
|
|
1104
|
-
innerHTML: __props.config.extra,
|
|
1105
|
-
class: "m-form-tip"
|
|
1106
|
-
}, null, 8, _hoisted_2$3)) : createCommentVNode("", true)
|
|
1089
|
+
}, null, 8, ["icon"]),
|
|
1090
|
+
__props.config && __props.config.extra ? (openBlock(), createElementBlock("span", {
|
|
1091
|
+
key: 0,
|
|
1092
|
+
innerHTML: __props.config.extra,
|
|
1093
|
+
class: "m-form-tip"
|
|
1094
|
+
}, null, 8, _hoisted_2$3)) : createCommentVNode("", true),
|
|
1095
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1096
|
+
createTextVNode(toDisplayString(filter(__props.config.title)), 1)
|
|
1107
1097
|
])
|
|
1108
1098
|
])
|
|
1109
1099
|
]),
|
|
@@ -1402,11 +1392,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1402
1392
|
setTimeout(() => rowDrop());
|
|
1403
1393
|
};
|
|
1404
1394
|
const swapArray = (index1, index2) => {
|
|
1405
|
-
|
|
1406
|
-
index2,
|
|
1407
|
-
1,
|
|
1408
|
-
props.model[modelName.value][index1]
|
|
1409
|
-
);
|
|
1395
|
+
props.model[modelName.value].splice(index1, 0, props.model[modelName.value].splice(index2, 1)[0]);
|
|
1410
1396
|
if (props.sortKey) {
|
|
1411
1397
|
for (let i = props.model[modelName.value].length - 1, v = 0; i >= 0; i--, v++) {
|
|
1412
1398
|
props.model[modelName.value][v][props.sortKey] = i;
|