@tmagic/form 1.3.0-alpha.15 → 1.3.0-alpha.17
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 +8 -0
- package/dist/tmagic-form.js +183 -114
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +204 -134
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/FormDialog.vue +1 -1
- package/src/FormDrawer.vue +6 -2
- package/src/containers/Container.vue +10 -8
- package/src/containers/GroupList.vue +1 -0
- package/src/containers/GroupListItem.vue +8 -2
- package/src/fields/Cascader.vue +2 -12
- package/src/fields/Checkbox.vue +2 -12
- package/src/fields/CheckboxGroup.vue +2 -12
- package/src/fields/ColorPicker.vue +5 -13
- package/src/fields/Date.vue +5 -13
- package/src/fields/DateTime.vue +5 -13
- package/src/fields/Daterange.vue +2 -12
- package/src/fields/Display.vue +2 -10
- package/src/fields/DynamicField.vue +3 -13
- package/src/fields/Hidden.vue +2 -10
- package/src/fields/Link.vue +2 -12
- package/src/fields/Number.vue +7 -14
- package/src/fields/NumberRange.vue +50 -0
- package/src/fields/RadioGroup.vue +2 -12
- package/src/fields/Select.vue +2 -12
- package/src/fields/Switch.vue +6 -14
- package/src/fields/Text.vue +7 -14
- package/src/fields/Textarea.vue +7 -14
- package/src/fields/Time.vue +5 -13
- package/src/index.ts +3 -0
- package/src/schema.ts +22 -1
- package/src/theme/index.scss +1 -0
- package/src/theme/number-range.scss +8 -0
- package/src/utils/config.ts +1 -1
- package/src/utils/form.ts +2 -1
- package/types/Form.vue.d.ts +2 -2
- package/types/FormDialog.vue.d.ts +5 -5
- package/types/FormDrawer.vue.d.ts +10 -5
- package/types/fields/Cascader.vue.d.ts +2 -22
- package/types/fields/Checkbox.vue.d.ts +2 -22
- package/types/fields/CheckboxGroup.vue.d.ts +2 -22
- package/types/fields/ColorPicker.vue.d.ts +2 -24
- package/types/fields/Date.vue.d.ts +2 -24
- package/types/fields/DateTime.vue.d.ts +2 -24
- package/types/fields/Daterange.vue.d.ts +2 -22
- package/types/fields/Display.vue.d.ts +2 -18
- package/types/fields/DynamicField.vue.d.ts +2 -22
- package/types/fields/Hidden.vue.d.ts +2 -18
- package/types/fields/Link.vue.d.ts +2 -22
- package/types/fields/Number.vue.d.ts +2 -25
- package/types/fields/NumberRange.vue.d.ts +12 -0
- package/types/fields/RadioGroup.vue.d.ts +2 -22
- package/types/fields/Select.vue.d.ts +2 -22
- package/types/fields/Switch.vue.d.ts +2 -24
- package/types/fields/Text.vue.d.ts +2 -25
- package/types/fields/Textarea.vue.d.ts +2 -25
- package/types/fields/Time.vue.d.ts +2 -24
- package/types/index.d.ts +1 -0
- package/types/schema.d.ts +20 -1
- package/types/utils/config.d.ts +1 -1
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
if (["switch", "checkbox"].includes(type)) {
|
|
91
91
|
return false;
|
|
92
92
|
}
|
|
93
|
-
if (multiple) {
|
|
93
|
+
if (multiple || type === "number-range") {
|
|
94
94
|
return [];
|
|
95
95
|
}
|
|
96
96
|
return "";
|
|
@@ -105,7 +105,8 @@
|
|
|
105
105
|
parent: mForm?.parentValues || {},
|
|
106
106
|
formValue: mForm?.values || props.model,
|
|
107
107
|
prop: props.prop,
|
|
108
|
-
config: props.config
|
|
108
|
+
config: props.config,
|
|
109
|
+
index: props.index
|
|
109
110
|
});
|
|
110
111
|
};
|
|
111
112
|
const display = function(mForm, config, props) {
|
|
@@ -164,8 +165,8 @@
|
|
|
164
165
|
return valuesTmp || {};
|
|
165
166
|
};
|
|
166
167
|
|
|
167
|
-
const _hoisted_1$
|
|
168
|
-
const _hoisted_2$
|
|
168
|
+
const _hoisted_1$d = ["innerHTML"];
|
|
169
|
+
const _hoisted_2$7 = ["innerHTML"];
|
|
169
170
|
const _hoisted_3$4 = ["innerHTML"];
|
|
170
171
|
const _hoisted_4$4 = ["innerHTML"];
|
|
171
172
|
const _hoisted_5$3 = ["innerHTML"];
|
|
@@ -180,7 +181,7 @@
|
|
|
180
181
|
key: 5,
|
|
181
182
|
style: { "text-align": "center" }
|
|
182
183
|
};
|
|
183
|
-
const _sfc_main$
|
|
184
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
184
185
|
...{
|
|
185
186
|
name: "MFormContainer"
|
|
186
187
|
},
|
|
@@ -230,6 +231,7 @@
|
|
|
230
231
|
return "m-fields-text";
|
|
231
232
|
});
|
|
232
233
|
const disabled = vue.computed(() => props.disabled || filterFunction(mForm, props.config.disabled, props));
|
|
234
|
+
const text = vue.computed(() => filterFunction(mForm, props.config.text, props));
|
|
233
235
|
const tooltip = vue.computed(() => filterFunction(mForm, props.config.tooltip, props));
|
|
234
236
|
const extra = vue.computed(() => filterFunction(mForm, props.config.extra, props));
|
|
235
237
|
const rule = vue.computed(() => getRules(mForm, props.config.rules, props));
|
|
@@ -260,7 +262,7 @@
|
|
|
260
262
|
(showDiff2) => {
|
|
261
263
|
if (type.value === "hidden")
|
|
262
264
|
return;
|
|
263
|
-
if (items.value && !
|
|
265
|
+
if (items.value && !text.value && type.value && display$1.value)
|
|
264
266
|
return;
|
|
265
267
|
if (display$1.value && showDiff2 && type.value) {
|
|
266
268
|
emit("addDiffCount");
|
|
@@ -337,7 +339,7 @@
|
|
|
337
339
|
name: _ctx.config.name,
|
|
338
340
|
disabled: disabled.value,
|
|
339
341
|
prop: itemProp.value
|
|
340
|
-
}, null, 8, ["model", "config", "name", "disabled", "prop"])) : items.value && !
|
|
342
|
+
}, null, 8, ["model", "config", "name", "disabled", "prop"])) : items.value && !text.value && type.value && display$1.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tagName.value), {
|
|
341
343
|
key: key(_ctx.config),
|
|
342
344
|
size: _ctx.size,
|
|
343
345
|
model: _ctx.model,
|
|
@@ -355,20 +357,20 @@
|
|
|
355
357
|
}, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : type.value && display$1.value && !showDiff.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
356
358
|
vue.createVNode(vue.unref(design.TMagicFormItem), {
|
|
357
359
|
style: vue.normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
|
|
358
|
-
class: vue.normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !
|
|
360
|
+
class: vue.normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
359
361
|
prop: itemProp.value,
|
|
360
362
|
"label-width": itemLabelWidth.value,
|
|
361
363
|
rules: rule.value
|
|
362
364
|
}, {
|
|
363
365
|
label: vue.withCtx(() => [
|
|
364
366
|
vue.createElementVNode("span", {
|
|
365
|
-
innerHTML: type.value === "checkbox" ? "" :
|
|
366
|
-
}, null, 8, _hoisted_1$
|
|
367
|
+
innerHTML: type.value === "checkbox" ? "" : text.value
|
|
368
|
+
}, null, 8, _hoisted_1$d)
|
|
367
369
|
]),
|
|
368
370
|
default: vue.withCtx(() => [
|
|
369
371
|
tooltip.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), { key: 0 }, {
|
|
370
372
|
content: vue.withCtx(() => [
|
|
371
|
-
vue.createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_2$
|
|
373
|
+
vue.createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_2$7)
|
|
372
374
|
]),
|
|
373
375
|
default: vue.withCtx(() => [
|
|
374
376
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tagName.value), {
|
|
@@ -427,14 +429,14 @@
|
|
|
427
429
|
], 64)) : type.value && display$1.value && showDiff.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
|
|
428
430
|
vue.createVNode(vue.unref(design.TMagicFormItem), {
|
|
429
431
|
style: vue.normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
|
|
430
|
-
class: vue.normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !
|
|
432
|
+
class: vue.normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
431
433
|
prop: itemProp.value,
|
|
432
434
|
"label-width": itemLabelWidth.value,
|
|
433
435
|
rules: rule.value
|
|
434
436
|
}, {
|
|
435
437
|
label: vue.withCtx(() => [
|
|
436
438
|
vue.createElementVNode("span", {
|
|
437
|
-
innerHTML: type.value === "checkbox" ? "" :
|
|
439
|
+
innerHTML: type.value === "checkbox" ? "" : text.value
|
|
438
440
|
}, null, 8, _hoisted_5$3)
|
|
439
441
|
]),
|
|
440
442
|
default: vue.withCtx(() => [
|
|
@@ -494,14 +496,14 @@
|
|
|
494
496
|
})) : vue.createCommentVNode("", true),
|
|
495
497
|
vue.createVNode(vue.unref(design.TMagicFormItem), {
|
|
496
498
|
style: vue.normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
|
|
497
|
-
class: vue.normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !
|
|
499
|
+
class: vue.normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
498
500
|
prop: itemProp.value,
|
|
499
501
|
"label-width": itemLabelWidth.value,
|
|
500
502
|
rules: rule.value
|
|
501
503
|
}, {
|
|
502
504
|
label: vue.withCtx(() => [
|
|
503
505
|
vue.createElementVNode("span", {
|
|
504
|
-
innerHTML: type.value === "checkbox" ? "" :
|
|
506
|
+
innerHTML: type.value === "checkbox" ? "" : text.value
|
|
505
507
|
}, null, 8, _hoisted_9)
|
|
506
508
|
]),
|
|
507
509
|
default: vue.withCtx(() => [
|
|
@@ -597,8 +599,8 @@
|
|
|
597
599
|
}
|
|
598
600
|
});
|
|
599
601
|
|
|
600
|
-
const _hoisted_1$
|
|
601
|
-
const _hoisted_2$
|
|
602
|
+
const _hoisted_1$c = ["innerHTML"];
|
|
603
|
+
const _hoisted_2$6 = ["innerHTML"];
|
|
602
604
|
const _hoisted_3$3 = { key: 1 };
|
|
603
605
|
const _hoisted_4$3 = ["innerHTML"];
|
|
604
606
|
const _hoisted_5$2 = ["innerHTML"];
|
|
@@ -608,7 +610,7 @@
|
|
|
608
610
|
};
|
|
609
611
|
const _hoisted_7 = { style: { "flex": "1" } };
|
|
610
612
|
const _hoisted_8 = ["src"];
|
|
611
|
-
const _sfc_main$
|
|
613
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
612
614
|
...{
|
|
613
615
|
name: "MFormFieldset"
|
|
614
616
|
},
|
|
@@ -667,12 +669,12 @@
|
|
|
667
669
|
default: vue.withCtx(() => [
|
|
668
670
|
vue.createElementVNode("span", {
|
|
669
671
|
innerHTML: _ctx.config.legend
|
|
670
|
-
}, null, 8, _hoisted_1$
|
|
672
|
+
}, null, 8, _hoisted_1$c),
|
|
671
673
|
_ctx.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
672
674
|
key: 0,
|
|
673
675
|
innerHTML: _ctx.config.extra,
|
|
674
676
|
class: "m-form-tip"
|
|
675
|
-
}, null, 8, _hoisted_2$
|
|
677
|
+
}, null, 8, _hoisted_2$6)) : vue.createCommentVNode("", true)
|
|
676
678
|
]),
|
|
677
679
|
_: 1
|
|
678
680
|
}, 8, ["modelValue", "prop"])
|
|
@@ -691,7 +693,7 @@
|
|
|
691
693
|
_ctx.config.schematic && show.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
692
694
|
vue.createElementVNode("div", _hoisted_7, [
|
|
693
695
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.config.items, (item, index) => {
|
|
694
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
696
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
695
697
|
key: key(item, index),
|
|
696
698
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
697
699
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -712,7 +714,7 @@
|
|
|
712
714
|
src: _ctx.config.schematic
|
|
713
715
|
}, null, 8, _hoisted_8)
|
|
714
716
|
])) : show.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList(_ctx.config.items, (item, index) => {
|
|
715
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
717
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
716
718
|
key: key(item, index),
|
|
717
719
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
718
720
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -732,9 +734,9 @@
|
|
|
732
734
|
}
|
|
733
735
|
});
|
|
734
736
|
|
|
735
|
-
const _hoisted_1$
|
|
736
|
-
const _hoisted_2$
|
|
737
|
-
const _sfc_main$
|
|
737
|
+
const _hoisted_1$b = { class: "m-fields-group-list-item" };
|
|
738
|
+
const _hoisted_2$5 = ["innerHTML"];
|
|
739
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
738
740
|
...{
|
|
739
741
|
name: "MFormGroupListItem"
|
|
740
742
|
},
|
|
@@ -767,7 +769,11 @@
|
|
|
767
769
|
if (props.config.titleKey && props.model[props.config.titleKey]) {
|
|
768
770
|
return props.model[props.config.titleKey];
|
|
769
771
|
}
|
|
770
|
-
|
|
772
|
+
if (props.config.title) {
|
|
773
|
+
return filterFunction(mForm, props.config.title, props);
|
|
774
|
+
}
|
|
775
|
+
const titlePrefix = props.config.titlePrefix || "组";
|
|
776
|
+
return `${titlePrefix} ${String(props.index + 1)}`;
|
|
771
777
|
});
|
|
772
778
|
const length = vue.computed(() => props.groupModel?.length || 0);
|
|
773
779
|
const itemExtra = vue.computed(() => filterFunction(mForm, props.config.itemExtra, props));
|
|
@@ -783,7 +789,7 @@
|
|
|
783
789
|
}
|
|
784
790
|
return true;
|
|
785
791
|
};
|
|
786
|
-
const changeOrder = (offset = 0) => emit("swap-item", props.index,
|
|
792
|
+
const changeOrder = (offset = 0) => emit("swap-item", props.index, props.index + offset);
|
|
787
793
|
const movable = () => {
|
|
788
794
|
const { movable: movable2 } = props.config;
|
|
789
795
|
if (movable2 === void 0)
|
|
@@ -795,7 +801,7 @@
|
|
|
795
801
|
};
|
|
796
802
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
797
803
|
return (_ctx, _cache) => {
|
|
798
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
804
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
|
|
799
805
|
vue.createElementVNode("div", null, [
|
|
800
806
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
801
807
|
text: "",
|
|
@@ -861,9 +867,9 @@
|
|
|
861
867
|
key: 1,
|
|
862
868
|
innerHTML: itemExtra.value,
|
|
863
869
|
class: "m-form-tip"
|
|
864
|
-
}, null, 8, _hoisted_2$
|
|
870
|
+
}, null, 8, _hoisted_2$5)) : vue.createCommentVNode("", true)
|
|
865
871
|
]),
|
|
866
|
-
expand.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
872
|
+
expand.value ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
867
873
|
key: 0,
|
|
868
874
|
config: rowConfig.value,
|
|
869
875
|
model: _ctx.model,
|
|
@@ -881,8 +887,8 @@
|
|
|
881
887
|
}
|
|
882
888
|
});
|
|
883
889
|
|
|
884
|
-
const _hoisted_1$
|
|
885
|
-
const _hoisted_2$
|
|
890
|
+
const _hoisted_1$a = { class: "m-fields-group-list" };
|
|
891
|
+
const _hoisted_2$4 = ["innerHTML"];
|
|
886
892
|
const _hoisted_3$2 = {
|
|
887
893
|
key: 1,
|
|
888
894
|
class: "el-table__empty-block"
|
|
@@ -891,7 +897,7 @@
|
|
|
891
897
|
const _hoisted_5$1 = [
|
|
892
898
|
_hoisted_4$2
|
|
893
899
|
];
|
|
894
|
-
const _sfc_main$
|
|
900
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
895
901
|
...{
|
|
896
902
|
name: "MFormGroupList"
|
|
897
903
|
},
|
|
@@ -974,14 +980,14 @@
|
|
|
974
980
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
975
981
|
const getLastValues = (item, index) => item?.[index] || {};
|
|
976
982
|
return (_ctx, _cache) => {
|
|
977
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
983
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
|
|
978
984
|
_ctx.config.extra ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
979
985
|
key: 0,
|
|
980
986
|
innerHTML: _ctx.config.extra,
|
|
981
987
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
982
|
-
}, null, 8, _hoisted_2$
|
|
988
|
+
}, null, 8, _hoisted_2$4)) : vue.createCommentVNode("", true),
|
|
983
989
|
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, _hoisted_5$1)) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(_ctx.model[_ctx.name], (item, index) => {
|
|
984
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
990
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$v, {
|
|
985
991
|
key: index,
|
|
986
992
|
model: item,
|
|
987
993
|
lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
|
|
@@ -1026,15 +1032,15 @@
|
|
|
1026
1032
|
}
|
|
1027
1033
|
});
|
|
1028
1034
|
|
|
1029
|
-
const _hoisted_1$
|
|
1030
|
-
const _hoisted_2$
|
|
1035
|
+
const _hoisted_1$9 = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
|
|
1036
|
+
const _hoisted_2$3 = ["innerHTML"];
|
|
1031
1037
|
const _hoisted_3$1 = {
|
|
1032
1038
|
key: 0,
|
|
1033
1039
|
style: { "display": "flex" }
|
|
1034
1040
|
};
|
|
1035
1041
|
const _hoisted_4$1 = { style: { "flex": "1" } };
|
|
1036
1042
|
const _hoisted_5 = ["src"];
|
|
1037
|
-
const _sfc_main$
|
|
1043
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
1038
1044
|
...{
|
|
1039
1045
|
name: "MFormPanel"
|
|
1040
1046
|
},
|
|
@@ -1066,7 +1072,7 @@
|
|
|
1066
1072
|
"body-style": { display: expand.value ? "block" : "none" }
|
|
1067
1073
|
}, {
|
|
1068
1074
|
header: vue.withCtx(() => [
|
|
1069
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
1075
|
+
vue.createElementVNode("div", _hoisted_1$9, [
|
|
1070
1076
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
1071
1077
|
style: { "padding": "0" },
|
|
1072
1078
|
text: "",
|
|
@@ -1077,7 +1083,7 @@
|
|
|
1077
1083
|
key: 0,
|
|
1078
1084
|
innerHTML: _ctx.config.extra,
|
|
1079
1085
|
class: "m-form-tip"
|
|
1080
|
-
}, null, 8, _hoisted_2$
|
|
1086
|
+
}, null, 8, _hoisted_2$3)) : vue.createCommentVNode("", true),
|
|
1081
1087
|
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1082
1088
|
vue.createTextVNode(vue.toDisplayString(filter(_ctx.config.title)), 1)
|
|
1083
1089
|
])
|
|
@@ -1089,7 +1095,7 @@
|
|
|
1089
1095
|
_ctx.config.schematic ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1, [
|
|
1090
1096
|
vue.createElementVNode("div", _hoisted_4$1, [
|
|
1091
1097
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items.value, (item, index) => {
|
|
1092
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1098
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
1093
1099
|
key: item[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1094
1100
|
config: item,
|
|
1095
1101
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1109,7 +1115,7 @@
|
|
|
1109
1115
|
src: _ctx.config.schematic
|
|
1110
1116
|
}, null, 8, _hoisted_5)
|
|
1111
1117
|
])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(items.value, (item, index) => {
|
|
1112
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1118
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
1113
1119
|
key: item[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1114
1120
|
config: item,
|
|
1115
1121
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1131,7 +1137,7 @@
|
|
|
1131
1137
|
}
|
|
1132
1138
|
});
|
|
1133
1139
|
|
|
1134
|
-
const _sfc_main$
|
|
1140
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
1135
1141
|
...{
|
|
1136
1142
|
name: "MFormCol"
|
|
1137
1143
|
},
|
|
@@ -1158,7 +1164,7 @@
|
|
|
1158
1164
|
return (_ctx, _cache) => {
|
|
1159
1165
|
return vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCol), { span: _ctx.span }, {
|
|
1160
1166
|
default: vue.withCtx(() => [
|
|
1161
|
-
vue.createVNode(_sfc_main$
|
|
1167
|
+
vue.createVNode(_sfc_main$x, {
|
|
1162
1168
|
model: _ctx.model,
|
|
1163
1169
|
lastValues: _ctx.lastValues,
|
|
1164
1170
|
"is-compare": _ctx.isCompare,
|
|
@@ -1180,7 +1186,7 @@
|
|
|
1180
1186
|
}
|
|
1181
1187
|
});
|
|
1182
1188
|
|
|
1183
|
-
const _sfc_main$
|
|
1189
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
1184
1190
|
...{
|
|
1185
1191
|
name: "MFormRow"
|
|
1186
1192
|
},
|
|
@@ -1207,7 +1213,7 @@
|
|
|
1207
1213
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicRow), { gutter: 10 }, {
|
|
1208
1214
|
default: vue.withCtx(() => [
|
|
1209
1215
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.config.items, (col, index) => {
|
|
1210
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1216
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$s, {
|
|
1211
1217
|
key: col[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1212
1218
|
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1213
1219
|
config: col,
|
|
@@ -1230,7 +1236,7 @@
|
|
|
1230
1236
|
}
|
|
1231
1237
|
});
|
|
1232
1238
|
|
|
1233
|
-
const _sfc_main$
|
|
1239
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
1234
1240
|
...{
|
|
1235
1241
|
name: "MFormStep"
|
|
1236
1242
|
},
|
|
@@ -1284,7 +1290,7 @@
|
|
|
1284
1290
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1285
1291
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(step.items, (item) => {
|
|
1286
1292
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1287
|
-
item ? vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1293
|
+
item ? vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
1288
1294
|
key: item[vue.unref(mForm)?.keyProp || "__key"],
|
|
1289
1295
|
config: item,
|
|
1290
1296
|
model: step.name ? _ctx.model[step.name] : _ctx.model,
|
|
@@ -1308,15 +1314,15 @@
|
|
|
1308
1314
|
}
|
|
1309
1315
|
});
|
|
1310
1316
|
|
|
1311
|
-
const _hoisted_1$
|
|
1312
|
-
const _hoisted_2$
|
|
1317
|
+
const _hoisted_1$8 = ["innerHTML"];
|
|
1318
|
+
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1313
1319
|
const _hoisted_3 = ["innerHTML"];
|
|
1314
1320
|
const _hoisted_4 = {
|
|
1315
1321
|
key: 1,
|
|
1316
1322
|
class: "bottom",
|
|
1317
1323
|
style: { "text-align": "right" }
|
|
1318
1324
|
};
|
|
1319
|
-
const _sfc_main$
|
|
1325
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
1320
1326
|
...{
|
|
1321
1327
|
name: "MFormTable"
|
|
1322
1328
|
},
|
|
@@ -1671,8 +1677,8 @@
|
|
|
1671
1677
|
key: 0,
|
|
1672
1678
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1673
1679
|
innerHTML: _ctx.config.extra
|
|
1674
|
-
}, null, 8, _hoisted_1$
|
|
1675
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
1680
|
+
}, null, 8, _hoisted_1$8)) : vue.createCommentVNode("", true),
|
|
1681
|
+
vue.createElementVNode("div", _hoisted_2$2, [
|
|
1676
1682
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
1677
1683
|
content: "拖拽可排序",
|
|
1678
1684
|
placement: "left-start",
|
|
@@ -1806,7 +1812,7 @@
|
|
|
1806
1812
|
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
1807
1813
|
}, {
|
|
1808
1814
|
default: vue.withCtx((scope) => [
|
|
1809
|
-
scope.$index > -1 ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1815
|
+
scope.$index > -1 ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
1810
1816
|
key: 0,
|
|
1811
1817
|
labelWidth: "0",
|
|
1812
1818
|
disabled: _ctx.disabled,
|
|
@@ -1927,7 +1933,7 @@
|
|
|
1927
1933
|
}
|
|
1928
1934
|
});
|
|
1929
1935
|
|
|
1930
|
-
const _sfc_main$
|
|
1936
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
1931
1937
|
...{
|
|
1932
1938
|
name: "MFormTabs"
|
|
1933
1939
|
},
|
|
@@ -2081,7 +2087,7 @@
|
|
|
2081
2087
|
]),
|
|
2082
2088
|
default: vue.withCtx(() => [
|
|
2083
2089
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tabItems(tab), (item) => {
|
|
2084
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2090
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
2085
2091
|
key: item[vue.unref(mForm)?.keyProp || "__key"],
|
|
2086
2092
|
config: item,
|
|
2087
2093
|
disabled: _ctx.disabled,
|
|
@@ -2133,7 +2139,7 @@
|
|
|
2133
2139
|
);
|
|
2134
2140
|
};
|
|
2135
2141
|
|
|
2136
|
-
const _sfc_main$
|
|
2142
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
2137
2143
|
...{
|
|
2138
2144
|
name: "MFormCascader"
|
|
2139
2145
|
},
|
|
@@ -2221,7 +2227,7 @@
|
|
|
2221
2227
|
}
|
|
2222
2228
|
});
|
|
2223
2229
|
|
|
2224
|
-
const _sfc_main$
|
|
2230
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
2225
2231
|
...{
|
|
2226
2232
|
name: "MFormCheckbox"
|
|
2227
2233
|
},
|
|
@@ -2283,7 +2289,7 @@
|
|
|
2283
2289
|
}
|
|
2284
2290
|
});
|
|
2285
2291
|
|
|
2286
|
-
const _sfc_main$
|
|
2292
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
2287
2293
|
...{
|
|
2288
2294
|
name: "MFormCheckGroup"
|
|
2289
2295
|
},
|
|
@@ -2346,7 +2352,7 @@
|
|
|
2346
2352
|
}
|
|
2347
2353
|
});
|
|
2348
2354
|
|
|
2349
|
-
const _sfc_main$
|
|
2355
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
2350
2356
|
...{
|
|
2351
2357
|
name: "MFormColorPicker"
|
|
2352
2358
|
},
|
|
@@ -2380,7 +2386,7 @@
|
|
|
2380
2386
|
}
|
|
2381
2387
|
});
|
|
2382
2388
|
|
|
2383
|
-
const _sfc_main$
|
|
2389
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
2384
2390
|
...{
|
|
2385
2391
|
name: "MFormDate"
|
|
2386
2392
|
},
|
|
@@ -2420,7 +2426,7 @@
|
|
|
2420
2426
|
}
|
|
2421
2427
|
});
|
|
2422
2428
|
|
|
2423
|
-
const _sfc_main$
|
|
2429
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
2424
2430
|
...{
|
|
2425
2431
|
name: "MFormDateRange"
|
|
2426
2432
|
},
|
|
@@ -2522,7 +2528,7 @@
|
|
|
2522
2528
|
}
|
|
2523
2529
|
});
|
|
2524
2530
|
|
|
2525
|
-
const _sfc_main$
|
|
2531
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
2526
2532
|
...{
|
|
2527
2533
|
name: "MFormDateTime"
|
|
2528
2534
|
},
|
|
@@ -2571,8 +2577,8 @@
|
|
|
2571
2577
|
}
|
|
2572
2578
|
});
|
|
2573
2579
|
|
|
2574
|
-
const _hoisted_1$
|
|
2575
|
-
const _sfc_main$
|
|
2580
|
+
const _hoisted_1$7 = { key: 0 };
|
|
2581
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
2576
2582
|
...{
|
|
2577
2583
|
name: "MFormDisplay"
|
|
2578
2584
|
},
|
|
@@ -2584,6 +2590,8 @@
|
|
|
2584
2590
|
values: {},
|
|
2585
2591
|
name: {},
|
|
2586
2592
|
prop: {},
|
|
2593
|
+
disabled: { type: Boolean },
|
|
2594
|
+
size: {},
|
|
2587
2595
|
lastValues: {}
|
|
2588
2596
|
},
|
|
2589
2597
|
setup(__props) {
|
|
@@ -2593,13 +2601,13 @@
|
|
|
2593
2601
|
}
|
|
2594
2602
|
useAddField(props.prop);
|
|
2595
2603
|
return (_ctx, _cache) => {
|
|
2596
|
-
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
2604
|
+
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$7, vue.toDisplayString(_ctx.model[_ctx.name]), 1)) : vue.createCommentVNode("", true);
|
|
2597
2605
|
};
|
|
2598
2606
|
}
|
|
2599
2607
|
});
|
|
2600
2608
|
|
|
2601
|
-
const _hoisted_1$
|
|
2602
|
-
const _sfc_main$
|
|
2609
|
+
const _hoisted_1$6 = { class: "m-fields-dynamic-field" };
|
|
2610
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
2603
2611
|
...{
|
|
2604
2612
|
name: "MFormDynamicField"
|
|
2605
2613
|
},
|
|
@@ -2664,7 +2672,7 @@
|
|
|
2664
2672
|
emit("change", fieldMap.value[key], key);
|
|
2665
2673
|
};
|
|
2666
2674
|
return (_ctx, _cache) => {
|
|
2667
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2675
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
|
|
2668
2676
|
vue.createVNode(vue.unref(design.TMagicForm), { size: "small" }, {
|
|
2669
2677
|
default: vue.withCtx(() => [
|
|
2670
2678
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(Object.keys(fieldMap.value), (key) => {
|
|
@@ -2691,7 +2699,7 @@
|
|
|
2691
2699
|
}
|
|
2692
2700
|
});
|
|
2693
2701
|
|
|
2694
|
-
const _sfc_main$
|
|
2702
|
+
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
2695
2703
|
...{
|
|
2696
2704
|
name: "MFormHidden"
|
|
2697
2705
|
},
|
|
@@ -2703,6 +2711,8 @@
|
|
|
2703
2711
|
values: {},
|
|
2704
2712
|
name: {},
|
|
2705
2713
|
prop: {},
|
|
2714
|
+
disabled: { type: Boolean },
|
|
2715
|
+
size: {},
|
|
2706
2716
|
lastValues: {}
|
|
2707
2717
|
},
|
|
2708
2718
|
setup(__props) {
|
|
@@ -2720,7 +2730,7 @@
|
|
|
2720
2730
|
}
|
|
2721
2731
|
});
|
|
2722
2732
|
|
|
2723
|
-
const _sfc_main$
|
|
2733
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
2724
2734
|
...{
|
|
2725
2735
|
name: "MForm"
|
|
2726
2736
|
},
|
|
@@ -2859,7 +2869,7 @@
|
|
|
2859
2869
|
}, {
|
|
2860
2870
|
default: vue.withCtx(() => [
|
|
2861
2871
|
initialized.value && Array.isArray(_ctx.config) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.config, (item, index) => {
|
|
2862
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2872
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
2863
2873
|
disabled: _ctx.disabled,
|
|
2864
2874
|
key: item[_ctx.keyProp] ?? index,
|
|
2865
2875
|
config: item,
|
|
@@ -2879,8 +2889,8 @@
|
|
|
2879
2889
|
}
|
|
2880
2890
|
});
|
|
2881
2891
|
|
|
2882
|
-
const _hoisted_1$
|
|
2883
|
-
const _sfc_main$
|
|
2892
|
+
const _hoisted_1$5 = { style: { "min-height": "1px" } };
|
|
2893
|
+
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
2884
2894
|
...{
|
|
2885
2895
|
name: "MFormDialog"
|
|
2886
2896
|
},
|
|
@@ -2985,7 +2995,7 @@
|
|
|
2985
2995
|
style: { "text-align": "left" }
|
|
2986
2996
|
}, {
|
|
2987
2997
|
default: vue.withCtx(() => [
|
|
2988
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
2998
|
+
vue.createElementVNode("div", _hoisted_1$5, [
|
|
2989
2999
|
vue.renderSlot(_ctx.$slots, "left")
|
|
2990
3000
|
])
|
|
2991
3001
|
]),
|
|
@@ -3028,6 +3038,7 @@
|
|
|
3028
3038
|
key: 2,
|
|
3029
3039
|
type: "primary",
|
|
3030
3040
|
size: "small",
|
|
3041
|
+
disabled: _ctx.disabled,
|
|
3031
3042
|
loading: saveFetch.value,
|
|
3032
3043
|
onClick: save
|
|
3033
3044
|
}, {
|
|
@@ -3035,7 +3046,7 @@
|
|
|
3035
3046
|
vue.createTextVNode(vue.toDisplayString(_ctx.confirmText), 1)
|
|
3036
3047
|
]),
|
|
3037
3048
|
_: 1
|
|
3038
|
-
}, 8, ["loading"]))
|
|
3049
|
+
}, 8, ["disabled", "loading"]))
|
|
3039
3050
|
])
|
|
3040
3051
|
]),
|
|
3041
3052
|
_: 3
|
|
@@ -3050,7 +3061,7 @@
|
|
|
3050
3061
|
class: "m-dialog-body",
|
|
3051
3062
|
style: vue.normalizeStyle(`max-height: ${bodyHeight.value}; overflow-y: auto; overflow-x: hidden;`)
|
|
3052
3063
|
}, [
|
|
3053
|
-
vue.createVNode(_sfc_main$
|
|
3064
|
+
vue.createVNode(_sfc_main$d, {
|
|
3054
3065
|
modelValue: stepActive.value,
|
|
3055
3066
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
|
|
3056
3067
|
ref_key: "form",
|
|
@@ -3072,12 +3083,12 @@
|
|
|
3072
3083
|
}
|
|
3073
3084
|
});
|
|
3074
3085
|
|
|
3075
|
-
const _hoisted_1$
|
|
3076
|
-
const _hoisted_2 = {
|
|
3086
|
+
const _hoisted_1$4 = ["href"];
|
|
3087
|
+
const _hoisted_2$1 = {
|
|
3077
3088
|
key: 2,
|
|
3078
3089
|
class: "m-fields-link"
|
|
3079
3090
|
};
|
|
3080
|
-
const _sfc_main$
|
|
3091
|
+
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
3081
3092
|
...{
|
|
3082
3093
|
name: "MFormLink"
|
|
3083
3094
|
},
|
|
@@ -3145,10 +3156,10 @@
|
|
|
3145
3156
|
target: "_blank",
|
|
3146
3157
|
href: href.value,
|
|
3147
3158
|
style: vue.normalizeStyle(_ctx.config.css || {})
|
|
3148
|
-
}, vue.toDisplayString(displayText.value), 13, _hoisted_1$
|
|
3159
|
+
}, vue.toDisplayString(displayText.value), 13, _hoisted_1$4)) : _ctx.config.href && _ctx.disabled ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
3149
3160
|
key: 1,
|
|
3150
3161
|
style: vue.normalizeStyle(_ctx.config.disabledCss || {})
|
|
3151
|
-
}, vue.toDisplayString(displayText.value), 5)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
3162
|
+
}, vue.toDisplayString(displayText.value), 5)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [
|
|
3152
3163
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
3153
3164
|
text: true,
|
|
3154
3165
|
type: "primary",
|
|
@@ -3159,7 +3170,7 @@
|
|
|
3159
3170
|
]),
|
|
3160
3171
|
_: 1
|
|
3161
3172
|
}),
|
|
3162
|
-
vue.createVNode(_sfc_main$
|
|
3173
|
+
vue.createVNode(_sfc_main$c, {
|
|
3163
3174
|
ref_key: "editor",
|
|
3164
3175
|
ref: editor,
|
|
3165
3176
|
title: _ctx.config.formTitle || "编辑扩展配置",
|
|
@@ -3175,7 +3186,7 @@
|
|
|
3175
3186
|
}
|
|
3176
3187
|
});
|
|
3177
3188
|
|
|
3178
|
-
const _sfc_main$
|
|
3189
|
+
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
3179
3190
|
...{
|
|
3180
3191
|
name: "MFormNumber"
|
|
3181
3192
|
},
|
|
@@ -3223,6 +3234,61 @@
|
|
|
3223
3234
|
}
|
|
3224
3235
|
});
|
|
3225
3236
|
|
|
3237
|
+
const _hoisted_1$3 = { class: "m-fields-number-range" };
|
|
3238
|
+
const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("span", { class: "split-tag" }, "-", -1);
|
|
3239
|
+
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
3240
|
+
...{
|
|
3241
|
+
name: "MFormNumberRange"
|
|
3242
|
+
},
|
|
3243
|
+
__name: "NumberRange",
|
|
3244
|
+
props: {
|
|
3245
|
+
config: {},
|
|
3246
|
+
model: {},
|
|
3247
|
+
initValues: {},
|
|
3248
|
+
values: {},
|
|
3249
|
+
name: {},
|
|
3250
|
+
prop: {},
|
|
3251
|
+
disabled: { type: Boolean },
|
|
3252
|
+
size: {},
|
|
3253
|
+
lastValues: {}
|
|
3254
|
+
},
|
|
3255
|
+
emits: ["change"],
|
|
3256
|
+
setup(__props, { emit }) {
|
|
3257
|
+
const props = __props;
|
|
3258
|
+
useAddField(props.prop);
|
|
3259
|
+
if (!Array.isArray(props.model[props.name])) {
|
|
3260
|
+
props.model[props.name] = [];
|
|
3261
|
+
}
|
|
3262
|
+
const minChangeHandler = (v) => {
|
|
3263
|
+
emit("change", [Number(v), props.model[props.name][1]]);
|
|
3264
|
+
};
|
|
3265
|
+
const maxChangeHandler = (v) => {
|
|
3266
|
+
emit("change", [props.model[props.name][0], Number(v)]);
|
|
3267
|
+
};
|
|
3268
|
+
return (_ctx, _cache) => {
|
|
3269
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
3270
|
+
vue.createVNode(vue.unref(design.TMagicInput), {
|
|
3271
|
+
modelValue: _ctx.model[_ctx.name][0],
|
|
3272
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name][0] = $event),
|
|
3273
|
+
clearable: "",
|
|
3274
|
+
size: _ctx.size,
|
|
3275
|
+
disabled: _ctx.disabled,
|
|
3276
|
+
onChange: minChangeHandler
|
|
3277
|
+
}, null, 8, ["modelValue", "size", "disabled"]),
|
|
3278
|
+
_hoisted_2,
|
|
3279
|
+
vue.createVNode(vue.unref(design.TMagicInput), {
|
|
3280
|
+
modelValue: _ctx.model[_ctx.name][1],
|
|
3281
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model[_ctx.name][1] = $event),
|
|
3282
|
+
clearable: "",
|
|
3283
|
+
size: _ctx.size,
|
|
3284
|
+
disabled: _ctx.disabled,
|
|
3285
|
+
onChange: maxChangeHandler
|
|
3286
|
+
}, null, 8, ["modelValue", "size", "disabled"])
|
|
3287
|
+
]);
|
|
3288
|
+
};
|
|
3289
|
+
}
|
|
3290
|
+
});
|
|
3291
|
+
|
|
3226
3292
|
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
3227
3293
|
...{
|
|
3228
3294
|
name: "MFormRadioGroup"
|
|
@@ -3971,6 +4037,7 @@
|
|
|
3971
4037
|
width: {},
|
|
3972
4038
|
labelWidth: {},
|
|
3973
4039
|
disabled: { type: Boolean },
|
|
4040
|
+
closeOnPressEscape: { type: Boolean, default: true },
|
|
3974
4041
|
title: {},
|
|
3975
4042
|
zIndex: {},
|
|
3976
4043
|
size: {},
|
|
@@ -4024,7 +4091,7 @@
|
|
|
4024
4091
|
modelValue: visible.value,
|
|
4025
4092
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
4026
4093
|
title: _ctx.title,
|
|
4027
|
-
"close-on-press-escape":
|
|
4094
|
+
"close-on-press-escape": _ctx.closeOnPressEscape,
|
|
4028
4095
|
"append-to-body": true,
|
|
4029
4096
|
"show-close": true,
|
|
4030
4097
|
"close-on-click-modal": true,
|
|
@@ -4058,14 +4125,15 @@
|
|
|
4058
4125
|
}),
|
|
4059
4126
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
4060
4127
|
type: "primary",
|
|
4061
|
-
|
|
4062
|
-
loading: saveFetch.value
|
|
4128
|
+
disabled: _ctx.disabled,
|
|
4129
|
+
loading: saveFetch.value,
|
|
4130
|
+
onClick: submitHandler
|
|
4063
4131
|
}, {
|
|
4064
4132
|
default: vue.withCtx(() => [
|
|
4065
4133
|
vue.createTextVNode(vue.toDisplayString(_ctx.confirmText), 1)
|
|
4066
4134
|
]),
|
|
4067
4135
|
_: 1
|
|
4068
|
-
}, 8, ["loading"])
|
|
4136
|
+
}, 8, ["disabled", "loading"])
|
|
4069
4137
|
])
|
|
4070
4138
|
]),
|
|
4071
4139
|
_: 3
|
|
@@ -4081,7 +4149,7 @@
|
|
|
4081
4149
|
ref: drawerBody,
|
|
4082
4150
|
class: "m-drawer-body"
|
|
4083
4151
|
}, [
|
|
4084
|
-
vue.createVNode(_sfc_main$
|
|
4152
|
+
vue.createVNode(_sfc_main$d, {
|
|
4085
4153
|
ref_key: "form",
|
|
4086
4154
|
ref: form,
|
|
4087
4155
|
size: _ctx.size,
|
|
@@ -4096,7 +4164,7 @@
|
|
|
4096
4164
|
], 512)) : vue.createCommentVNode("", true)
|
|
4097
4165
|
]),
|
|
4098
4166
|
_: 3
|
|
4099
|
-
}, 8, ["modelValue", "title", "size", "zIndex"]);
|
|
4167
|
+
}, 8, ["modelValue", "title", "close-on-press-escape", "size", "zIndex"]);
|
|
4100
4168
|
};
|
|
4101
4169
|
}
|
|
4102
4170
|
});
|
|
@@ -4107,62 +4175,64 @@
|
|
|
4107
4175
|
const option = Object.assign(defaultInstallOpt, opt);
|
|
4108
4176
|
app.config.globalProperties.$MAGIC_FORM = option;
|
|
4109
4177
|
setConfig(option);
|
|
4110
|
-
app.component("m-form", _sfc_main$
|
|
4111
|
-
app.component("m-form-dialog", _sfc_main$
|
|
4112
|
-
app.component("m-form-container", _sfc_main$
|
|
4113
|
-
app.component("m-form-fieldset", _sfc_main$
|
|
4114
|
-
app.component("m-form-group-list", _sfc_main$
|
|
4115
|
-
app.component("m-form-panel", _sfc_main$
|
|
4116
|
-
app.component("m-form-row", _sfc_main$
|
|
4117
|
-
app.component("m-form-step", _sfc_main$
|
|
4118
|
-
app.component("m-form-table", _sfc_main$
|
|
4119
|
-
app.component("m-form-tab", _sfc_main$
|
|
4178
|
+
app.component("m-form", _sfc_main$d);
|
|
4179
|
+
app.component("m-form-dialog", _sfc_main$c);
|
|
4180
|
+
app.component("m-form-container", _sfc_main$x);
|
|
4181
|
+
app.component("m-form-fieldset", _sfc_main$w);
|
|
4182
|
+
app.component("m-form-group-list", _sfc_main$u);
|
|
4183
|
+
app.component("m-form-panel", _sfc_main$t);
|
|
4184
|
+
app.component("m-form-row", _sfc_main$r);
|
|
4185
|
+
app.component("m-form-step", _sfc_main$q);
|
|
4186
|
+
app.component("m-form-table", _sfc_main$p);
|
|
4187
|
+
app.component("m-form-tab", _sfc_main$o);
|
|
4120
4188
|
app.component("m-fields-text", _sfc_main$3);
|
|
4121
|
-
app.component("m-fields-number", _sfc_main$
|
|
4189
|
+
app.component("m-fields-number", _sfc_main$a);
|
|
4190
|
+
app.component("m-fields-number-range", _sfc_main$9);
|
|
4122
4191
|
app.component("m-fields-textarea", _sfc_main$2);
|
|
4123
|
-
app.component("m-fields-hidden", _sfc_main$
|
|
4124
|
-
app.component("m-fields-date", _sfc_main$
|
|
4125
|
-
app.component("m-fields-datetime", _sfc_main$
|
|
4126
|
-
app.component("m-fields-daterange", _sfc_main$
|
|
4192
|
+
app.component("m-fields-hidden", _sfc_main$e);
|
|
4193
|
+
app.component("m-fields-date", _sfc_main$j);
|
|
4194
|
+
app.component("m-fields-datetime", _sfc_main$h);
|
|
4195
|
+
app.component("m-fields-daterange", _sfc_main$i);
|
|
4127
4196
|
app.component("m-fields-time", _sfc_main$1);
|
|
4128
|
-
app.component("m-fields-checkbox", _sfc_main$
|
|
4197
|
+
app.component("m-fields-checkbox", _sfc_main$m);
|
|
4129
4198
|
app.component("m-fields-switch", _sfc_main$4);
|
|
4130
|
-
app.component("m-fields-color-picker", _sfc_main$
|
|
4131
|
-
app.component("m-fields-checkbox-group", _sfc_main$
|
|
4199
|
+
app.component("m-fields-color-picker", _sfc_main$k);
|
|
4200
|
+
app.component("m-fields-checkbox-group", _sfc_main$l);
|
|
4132
4201
|
app.component("m-fields-radio-group", _sfc_main$8);
|
|
4133
|
-
app.component("m-fields-display", _sfc_main$
|
|
4134
|
-
app.component("m-fields-link", _sfc_main$
|
|
4202
|
+
app.component("m-fields-display", _sfc_main$g);
|
|
4203
|
+
app.component("m-fields-link", _sfc_main$b);
|
|
4135
4204
|
app.component("m-fields-select", _sfc_main$5);
|
|
4136
|
-
app.component("m-fields-cascader", _sfc_main$
|
|
4137
|
-
app.component("m-fields-dynamic-field", _sfc_main$
|
|
4205
|
+
app.component("m-fields-cascader", _sfc_main$n);
|
|
4206
|
+
app.component("m-fields-dynamic-field", _sfc_main$f);
|
|
4138
4207
|
}
|
|
4139
4208
|
};
|
|
4140
4209
|
|
|
4141
|
-
exports.MCascader = _sfc_main$
|
|
4142
|
-
exports.MCheckbox = _sfc_main$
|
|
4143
|
-
exports.MCheckboxGroup = _sfc_main$
|
|
4144
|
-
exports.MColorPicker = _sfc_main$
|
|
4145
|
-
exports.MContainer = _sfc_main$
|
|
4146
|
-
exports.MDate = _sfc_main$
|
|
4147
|
-
exports.MDateTime = _sfc_main$
|
|
4148
|
-
exports.MDaterange = _sfc_main$
|
|
4149
|
-
exports.MDisplay = _sfc_main$
|
|
4150
|
-
exports.MDynamicField = _sfc_main$
|
|
4151
|
-
exports.MFieldset = _sfc_main$
|
|
4152
|
-
exports.MForm = _sfc_main$
|
|
4153
|
-
exports.MFormDialog = _sfc_main$
|
|
4210
|
+
exports.MCascader = _sfc_main$n;
|
|
4211
|
+
exports.MCheckbox = _sfc_main$m;
|
|
4212
|
+
exports.MCheckboxGroup = _sfc_main$l;
|
|
4213
|
+
exports.MColorPicker = _sfc_main$k;
|
|
4214
|
+
exports.MContainer = _sfc_main$x;
|
|
4215
|
+
exports.MDate = _sfc_main$j;
|
|
4216
|
+
exports.MDateTime = _sfc_main$h;
|
|
4217
|
+
exports.MDaterange = _sfc_main$i;
|
|
4218
|
+
exports.MDisplay = _sfc_main$g;
|
|
4219
|
+
exports.MDynamicField = _sfc_main$f;
|
|
4220
|
+
exports.MFieldset = _sfc_main$w;
|
|
4221
|
+
exports.MForm = _sfc_main$d;
|
|
4222
|
+
exports.MFormDialog = _sfc_main$c;
|
|
4154
4223
|
exports.MFormDrawer = _sfc_main;
|
|
4155
|
-
exports.MGroupList = _sfc_main$
|
|
4156
|
-
exports.MHidden = _sfc_main$
|
|
4157
|
-
exports.MLink = _sfc_main$
|
|
4158
|
-
exports.MNumber = _sfc_main$
|
|
4159
|
-
exports.
|
|
4224
|
+
exports.MGroupList = _sfc_main$u;
|
|
4225
|
+
exports.MHidden = _sfc_main$e;
|
|
4226
|
+
exports.MLink = _sfc_main$b;
|
|
4227
|
+
exports.MNumber = _sfc_main$a;
|
|
4228
|
+
exports.MNumberRange = _sfc_main$9;
|
|
4229
|
+
exports.MPanel = _sfc_main$t;
|
|
4160
4230
|
exports.MRadioGroup = _sfc_main$8;
|
|
4161
|
-
exports.MRow = _sfc_main$
|
|
4231
|
+
exports.MRow = _sfc_main$r;
|
|
4162
4232
|
exports.MSelect = _sfc_main$5;
|
|
4163
4233
|
exports.MSwitch = _sfc_main$4;
|
|
4164
|
-
exports.MTable = _sfc_main$
|
|
4165
|
-
exports.MTabs = _sfc_main$
|
|
4234
|
+
exports.MTable = _sfc_main$p;
|
|
4235
|
+
exports.MTabs = _sfc_main$o;
|
|
4166
4236
|
exports.MText = _sfc_main$3;
|
|
4167
4237
|
exports.MTextarea = _sfc_main$2;
|
|
4168
4238
|
exports.MTime = _sfc_main$1;
|