@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.umd.cjs
CHANGED
|
@@ -380,27 +380,29 @@
|
|
|
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"])),
|
|
403
|
-
vue.unref(extra) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
404
|
+
}, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
|
|
405
|
+
vue.unref(extra) && vue.unref(type) !== "table" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
404
406
|
key: 2,
|
|
405
407
|
innerHTML: vue.unref(extra),
|
|
406
408
|
class: "m-form-tip"
|
|
@@ -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,
|
|
@@ -810,25 +812,17 @@
|
|
|
810
812
|
return (_ctx, _cache) => {
|
|
811
813
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
|
|
812
814
|
vue.createElementVNode("div", null, [
|
|
813
|
-
vue.createVNode(vue.unref(design.TMagicIcon), {
|
|
814
|
-
style: { "margin-right": "7px" },
|
|
815
|
-
onClick: expandHandler
|
|
816
|
-
}, {
|
|
817
|
-
default: vue.withCtx(() => [
|
|
818
|
-
expand.value ? (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.CaretBottom), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.CaretRight), { key: 1 }))
|
|
819
|
-
]),
|
|
820
|
-
_: 1
|
|
821
|
-
}),
|
|
822
815
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
823
816
|
text: "",
|
|
824
817
|
disabled: __props.disabled,
|
|
818
|
+
icon: expand.value ? vue.unref(iconsVue.CaretBottom) : vue.unref(iconsVue.CaretRight),
|
|
825
819
|
onClick: expandHandler
|
|
826
820
|
}, {
|
|
827
821
|
default: vue.withCtx(() => [
|
|
828
822
|
vue.createTextVNode(vue.toDisplayString(vue.unref(title)), 1)
|
|
829
823
|
]),
|
|
830
824
|
_: 1
|
|
831
|
-
}, 8, ["disabled"]),
|
|
825
|
+
}, 8, ["disabled", "icon"]),
|
|
832
826
|
vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
|
|
833
827
|
style: { "color": "#f56c6c" },
|
|
834
828
|
text: "",
|
|
@@ -1049,7 +1043,7 @@
|
|
|
1049
1043
|
}
|
|
1050
1044
|
});
|
|
1051
1045
|
|
|
1052
|
-
const _hoisted_1$7 = {
|
|
1046
|
+
const _hoisted_1$7 = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
|
|
1053
1047
|
const _hoisted_2$3 = ["innerHTML"];
|
|
1054
1048
|
const _hoisted_3$3 = {
|
|
1055
1049
|
key: 0,
|
|
@@ -1090,23 +1084,19 @@
|
|
|
1090
1084
|
}, {
|
|
1091
1085
|
header: vue.withCtx(() => [
|
|
1092
1086
|
vue.createElementVNode("div", _hoisted_1$7, [
|
|
1093
|
-
vue.
|
|
1094
|
-
|
|
1095
|
-
|
|
1087
|
+
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
1088
|
+
style: { "padding": "0" },
|
|
1089
|
+
text: "",
|
|
1090
|
+
icon: expand.value ? vue.unref(iconsVue.CaretBottom) : vue.unref(iconsVue.CaretRight),
|
|
1096
1091
|
onClick: _cache[0] || (_cache[0] = ($event) => expand.value = !expand.value)
|
|
1097
|
-
}, [
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
vue.createTextVNode(
|
|
1105
|
-
__props.config && __props.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1106
|
-
key: 0,
|
|
1107
|
-
innerHTML: __props.config.extra,
|
|
1108
|
-
class: "m-form-tip"
|
|
1109
|
-
}, null, 8, _hoisted_2$3)) : vue.createCommentVNode("", true)
|
|
1092
|
+
}, null, 8, ["icon"]),
|
|
1093
|
+
__props.config && __props.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1094
|
+
key: 0,
|
|
1095
|
+
innerHTML: __props.config.extra,
|
|
1096
|
+
class: "m-form-tip"
|
|
1097
|
+
}, null, 8, _hoisted_2$3)) : vue.createCommentVNode("", true),
|
|
1098
|
+
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1099
|
+
vue.createTextVNode(vue.toDisplayString(filter(__props.config.title)), 1)
|
|
1110
1100
|
])
|
|
1111
1101
|
])
|
|
1112
1102
|
]),
|
|
@@ -1405,11 +1395,7 @@
|
|
|
1405
1395
|
setTimeout(() => rowDrop());
|
|
1406
1396
|
};
|
|
1407
1397
|
const swapArray = (index1, index2) => {
|
|
1408
|
-
|
|
1409
|
-
index2,
|
|
1410
|
-
1,
|
|
1411
|
-
props.model[modelName.value][index1]
|
|
1412
|
-
);
|
|
1398
|
+
props.model[modelName.value].splice(index1, 0, props.model[modelName.value].splice(index2, 1)[0]);
|
|
1413
1399
|
if (props.sortKey) {
|
|
1414
1400
|
for (let i = props.model[modelName.value].length - 1, v = 0; i >= 0; i--, v++) {
|
|
1415
1401
|
props.model[modelName.value][v][props.sortKey] = i;
|