@tmagic/form 1.3.0-alpha.16 → 1.3.0-alpha.18
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 +177 -110
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +198 -130
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/FormDrawer.vue +3 -1
- 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.js
CHANGED
|
@@ -92,7 +92,7 @@ const getDefaultValue = function(mForm, { defaultValue, type, filter, multiple }
|
|
|
92
92
|
if (["switch", "checkbox"].includes(type)) {
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
|
-
if (multiple) {
|
|
95
|
+
if (multiple || type === "number-range") {
|
|
96
96
|
return [];
|
|
97
97
|
}
|
|
98
98
|
return "";
|
|
@@ -107,7 +107,8 @@ const filterFunction = (mForm, config, props) => {
|
|
|
107
107
|
parent: mForm?.parentValues || {},
|
|
108
108
|
formValue: mForm?.values || props.model,
|
|
109
109
|
prop: props.prop,
|
|
110
|
-
config: props.config
|
|
110
|
+
config: props.config,
|
|
111
|
+
index: props.index
|
|
111
112
|
});
|
|
112
113
|
};
|
|
113
114
|
const display = function(mForm, config, props) {
|
|
@@ -166,8 +167,8 @@ const initValue = async (mForm, { initValues, config }) => {
|
|
|
166
167
|
return valuesTmp || {};
|
|
167
168
|
};
|
|
168
169
|
|
|
169
|
-
const _hoisted_1$
|
|
170
|
-
const _hoisted_2$
|
|
170
|
+
const _hoisted_1$d = ["innerHTML"];
|
|
171
|
+
const _hoisted_2$7 = ["innerHTML"];
|
|
171
172
|
const _hoisted_3$4 = ["innerHTML"];
|
|
172
173
|
const _hoisted_4$4 = ["innerHTML"];
|
|
173
174
|
const _hoisted_5$3 = ["innerHTML"];
|
|
@@ -182,7 +183,7 @@ const _hoisted_13 = {
|
|
|
182
183
|
key: 5,
|
|
183
184
|
style: { "text-align": "center" }
|
|
184
185
|
};
|
|
185
|
-
const _sfc_main$
|
|
186
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
186
187
|
...{
|
|
187
188
|
name: "MFormContainer"
|
|
188
189
|
},
|
|
@@ -232,6 +233,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
232
233
|
return "m-fields-text";
|
|
233
234
|
});
|
|
234
235
|
const disabled = computed(() => props.disabled || filterFunction(mForm, props.config.disabled, props));
|
|
236
|
+
const text = computed(() => filterFunction(mForm, props.config.text, props));
|
|
235
237
|
const tooltip = computed(() => filterFunction(mForm, props.config.tooltip, props));
|
|
236
238
|
const extra = computed(() => filterFunction(mForm, props.config.extra, props));
|
|
237
239
|
const rule = computed(() => getRules(mForm, props.config.rules, props));
|
|
@@ -262,7 +264,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
262
264
|
(showDiff2) => {
|
|
263
265
|
if (type.value === "hidden")
|
|
264
266
|
return;
|
|
265
|
-
if (items.value && !
|
|
267
|
+
if (items.value && !text.value && type.value && display$1.value)
|
|
266
268
|
return;
|
|
267
269
|
if (display$1.value && showDiff2 && type.value) {
|
|
268
270
|
emit("addDiffCount");
|
|
@@ -339,7 +341,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
339
341
|
name: _ctx.config.name,
|
|
340
342
|
disabled: disabled.value,
|
|
341
343
|
prop: itemProp.value
|
|
342
|
-
}, null, 8, ["model", "config", "name", "disabled", "prop"])) : items.value && !
|
|
344
|
+
}, null, 8, ["model", "config", "name", "disabled", "prop"])) : items.value && !text.value && type.value && display$1.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
343
345
|
key: key(_ctx.config),
|
|
344
346
|
size: _ctx.size,
|
|
345
347
|
model: _ctx.model,
|
|
@@ -357,20 +359,20 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
357
359
|
}, 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 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
358
360
|
createVNode(unref(TMagicFormItem), {
|
|
359
361
|
style: normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
|
|
360
|
-
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !
|
|
362
|
+
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
361
363
|
prop: itemProp.value,
|
|
362
364
|
"label-width": itemLabelWidth.value,
|
|
363
365
|
rules: rule.value
|
|
364
366
|
}, {
|
|
365
367
|
label: withCtx(() => [
|
|
366
368
|
createElementVNode("span", {
|
|
367
|
-
innerHTML: type.value === "checkbox" ? "" :
|
|
368
|
-
}, null, 8, _hoisted_1$
|
|
369
|
+
innerHTML: type.value === "checkbox" ? "" : text.value
|
|
370
|
+
}, null, 8, _hoisted_1$d)
|
|
369
371
|
]),
|
|
370
372
|
default: withCtx(() => [
|
|
371
373
|
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
372
374
|
content: withCtx(() => [
|
|
373
|
-
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_2$
|
|
375
|
+
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_2$7)
|
|
374
376
|
]),
|
|
375
377
|
default: withCtx(() => [
|
|
376
378
|
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
@@ -429,14 +431,14 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
429
431
|
], 64)) : type.value && display$1.value && showDiff.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
430
432
|
createVNode(unref(TMagicFormItem), {
|
|
431
433
|
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
|
|
432
|
-
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !
|
|
434
|
+
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
433
435
|
prop: itemProp.value,
|
|
434
436
|
"label-width": itemLabelWidth.value,
|
|
435
437
|
rules: rule.value
|
|
436
438
|
}, {
|
|
437
439
|
label: withCtx(() => [
|
|
438
440
|
createElementVNode("span", {
|
|
439
|
-
innerHTML: type.value === "checkbox" ? "" :
|
|
441
|
+
innerHTML: type.value === "checkbox" ? "" : text.value
|
|
440
442
|
}, null, 8, _hoisted_5$3)
|
|
441
443
|
]),
|
|
442
444
|
default: withCtx(() => [
|
|
@@ -496,14 +498,14 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
496
498
|
})) : createCommentVNode("", true),
|
|
497
499
|
createVNode(unref(TMagicFormItem), {
|
|
498
500
|
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
|
|
499
|
-
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !
|
|
501
|
+
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
500
502
|
prop: itemProp.value,
|
|
501
503
|
"label-width": itemLabelWidth.value,
|
|
502
504
|
rules: rule.value
|
|
503
505
|
}, {
|
|
504
506
|
label: withCtx(() => [
|
|
505
507
|
createElementVNode("span", {
|
|
506
|
-
innerHTML: type.value === "checkbox" ? "" :
|
|
508
|
+
innerHTML: type.value === "checkbox" ? "" : text.value
|
|
507
509
|
}, null, 8, _hoisted_9)
|
|
508
510
|
]),
|
|
509
511
|
default: withCtx(() => [
|
|
@@ -599,8 +601,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
599
601
|
}
|
|
600
602
|
});
|
|
601
603
|
|
|
602
|
-
const _hoisted_1$
|
|
603
|
-
const _hoisted_2$
|
|
604
|
+
const _hoisted_1$c = ["innerHTML"];
|
|
605
|
+
const _hoisted_2$6 = ["innerHTML"];
|
|
604
606
|
const _hoisted_3$3 = { key: 1 };
|
|
605
607
|
const _hoisted_4$3 = ["innerHTML"];
|
|
606
608
|
const _hoisted_5$2 = ["innerHTML"];
|
|
@@ -610,7 +612,7 @@ const _hoisted_6 = {
|
|
|
610
612
|
};
|
|
611
613
|
const _hoisted_7 = { style: { "flex": "1" } };
|
|
612
614
|
const _hoisted_8 = ["src"];
|
|
613
|
-
const _sfc_main$
|
|
615
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
614
616
|
...{
|
|
615
617
|
name: "MFormFieldset"
|
|
616
618
|
},
|
|
@@ -669,12 +671,12 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
669
671
|
default: withCtx(() => [
|
|
670
672
|
createElementVNode("span", {
|
|
671
673
|
innerHTML: _ctx.config.legend
|
|
672
|
-
}, null, 8, _hoisted_1$
|
|
674
|
+
}, null, 8, _hoisted_1$c),
|
|
673
675
|
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
674
676
|
key: 0,
|
|
675
677
|
innerHTML: _ctx.config.extra,
|
|
676
678
|
class: "m-form-tip"
|
|
677
|
-
}, null, 8, _hoisted_2$
|
|
679
|
+
}, null, 8, _hoisted_2$6)) : createCommentVNode("", true)
|
|
678
680
|
]),
|
|
679
681
|
_: 1
|
|
680
682
|
}, 8, ["modelValue", "prop"])
|
|
@@ -693,7 +695,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
693
695
|
_ctx.config.schematic && show.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
694
696
|
createElementVNode("div", _hoisted_7, [
|
|
695
697
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
|
|
696
|
-
return openBlock(), createBlock(_sfc_main$
|
|
698
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
697
699
|
key: key(item, index),
|
|
698
700
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
699
701
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -714,7 +716,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
714
716
|
src: _ctx.config.schematic
|
|
715
717
|
}, null, 8, _hoisted_8)
|
|
716
718
|
])) : show.value ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(_ctx.config.items, (item, index) => {
|
|
717
|
-
return openBlock(), createBlock(_sfc_main$
|
|
719
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
718
720
|
key: key(item, index),
|
|
719
721
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
720
722
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -734,9 +736,9 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
734
736
|
}
|
|
735
737
|
});
|
|
736
738
|
|
|
737
|
-
const _hoisted_1$
|
|
738
|
-
const _hoisted_2$
|
|
739
|
-
const _sfc_main$
|
|
739
|
+
const _hoisted_1$b = { class: "m-fields-group-list-item" };
|
|
740
|
+
const _hoisted_2$5 = ["innerHTML"];
|
|
741
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
740
742
|
...{
|
|
741
743
|
name: "MFormGroupListItem"
|
|
742
744
|
},
|
|
@@ -769,7 +771,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
769
771
|
if (props.config.titleKey && props.model[props.config.titleKey]) {
|
|
770
772
|
return props.model[props.config.titleKey];
|
|
771
773
|
}
|
|
772
|
-
|
|
774
|
+
if (props.config.title) {
|
|
775
|
+
return filterFunction(mForm, props.config.title, props);
|
|
776
|
+
}
|
|
777
|
+
const titlePrefix = props.config.titlePrefix || "组";
|
|
778
|
+
return `${titlePrefix} ${String(props.index + 1)}`;
|
|
773
779
|
});
|
|
774
780
|
const length = computed(() => props.groupModel?.length || 0);
|
|
775
781
|
const itemExtra = computed(() => filterFunction(mForm, props.config.itemExtra, props));
|
|
@@ -785,7 +791,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
785
791
|
}
|
|
786
792
|
return true;
|
|
787
793
|
};
|
|
788
|
-
const changeOrder = (offset = 0) => emit("swap-item", props.index,
|
|
794
|
+
const changeOrder = (offset = 0) => emit("swap-item", props.index, props.index + offset);
|
|
789
795
|
const movable = () => {
|
|
790
796
|
const { movable: movable2 } = props.config;
|
|
791
797
|
if (movable2 === void 0)
|
|
@@ -797,7 +803,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
797
803
|
};
|
|
798
804
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
799
805
|
return (_ctx, _cache) => {
|
|
800
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
806
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
801
807
|
createElementVNode("div", null, [
|
|
802
808
|
createVNode(unref(TMagicButton), {
|
|
803
809
|
text: "",
|
|
@@ -863,9 +869,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
863
869
|
key: 1,
|
|
864
870
|
innerHTML: itemExtra.value,
|
|
865
871
|
class: "m-form-tip"
|
|
866
|
-
}, null, 8, _hoisted_2$
|
|
872
|
+
}, null, 8, _hoisted_2$5)) : createCommentVNode("", true)
|
|
867
873
|
]),
|
|
868
|
-
expand.value ? (openBlock(), createBlock(_sfc_main$
|
|
874
|
+
expand.value ? (openBlock(), createBlock(_sfc_main$x, {
|
|
869
875
|
key: 0,
|
|
870
876
|
config: rowConfig.value,
|
|
871
877
|
model: _ctx.model,
|
|
@@ -883,8 +889,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
883
889
|
}
|
|
884
890
|
});
|
|
885
891
|
|
|
886
|
-
const _hoisted_1$
|
|
887
|
-
const _hoisted_2$
|
|
892
|
+
const _hoisted_1$a = { class: "m-fields-group-list" };
|
|
893
|
+
const _hoisted_2$4 = ["innerHTML"];
|
|
888
894
|
const _hoisted_3$2 = {
|
|
889
895
|
key: 1,
|
|
890
896
|
class: "el-table__empty-block"
|
|
@@ -893,7 +899,7 @@ const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("span", { class: "el-tab
|
|
|
893
899
|
const _hoisted_5$1 = [
|
|
894
900
|
_hoisted_4$2
|
|
895
901
|
];
|
|
896
|
-
const _sfc_main$
|
|
902
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
897
903
|
...{
|
|
898
904
|
name: "MFormGroupList"
|
|
899
905
|
},
|
|
@@ -976,14 +982,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
976
982
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
977
983
|
const getLastValues = (item, index) => item?.[index] || {};
|
|
978
984
|
return (_ctx, _cache) => {
|
|
979
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
985
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
980
986
|
_ctx.config.extra ? (openBlock(), createElementBlock("div", {
|
|
981
987
|
key: 0,
|
|
982
988
|
innerHTML: _ctx.config.extra,
|
|
983
989
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
984
|
-
}, null, 8, _hoisted_2$
|
|
990
|
+
}, null, 8, _hoisted_2$4)) : createCommentVNode("", true),
|
|
985
991
|
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (openBlock(), createElementBlock("div", _hoisted_3$2, _hoisted_5$1)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(_ctx.model[_ctx.name], (item, index) => {
|
|
986
|
-
return openBlock(), createBlock(_sfc_main$
|
|
992
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
987
993
|
key: index,
|
|
988
994
|
model: item,
|
|
989
995
|
lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
|
|
@@ -1028,15 +1034,15 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1028
1034
|
}
|
|
1029
1035
|
});
|
|
1030
1036
|
|
|
1031
|
-
const _hoisted_1$
|
|
1032
|
-
const _hoisted_2$
|
|
1037
|
+
const _hoisted_1$9 = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
|
|
1038
|
+
const _hoisted_2$3 = ["innerHTML"];
|
|
1033
1039
|
const _hoisted_3$1 = {
|
|
1034
1040
|
key: 0,
|
|
1035
1041
|
style: { "display": "flex" }
|
|
1036
1042
|
};
|
|
1037
1043
|
const _hoisted_4$1 = { style: { "flex": "1" } };
|
|
1038
1044
|
const _hoisted_5 = ["src"];
|
|
1039
|
-
const _sfc_main$
|
|
1045
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
1040
1046
|
...{
|
|
1041
1047
|
name: "MFormPanel"
|
|
1042
1048
|
},
|
|
@@ -1068,7 +1074,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1068
1074
|
"body-style": { display: expand.value ? "block" : "none" }
|
|
1069
1075
|
}, {
|
|
1070
1076
|
header: withCtx(() => [
|
|
1071
|
-
createElementVNode("div", _hoisted_1$
|
|
1077
|
+
createElementVNode("div", _hoisted_1$9, [
|
|
1072
1078
|
createVNode(unref(TMagicButton), {
|
|
1073
1079
|
style: { "padding": "0" },
|
|
1074
1080
|
text: "",
|
|
@@ -1079,7 +1085,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1079
1085
|
key: 0,
|
|
1080
1086
|
innerHTML: _ctx.config.extra,
|
|
1081
1087
|
class: "m-form-tip"
|
|
1082
|
-
}, null, 8, _hoisted_2$
|
|
1088
|
+
}, null, 8, _hoisted_2$3)) : createCommentVNode("", true),
|
|
1083
1089
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1084
1090
|
createTextVNode(toDisplayString(filter(_ctx.config.title)), 1)
|
|
1085
1091
|
])
|
|
@@ -1091,7 +1097,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1091
1097
|
_ctx.config.schematic ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1092
1098
|
createElementVNode("div", _hoisted_4$1, [
|
|
1093
1099
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
1094
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1100
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
1095
1101
|
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1096
1102
|
config: item,
|
|
1097
1103
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1111,7 +1117,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1111
1117
|
src: _ctx.config.schematic
|
|
1112
1118
|
}, null, 8, _hoisted_5)
|
|
1113
1119
|
])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(items.value, (item, index) => {
|
|
1114
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1120
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
1115
1121
|
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1116
1122
|
config: item,
|
|
1117
1123
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1133,7 +1139,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1133
1139
|
}
|
|
1134
1140
|
});
|
|
1135
1141
|
|
|
1136
|
-
const _sfc_main$
|
|
1142
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
1137
1143
|
...{
|
|
1138
1144
|
name: "MFormCol"
|
|
1139
1145
|
},
|
|
@@ -1160,7 +1166,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1160
1166
|
return (_ctx, _cache) => {
|
|
1161
1167
|
return withDirectives((openBlock(), createBlock(unref(TMagicCol), { span: _ctx.span }, {
|
|
1162
1168
|
default: withCtx(() => [
|
|
1163
|
-
createVNode(_sfc_main$
|
|
1169
|
+
createVNode(_sfc_main$x, {
|
|
1164
1170
|
model: _ctx.model,
|
|
1165
1171
|
lastValues: _ctx.lastValues,
|
|
1166
1172
|
"is-compare": _ctx.isCompare,
|
|
@@ -1182,7 +1188,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1182
1188
|
}
|
|
1183
1189
|
});
|
|
1184
1190
|
|
|
1185
|
-
const _sfc_main$
|
|
1191
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
1186
1192
|
...{
|
|
1187
1193
|
name: "MFormRow"
|
|
1188
1194
|
},
|
|
@@ -1209,7 +1215,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1209
1215
|
return openBlock(), createBlock(unref(TMagicRow), { gutter: 10 }, {
|
|
1210
1216
|
default: withCtx(() => [
|
|
1211
1217
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (col, index) => {
|
|
1212
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1218
|
+
return openBlock(), createBlock(_sfc_main$s, {
|
|
1213
1219
|
key: col[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1214
1220
|
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1215
1221
|
config: col,
|
|
@@ -1232,7 +1238,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1232
1238
|
}
|
|
1233
1239
|
});
|
|
1234
1240
|
|
|
1235
|
-
const _sfc_main$
|
|
1241
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
1236
1242
|
...{
|
|
1237
1243
|
name: "MFormStep"
|
|
1238
1244
|
},
|
|
@@ -1286,7 +1292,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1286
1292
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1287
1293
|
(openBlock(true), createElementBlock(Fragment, null, renderList(step.items, (item) => {
|
|
1288
1294
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1289
|
-
item ? withDirectives((openBlock(), createBlock(_sfc_main$
|
|
1295
|
+
item ? withDirectives((openBlock(), createBlock(_sfc_main$x, {
|
|
1290
1296
|
key: item[unref(mForm)?.keyProp || "__key"],
|
|
1291
1297
|
config: item,
|
|
1292
1298
|
model: step.name ? _ctx.model[step.name] : _ctx.model,
|
|
@@ -1310,15 +1316,15 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1310
1316
|
}
|
|
1311
1317
|
});
|
|
1312
1318
|
|
|
1313
|
-
const _hoisted_1$
|
|
1314
|
-
const _hoisted_2$
|
|
1319
|
+
const _hoisted_1$8 = ["innerHTML"];
|
|
1320
|
+
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1315
1321
|
const _hoisted_3 = ["innerHTML"];
|
|
1316
1322
|
const _hoisted_4 = {
|
|
1317
1323
|
key: 1,
|
|
1318
1324
|
class: "bottom",
|
|
1319
1325
|
style: { "text-align": "right" }
|
|
1320
1326
|
};
|
|
1321
|
-
const _sfc_main$
|
|
1327
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
1322
1328
|
...{
|
|
1323
1329
|
name: "MFormTable"
|
|
1324
1330
|
},
|
|
@@ -1673,8 +1679,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1673
1679
|
key: 0,
|
|
1674
1680
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1675
1681
|
innerHTML: _ctx.config.extra
|
|
1676
|
-
}, null, 8, _hoisted_1$
|
|
1677
|
-
createElementVNode("div", _hoisted_2$
|
|
1682
|
+
}, null, 8, _hoisted_1$8)) : createCommentVNode("", true),
|
|
1683
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
1678
1684
|
createVNode(unref(TMagicTooltip), {
|
|
1679
1685
|
content: "拖拽可排序",
|
|
1680
1686
|
placement: "left-start",
|
|
@@ -1808,7 +1814,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1808
1814
|
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
1809
1815
|
}, {
|
|
1810
1816
|
default: withCtx((scope) => [
|
|
1811
|
-
scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$
|
|
1817
|
+
scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$x, {
|
|
1812
1818
|
key: 0,
|
|
1813
1819
|
labelWidth: "0",
|
|
1814
1820
|
disabled: _ctx.disabled,
|
|
@@ -1929,7 +1935,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1929
1935
|
}
|
|
1930
1936
|
});
|
|
1931
1937
|
|
|
1932
|
-
const _sfc_main$
|
|
1938
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
1933
1939
|
...{
|
|
1934
1940
|
name: "MFormTabs"
|
|
1935
1941
|
},
|
|
@@ -2083,7 +2089,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2083
2089
|
]),
|
|
2084
2090
|
default: withCtx(() => [
|
|
2085
2091
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tabItems(tab), (item) => {
|
|
2086
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2092
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
2087
2093
|
key: item[unref(mForm)?.keyProp || "__key"],
|
|
2088
2094
|
config: item,
|
|
2089
2095
|
disabled: _ctx.disabled,
|
|
@@ -2135,7 +2141,7 @@ const useAddField = (prop) => {
|
|
|
2135
2141
|
);
|
|
2136
2142
|
};
|
|
2137
2143
|
|
|
2138
|
-
const _sfc_main$
|
|
2144
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2139
2145
|
...{
|
|
2140
2146
|
name: "MFormCascader"
|
|
2141
2147
|
},
|
|
@@ -2223,7 +2229,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2223
2229
|
}
|
|
2224
2230
|
});
|
|
2225
2231
|
|
|
2226
|
-
const _sfc_main$
|
|
2232
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
2227
2233
|
...{
|
|
2228
2234
|
name: "MFormCheckbox"
|
|
2229
2235
|
},
|
|
@@ -2285,7 +2291,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2285
2291
|
}
|
|
2286
2292
|
});
|
|
2287
2293
|
|
|
2288
|
-
const _sfc_main$
|
|
2294
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
2289
2295
|
...{
|
|
2290
2296
|
name: "MFormCheckGroup"
|
|
2291
2297
|
},
|
|
@@ -2348,7 +2354,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2348
2354
|
}
|
|
2349
2355
|
});
|
|
2350
2356
|
|
|
2351
|
-
const _sfc_main$
|
|
2357
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
2352
2358
|
...{
|
|
2353
2359
|
name: "MFormColorPicker"
|
|
2354
2360
|
},
|
|
@@ -2382,7 +2388,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2382
2388
|
}
|
|
2383
2389
|
});
|
|
2384
2390
|
|
|
2385
|
-
const _sfc_main$
|
|
2391
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
2386
2392
|
...{
|
|
2387
2393
|
name: "MFormDate"
|
|
2388
2394
|
},
|
|
@@ -2422,7 +2428,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2422
2428
|
}
|
|
2423
2429
|
});
|
|
2424
2430
|
|
|
2425
|
-
const _sfc_main$
|
|
2431
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2426
2432
|
...{
|
|
2427
2433
|
name: "MFormDateRange"
|
|
2428
2434
|
},
|
|
@@ -2524,7 +2530,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2524
2530
|
}
|
|
2525
2531
|
});
|
|
2526
2532
|
|
|
2527
|
-
const _sfc_main$
|
|
2533
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
2528
2534
|
...{
|
|
2529
2535
|
name: "MFormDateTime"
|
|
2530
2536
|
},
|
|
@@ -2573,8 +2579,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2573
2579
|
}
|
|
2574
2580
|
});
|
|
2575
2581
|
|
|
2576
|
-
const _hoisted_1$
|
|
2577
|
-
const _sfc_main$
|
|
2582
|
+
const _hoisted_1$7 = { key: 0 };
|
|
2583
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
2578
2584
|
...{
|
|
2579
2585
|
name: "MFormDisplay"
|
|
2580
2586
|
},
|
|
@@ -2586,6 +2592,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2586
2592
|
values: {},
|
|
2587
2593
|
name: {},
|
|
2588
2594
|
prop: {},
|
|
2595
|
+
disabled: { type: Boolean },
|
|
2596
|
+
size: {},
|
|
2589
2597
|
lastValues: {}
|
|
2590
2598
|
},
|
|
2591
2599
|
setup(__props) {
|
|
@@ -2595,13 +2603,13 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2595
2603
|
}
|
|
2596
2604
|
useAddField(props.prop);
|
|
2597
2605
|
return (_ctx, _cache) => {
|
|
2598
|
-
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2606
|
+
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$7, toDisplayString(_ctx.model[_ctx.name]), 1)) : createCommentVNode("", true);
|
|
2599
2607
|
};
|
|
2600
2608
|
}
|
|
2601
2609
|
});
|
|
2602
2610
|
|
|
2603
|
-
const _hoisted_1$
|
|
2604
|
-
const _sfc_main$
|
|
2611
|
+
const _hoisted_1$6 = { class: "m-fields-dynamic-field" };
|
|
2612
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
2605
2613
|
...{
|
|
2606
2614
|
name: "MFormDynamicField"
|
|
2607
2615
|
},
|
|
@@ -2666,7 +2674,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2666
2674
|
emit("change", fieldMap.value[key], key);
|
|
2667
2675
|
};
|
|
2668
2676
|
return (_ctx, _cache) => {
|
|
2669
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2677
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
2670
2678
|
createVNode(unref(TMagicForm), { size: "small" }, {
|
|
2671
2679
|
default: withCtx(() => [
|
|
2672
2680
|
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.keys(fieldMap.value), (key) => {
|
|
@@ -2693,7 +2701,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2693
2701
|
}
|
|
2694
2702
|
});
|
|
2695
2703
|
|
|
2696
|
-
const _sfc_main$
|
|
2704
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
2697
2705
|
...{
|
|
2698
2706
|
name: "MFormHidden"
|
|
2699
2707
|
},
|
|
@@ -2705,6 +2713,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2705
2713
|
values: {},
|
|
2706
2714
|
name: {},
|
|
2707
2715
|
prop: {},
|
|
2716
|
+
disabled: { type: Boolean },
|
|
2717
|
+
size: {},
|
|
2708
2718
|
lastValues: {}
|
|
2709
2719
|
},
|
|
2710
2720
|
setup(__props) {
|
|
@@ -2722,7 +2732,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2722
2732
|
}
|
|
2723
2733
|
});
|
|
2724
2734
|
|
|
2725
|
-
const _sfc_main$
|
|
2735
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
2726
2736
|
...{
|
|
2727
2737
|
name: "MForm"
|
|
2728
2738
|
},
|
|
@@ -2861,7 +2871,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2861
2871
|
}, {
|
|
2862
2872
|
default: withCtx(() => [
|
|
2863
2873
|
initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.config, (item, index) => {
|
|
2864
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2874
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
2865
2875
|
disabled: _ctx.disabled,
|
|
2866
2876
|
key: item[_ctx.keyProp] ?? index,
|
|
2867
2877
|
config: item,
|
|
@@ -2881,8 +2891,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2881
2891
|
}
|
|
2882
2892
|
});
|
|
2883
2893
|
|
|
2884
|
-
const _hoisted_1$
|
|
2885
|
-
const _sfc_main$
|
|
2894
|
+
const _hoisted_1$5 = { style: { "min-height": "1px" } };
|
|
2895
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
2886
2896
|
...{
|
|
2887
2897
|
name: "MFormDialog"
|
|
2888
2898
|
},
|
|
@@ -2987,7 +2997,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2987
2997
|
style: { "text-align": "left" }
|
|
2988
2998
|
}, {
|
|
2989
2999
|
default: withCtx(() => [
|
|
2990
|
-
createElementVNode("div", _hoisted_1$
|
|
3000
|
+
createElementVNode("div", _hoisted_1$5, [
|
|
2991
3001
|
renderSlot(_ctx.$slots, "left")
|
|
2992
3002
|
])
|
|
2993
3003
|
]),
|
|
@@ -3053,7 +3063,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3053
3063
|
class: "m-dialog-body",
|
|
3054
3064
|
style: normalizeStyle(`max-height: ${bodyHeight.value}; overflow-y: auto; overflow-x: hidden;`)
|
|
3055
3065
|
}, [
|
|
3056
|
-
createVNode(_sfc_main$
|
|
3066
|
+
createVNode(_sfc_main$d, {
|
|
3057
3067
|
modelValue: stepActive.value,
|
|
3058
3068
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
|
|
3059
3069
|
ref_key: "form",
|
|
@@ -3075,12 +3085,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3075
3085
|
}
|
|
3076
3086
|
});
|
|
3077
3087
|
|
|
3078
|
-
const _hoisted_1$
|
|
3079
|
-
const _hoisted_2 = {
|
|
3088
|
+
const _hoisted_1$4 = ["href"];
|
|
3089
|
+
const _hoisted_2$1 = {
|
|
3080
3090
|
key: 2,
|
|
3081
3091
|
class: "m-fields-link"
|
|
3082
3092
|
};
|
|
3083
|
-
const _sfc_main$
|
|
3093
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
3084
3094
|
...{
|
|
3085
3095
|
name: "MFormLink"
|
|
3086
3096
|
},
|
|
@@ -3148,10 +3158,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3148
3158
|
target: "_blank",
|
|
3149
3159
|
href: href.value,
|
|
3150
3160
|
style: normalizeStyle(_ctx.config.css || {})
|
|
3151
|
-
}, toDisplayString(displayText.value), 13, _hoisted_1$
|
|
3161
|
+
}, toDisplayString(displayText.value), 13, _hoisted_1$4)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock("span", {
|
|
3152
3162
|
key: 1,
|
|
3153
3163
|
style: normalizeStyle(_ctx.config.disabledCss || {})
|
|
3154
|
-
}, toDisplayString(displayText.value), 5)) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
3164
|
+
}, toDisplayString(displayText.value), 5)) : (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
3155
3165
|
createVNode(unref(TMagicButton), {
|
|
3156
3166
|
text: true,
|
|
3157
3167
|
type: "primary",
|
|
@@ -3162,7 +3172,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3162
3172
|
]),
|
|
3163
3173
|
_: 1
|
|
3164
3174
|
}),
|
|
3165
|
-
createVNode(_sfc_main$
|
|
3175
|
+
createVNode(_sfc_main$c, {
|
|
3166
3176
|
ref_key: "editor",
|
|
3167
3177
|
ref: editor,
|
|
3168
3178
|
title: _ctx.config.formTitle || "编辑扩展配置",
|
|
@@ -3178,7 +3188,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3178
3188
|
}
|
|
3179
3189
|
});
|
|
3180
3190
|
|
|
3181
|
-
const _sfc_main$
|
|
3191
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
3182
3192
|
...{
|
|
3183
3193
|
name: "MFormNumber"
|
|
3184
3194
|
},
|
|
@@ -3226,6 +3236,61 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3226
3236
|
}
|
|
3227
3237
|
});
|
|
3228
3238
|
|
|
3239
|
+
const _hoisted_1$3 = { class: "m-fields-number-range" };
|
|
3240
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", { class: "split-tag" }, "-", -1);
|
|
3241
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
3242
|
+
...{
|
|
3243
|
+
name: "MFormNumberRange"
|
|
3244
|
+
},
|
|
3245
|
+
__name: "NumberRange",
|
|
3246
|
+
props: {
|
|
3247
|
+
config: {},
|
|
3248
|
+
model: {},
|
|
3249
|
+
initValues: {},
|
|
3250
|
+
values: {},
|
|
3251
|
+
name: {},
|
|
3252
|
+
prop: {},
|
|
3253
|
+
disabled: { type: Boolean },
|
|
3254
|
+
size: {},
|
|
3255
|
+
lastValues: {}
|
|
3256
|
+
},
|
|
3257
|
+
emits: ["change"],
|
|
3258
|
+
setup(__props, { emit }) {
|
|
3259
|
+
const props = __props;
|
|
3260
|
+
useAddField(props.prop);
|
|
3261
|
+
if (!Array.isArray(props.model[props.name])) {
|
|
3262
|
+
props.model[props.name] = [];
|
|
3263
|
+
}
|
|
3264
|
+
const minChangeHandler = (v) => {
|
|
3265
|
+
emit("change", [Number(v), props.model[props.name][1]]);
|
|
3266
|
+
};
|
|
3267
|
+
const maxChangeHandler = (v) => {
|
|
3268
|
+
emit("change", [props.model[props.name][0], Number(v)]);
|
|
3269
|
+
};
|
|
3270
|
+
return (_ctx, _cache) => {
|
|
3271
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
3272
|
+
createVNode(unref(TMagicInput), {
|
|
3273
|
+
modelValue: _ctx.model[_ctx.name][0],
|
|
3274
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name][0] = $event),
|
|
3275
|
+
clearable: "",
|
|
3276
|
+
size: _ctx.size,
|
|
3277
|
+
disabled: _ctx.disabled,
|
|
3278
|
+
onChange: minChangeHandler
|
|
3279
|
+
}, null, 8, ["modelValue", "size", "disabled"]),
|
|
3280
|
+
_hoisted_2,
|
|
3281
|
+
createVNode(unref(TMagicInput), {
|
|
3282
|
+
modelValue: _ctx.model[_ctx.name][1],
|
|
3283
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model[_ctx.name][1] = $event),
|
|
3284
|
+
clearable: "",
|
|
3285
|
+
size: _ctx.size,
|
|
3286
|
+
disabled: _ctx.disabled,
|
|
3287
|
+
onChange: maxChangeHandler
|
|
3288
|
+
}, null, 8, ["modelValue", "size", "disabled"])
|
|
3289
|
+
]);
|
|
3290
|
+
};
|
|
3291
|
+
}
|
|
3292
|
+
});
|
|
3293
|
+
|
|
3229
3294
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
3230
3295
|
...{
|
|
3231
3296
|
name: "MFormRadioGroup"
|
|
@@ -3974,6 +4039,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3974
4039
|
width: {},
|
|
3975
4040
|
labelWidth: {},
|
|
3976
4041
|
disabled: { type: Boolean },
|
|
4042
|
+
closeOnPressEscape: { type: Boolean, default: true },
|
|
3977
4043
|
title: {},
|
|
3978
4044
|
zIndex: {},
|
|
3979
4045
|
size: {},
|
|
@@ -4027,7 +4093,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4027
4093
|
modelValue: visible.value,
|
|
4028
4094
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
4029
4095
|
title: _ctx.title,
|
|
4030
|
-
"close-on-press-escape":
|
|
4096
|
+
"close-on-press-escape": _ctx.closeOnPressEscape,
|
|
4031
4097
|
"append-to-body": true,
|
|
4032
4098
|
"show-close": true,
|
|
4033
4099
|
"close-on-click-modal": true,
|
|
@@ -4085,7 +4151,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4085
4151
|
ref: drawerBody,
|
|
4086
4152
|
class: "m-drawer-body"
|
|
4087
4153
|
}, [
|
|
4088
|
-
createVNode(_sfc_main$
|
|
4154
|
+
createVNode(_sfc_main$d, {
|
|
4089
4155
|
ref_key: "form",
|
|
4090
4156
|
ref: form,
|
|
4091
4157
|
size: _ctx.size,
|
|
@@ -4100,7 +4166,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4100
4166
|
], 512)) : createCommentVNode("", true)
|
|
4101
4167
|
]),
|
|
4102
4168
|
_: 3
|
|
4103
|
-
}, 8, ["modelValue", "title", "size", "zIndex"]);
|
|
4169
|
+
}, 8, ["modelValue", "title", "close-on-press-escape", "size", "zIndex"]);
|
|
4104
4170
|
};
|
|
4105
4171
|
}
|
|
4106
4172
|
});
|
|
@@ -4111,36 +4177,37 @@ const index = {
|
|
|
4111
4177
|
const option = Object.assign(defaultInstallOpt, opt);
|
|
4112
4178
|
app.config.globalProperties.$MAGIC_FORM = option;
|
|
4113
4179
|
setConfig(option);
|
|
4114
|
-
app.component("m-form", _sfc_main$
|
|
4115
|
-
app.component("m-form-dialog", _sfc_main$
|
|
4116
|
-
app.component("m-form-container", _sfc_main$
|
|
4117
|
-
app.component("m-form-fieldset", _sfc_main$
|
|
4118
|
-
app.component("m-form-group-list", _sfc_main$
|
|
4119
|
-
app.component("m-form-panel", _sfc_main$
|
|
4120
|
-
app.component("m-form-row", _sfc_main$
|
|
4121
|
-
app.component("m-form-step", _sfc_main$
|
|
4122
|
-
app.component("m-form-table", _sfc_main$
|
|
4123
|
-
app.component("m-form-tab", _sfc_main$
|
|
4180
|
+
app.component("m-form", _sfc_main$d);
|
|
4181
|
+
app.component("m-form-dialog", _sfc_main$c);
|
|
4182
|
+
app.component("m-form-container", _sfc_main$x);
|
|
4183
|
+
app.component("m-form-fieldset", _sfc_main$w);
|
|
4184
|
+
app.component("m-form-group-list", _sfc_main$u);
|
|
4185
|
+
app.component("m-form-panel", _sfc_main$t);
|
|
4186
|
+
app.component("m-form-row", _sfc_main$r);
|
|
4187
|
+
app.component("m-form-step", _sfc_main$q);
|
|
4188
|
+
app.component("m-form-table", _sfc_main$p);
|
|
4189
|
+
app.component("m-form-tab", _sfc_main$o);
|
|
4124
4190
|
app.component("m-fields-text", _sfc_main$3);
|
|
4125
|
-
app.component("m-fields-number", _sfc_main$
|
|
4191
|
+
app.component("m-fields-number", _sfc_main$a);
|
|
4192
|
+
app.component("m-fields-number-range", _sfc_main$9);
|
|
4126
4193
|
app.component("m-fields-textarea", _sfc_main$2);
|
|
4127
|
-
app.component("m-fields-hidden", _sfc_main$
|
|
4128
|
-
app.component("m-fields-date", _sfc_main$
|
|
4129
|
-
app.component("m-fields-datetime", _sfc_main$
|
|
4130
|
-
app.component("m-fields-daterange", _sfc_main$
|
|
4194
|
+
app.component("m-fields-hidden", _sfc_main$e);
|
|
4195
|
+
app.component("m-fields-date", _sfc_main$j);
|
|
4196
|
+
app.component("m-fields-datetime", _sfc_main$h);
|
|
4197
|
+
app.component("m-fields-daterange", _sfc_main$i);
|
|
4131
4198
|
app.component("m-fields-time", _sfc_main$1);
|
|
4132
|
-
app.component("m-fields-checkbox", _sfc_main$
|
|
4199
|
+
app.component("m-fields-checkbox", _sfc_main$m);
|
|
4133
4200
|
app.component("m-fields-switch", _sfc_main$4);
|
|
4134
|
-
app.component("m-fields-color-picker", _sfc_main$
|
|
4135
|
-
app.component("m-fields-checkbox-group", _sfc_main$
|
|
4201
|
+
app.component("m-fields-color-picker", _sfc_main$k);
|
|
4202
|
+
app.component("m-fields-checkbox-group", _sfc_main$l);
|
|
4136
4203
|
app.component("m-fields-radio-group", _sfc_main$8);
|
|
4137
|
-
app.component("m-fields-display", _sfc_main$
|
|
4138
|
-
app.component("m-fields-link", _sfc_main$
|
|
4204
|
+
app.component("m-fields-display", _sfc_main$g);
|
|
4205
|
+
app.component("m-fields-link", _sfc_main$b);
|
|
4139
4206
|
app.component("m-fields-select", _sfc_main$5);
|
|
4140
|
-
app.component("m-fields-cascader", _sfc_main$
|
|
4141
|
-
app.component("m-fields-dynamic-field", _sfc_main$
|
|
4207
|
+
app.component("m-fields-cascader", _sfc_main$n);
|
|
4208
|
+
app.component("m-fields-dynamic-field", _sfc_main$f);
|
|
4142
4209
|
}
|
|
4143
4210
|
};
|
|
4144
4211
|
|
|
4145
|
-
export { _sfc_main$
|
|
4212
|
+
export { _sfc_main$n as MCascader, _sfc_main$m as MCheckbox, _sfc_main$l as MCheckboxGroup, _sfc_main$k as MColorPicker, _sfc_main$x as MContainer, _sfc_main$j as MDate, _sfc_main$h as MDateTime, _sfc_main$i as MDaterange, _sfc_main$g as MDisplay, _sfc_main$f as MDynamicField, _sfc_main$w as MFieldset, _sfc_main$d as MForm, _sfc_main$c as MFormDialog, _sfc_main as MFormDrawer, _sfc_main$u as MGroupList, _sfc_main$e as MHidden, _sfc_main$b as MLink, _sfc_main$a as MNumber, _sfc_main$9 as MNumberRange, _sfc_main$t as MPanel, _sfc_main$8 as MRadioGroup, _sfc_main$r as MRow, _sfc_main$5 as MSelect, _sfc_main$4 as MSwitch, _sfc_main$p as MTable, _sfc_main$o as MTabs, _sfc_main$3 as MText, _sfc_main$2 as MTextarea, _sfc_main$1 as MTime, createValues, index as default, display, filterFunction, getRules, initValue, useAddField };
|
|
4146
4213
|
//# sourceMappingURL=tmagic-form.js.map
|