@tmagic/form 1.3.1 → 1.3.3
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 +18 -0
- package/dist/tmagic-form.js +304 -159
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +334 -188
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +6 -6
- package/src/FormBox.vue +106 -0
- package/src/index.ts +1 -0
- package/src/schema.ts +9 -9
- package/src/theme/form-box.scss +18 -0
- package/src/theme/index.scss +1 -0
- package/src/utils/form.ts +1 -1
- package/types/FormBox.vue.d.ts +363 -0
- package/types/FormDialog.vue.d.ts +93 -60
- package/types/FormDrawer.vue.d.ts +93 -60
- package/types/index.d.ts +1 -0
- package/types/schema.d.ts +9 -9
- package/types/utils/form.d.ts +1 -1
package/dist/tmagic-form.js
CHANGED
|
@@ -166,8 +166,8 @@ const initValue = async (mForm, { initValues, config }) => {
|
|
|
166
166
|
return valuesTmp || {};
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
-
const _hoisted_1$
|
|
170
|
-
const _hoisted_2$
|
|
169
|
+
const _hoisted_1$e = ["innerHTML"];
|
|
170
|
+
const _hoisted_2$8 = ["innerHTML"];
|
|
171
171
|
const _hoisted_3$4 = ["innerHTML"];
|
|
172
172
|
const _hoisted_4$4 = ["innerHTML"];
|
|
173
173
|
const _hoisted_5$4 = ["innerHTML"];
|
|
@@ -182,7 +182,7 @@ const _hoisted_13 = {
|
|
|
182
182
|
key: 5,
|
|
183
183
|
style: { "text-align": "center" }
|
|
184
184
|
};
|
|
185
|
-
const _sfc_main$
|
|
185
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
186
186
|
...{
|
|
187
187
|
name: "MFormContainer"
|
|
188
188
|
},
|
|
@@ -200,8 +200,9 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
200
200
|
isCompare: { type: Boolean, default: false }
|
|
201
201
|
},
|
|
202
202
|
emits: ["change", "addDiffCount"],
|
|
203
|
-
setup(__props, { emit }) {
|
|
203
|
+
setup(__props, { emit: __emit }) {
|
|
204
204
|
const props = __props;
|
|
205
|
+
const emit = __emit;
|
|
205
206
|
const mForm = inject("mForm");
|
|
206
207
|
const expand = ref(false);
|
|
207
208
|
const name = computed(() => props.config.name || "");
|
|
@@ -366,12 +367,12 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
366
367
|
label: withCtx(() => [
|
|
367
368
|
createElementVNode("span", {
|
|
368
369
|
innerHTML: type.value === "checkbox" ? "" : text.value
|
|
369
|
-
}, null, 8, _hoisted_1$
|
|
370
|
+
}, null, 8, _hoisted_1$e)
|
|
370
371
|
]),
|
|
371
372
|
default: withCtx(() => [
|
|
372
373
|
tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
|
|
373
374
|
content: withCtx(() => [
|
|
374
|
-
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_2$
|
|
375
|
+
createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_2$8)
|
|
375
376
|
]),
|
|
376
377
|
default: withCtx(() => [
|
|
377
378
|
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
|
|
@@ -600,8 +601,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
600
601
|
}
|
|
601
602
|
});
|
|
602
603
|
|
|
603
|
-
const _hoisted_1$
|
|
604
|
-
const _hoisted_2$
|
|
604
|
+
const _hoisted_1$d = ["innerHTML"];
|
|
605
|
+
const _hoisted_2$7 = ["innerHTML"];
|
|
605
606
|
const _hoisted_3$3 = { key: 1 };
|
|
606
607
|
const _hoisted_4$3 = ["innerHTML"];
|
|
607
608
|
const _hoisted_5$3 = ["innerHTML"];
|
|
@@ -611,7 +612,7 @@ const _hoisted_6 = {
|
|
|
611
612
|
};
|
|
612
613
|
const _hoisted_7 = { style: { "flex": "1" } };
|
|
613
614
|
const _hoisted_8 = ["src"];
|
|
614
|
-
const _sfc_main$
|
|
615
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
615
616
|
...{
|
|
616
617
|
name: "MFormFieldset"
|
|
617
618
|
},
|
|
@@ -628,8 +629,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
628
629
|
disabled: { type: Boolean }
|
|
629
630
|
},
|
|
630
631
|
emits: ["change", "addDiffCount"],
|
|
631
|
-
setup(__props, { emit }) {
|
|
632
|
+
setup(__props, { emit: __emit }) {
|
|
632
633
|
const props = __props;
|
|
634
|
+
const emit = __emit;
|
|
633
635
|
const mForm = inject("mForm");
|
|
634
636
|
const name = computed(() => props.config.name || "");
|
|
635
637
|
const show = computed(() => {
|
|
@@ -670,12 +672,12 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
670
672
|
default: withCtx(() => [
|
|
671
673
|
createElementVNode("span", {
|
|
672
674
|
innerHTML: _ctx.config.legend
|
|
673
|
-
}, null, 8, _hoisted_1$
|
|
675
|
+
}, null, 8, _hoisted_1$d),
|
|
674
676
|
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
675
677
|
key: 0,
|
|
676
678
|
innerHTML: _ctx.config.extra,
|
|
677
679
|
class: "m-form-tip"
|
|
678
|
-
}, null, 8, _hoisted_2$
|
|
680
|
+
}, null, 8, _hoisted_2$7)) : createCommentVNode("", true)
|
|
679
681
|
]),
|
|
680
682
|
_: 1
|
|
681
683
|
}, 8, ["modelValue", "prop"])
|
|
@@ -694,7 +696,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
694
696
|
_ctx.config.schematic && show.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
695
697
|
createElementVNode("div", _hoisted_7, [
|
|
696
698
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
|
|
697
|
-
return openBlock(), createBlock(_sfc_main$
|
|
699
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
698
700
|
key: key(item, index),
|
|
699
701
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
700
702
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -715,7 +717,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
715
717
|
src: _ctx.config.schematic
|
|
716
718
|
}, null, 8, _hoisted_8)
|
|
717
719
|
])) : show.value ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(_ctx.config.items, (item, index) => {
|
|
718
|
-
return openBlock(), createBlock(_sfc_main$
|
|
720
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
719
721
|
key: key(item, index),
|
|
720
722
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
721
723
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -735,9 +737,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
735
737
|
}
|
|
736
738
|
});
|
|
737
739
|
|
|
738
|
-
const _hoisted_1$
|
|
739
|
-
const _hoisted_2$
|
|
740
|
-
const _sfc_main$
|
|
740
|
+
const _hoisted_1$c = { class: "m-fields-group-list-item" };
|
|
741
|
+
const _hoisted_2$6 = ["innerHTML"];
|
|
742
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
741
743
|
...{
|
|
742
744
|
name: "MFormGroupListItem"
|
|
743
745
|
},
|
|
@@ -755,8 +757,9 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
755
757
|
disabled: { type: Boolean }
|
|
756
758
|
},
|
|
757
759
|
emits: ["swap-item", "remove-item", "change", "addDiffCount"],
|
|
758
|
-
setup(__props, { emit }) {
|
|
760
|
+
setup(__props, { emit: __emit }) {
|
|
759
761
|
const props = __props;
|
|
762
|
+
const emit = __emit;
|
|
760
763
|
const mForm = inject("mForm");
|
|
761
764
|
const expand = ref(props.config.expandAll || !props.index);
|
|
762
765
|
const rowConfig = computed(() => ({
|
|
@@ -802,7 +805,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
802
805
|
};
|
|
803
806
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
804
807
|
return (_ctx, _cache) => {
|
|
805
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
808
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
806
809
|
createElementVNode("div", null, [
|
|
807
810
|
createVNode(unref(TMagicButton), {
|
|
808
811
|
text: "",
|
|
@@ -868,9 +871,9 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
868
871
|
key: 1,
|
|
869
872
|
innerHTML: itemExtra.value,
|
|
870
873
|
class: "m-form-tip"
|
|
871
|
-
}, null, 8, _hoisted_2$
|
|
874
|
+
}, null, 8, _hoisted_2$6)) : createCommentVNode("", true)
|
|
872
875
|
]),
|
|
873
|
-
expand.value ? (openBlock(), createBlock(_sfc_main$
|
|
876
|
+
expand.value ? (openBlock(), createBlock(_sfc_main$z, {
|
|
874
877
|
key: 0,
|
|
875
878
|
config: rowConfig.value,
|
|
876
879
|
model: _ctx.model,
|
|
@@ -888,8 +891,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
888
891
|
}
|
|
889
892
|
});
|
|
890
893
|
|
|
891
|
-
const _hoisted_1$
|
|
892
|
-
const _hoisted_2$
|
|
894
|
+
const _hoisted_1$b = { class: "m-fields-group-list" };
|
|
895
|
+
const _hoisted_2$5 = ["innerHTML"];
|
|
893
896
|
const _hoisted_3$2 = {
|
|
894
897
|
key: 1,
|
|
895
898
|
class: "el-table__empty-block"
|
|
@@ -898,7 +901,7 @@ const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("span", { class: "el-tab
|
|
|
898
901
|
const _hoisted_5$2 = [
|
|
899
902
|
_hoisted_4$2
|
|
900
903
|
];
|
|
901
|
-
const _sfc_main$
|
|
904
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
902
905
|
...{
|
|
903
906
|
name: "MFormGroupList"
|
|
904
907
|
},
|
|
@@ -915,8 +918,9 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
915
918
|
disabled: { type: Boolean }
|
|
916
919
|
},
|
|
917
920
|
emits: ["change", "addDiffCount"],
|
|
918
|
-
setup(__props, { emit }) {
|
|
921
|
+
setup(__props, { emit: __emit }) {
|
|
919
922
|
const props = __props;
|
|
923
|
+
const emit = __emit;
|
|
920
924
|
const mForm = inject("mForm");
|
|
921
925
|
const addable = computed(() => {
|
|
922
926
|
if (!props.name)
|
|
@@ -981,14 +985,14 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
981
985
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
982
986
|
const getLastValues = (item, index) => item?.[index] || {};
|
|
983
987
|
return (_ctx, _cache) => {
|
|
984
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
988
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
985
989
|
_ctx.config.extra ? (openBlock(), createElementBlock("div", {
|
|
986
990
|
key: 0,
|
|
987
991
|
innerHTML: _ctx.config.extra,
|
|
988
992
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
989
|
-
}, null, 8, _hoisted_2$
|
|
993
|
+
}, null, 8, _hoisted_2$5)) : createCommentVNode("", true),
|
|
990
994
|
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (openBlock(), createElementBlock("div", _hoisted_3$2, _hoisted_5$2)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(_ctx.model[_ctx.name], (item, index) => {
|
|
991
|
-
return openBlock(), createBlock(_sfc_main$
|
|
995
|
+
return openBlock(), createBlock(_sfc_main$x, {
|
|
992
996
|
key: index,
|
|
993
997
|
model: item,
|
|
994
998
|
lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
|
|
@@ -1033,15 +1037,15 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1033
1037
|
}
|
|
1034
1038
|
});
|
|
1035
1039
|
|
|
1036
|
-
const _hoisted_1$
|
|
1037
|
-
const _hoisted_2$
|
|
1040
|
+
const _hoisted_1$a = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
|
|
1041
|
+
const _hoisted_2$4 = ["innerHTML"];
|
|
1038
1042
|
const _hoisted_3$1 = {
|
|
1039
1043
|
key: 0,
|
|
1040
1044
|
style: { "display": "flex" }
|
|
1041
1045
|
};
|
|
1042
1046
|
const _hoisted_4$1 = { style: { "flex": "1" } };
|
|
1043
1047
|
const _hoisted_5$1 = ["src"];
|
|
1044
|
-
const _sfc_main$
|
|
1048
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
1045
1049
|
...{
|
|
1046
1050
|
name: "MFormPanel"
|
|
1047
1051
|
},
|
|
@@ -1058,8 +1062,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1058
1062
|
disabled: { type: Boolean }
|
|
1059
1063
|
},
|
|
1060
1064
|
emits: ["change", "addDiffCount"],
|
|
1061
|
-
setup(__props, { emit }) {
|
|
1065
|
+
setup(__props, { emit: __emit }) {
|
|
1062
1066
|
const props = __props;
|
|
1067
|
+
const emit = __emit;
|
|
1063
1068
|
const mForm = inject("mForm");
|
|
1064
1069
|
const expand = ref(props.config.expand !== false);
|
|
1065
1070
|
const items = computed(() => props.config.items);
|
|
@@ -1073,7 +1078,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1073
1078
|
"body-style": { display: expand.value ? "block" : "none" }
|
|
1074
1079
|
}, {
|
|
1075
1080
|
header: withCtx(() => [
|
|
1076
|
-
createElementVNode("div", _hoisted_1$
|
|
1081
|
+
createElementVNode("div", _hoisted_1$a, [
|
|
1077
1082
|
createVNode(unref(TMagicButton), {
|
|
1078
1083
|
style: { "padding": "0" },
|
|
1079
1084
|
text: "",
|
|
@@ -1084,7 +1089,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1084
1089
|
key: 0,
|
|
1085
1090
|
innerHTML: _ctx.config.extra,
|
|
1086
1091
|
class: "m-form-tip"
|
|
1087
|
-
}, null, 8, _hoisted_2$
|
|
1092
|
+
}, null, 8, _hoisted_2$4)) : createCommentVNode("", true),
|
|
1088
1093
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1089
1094
|
createTextVNode(toDisplayString(filter(_ctx.config.title)), 1)
|
|
1090
1095
|
])
|
|
@@ -1096,7 +1101,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1096
1101
|
_ctx.config.schematic ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1097
1102
|
createElementVNode("div", _hoisted_4$1, [
|
|
1098
1103
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
1099
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1104
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
1100
1105
|
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1101
1106
|
config: item,
|
|
1102
1107
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1116,7 +1121,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1116
1121
|
src: _ctx.config.schematic
|
|
1117
1122
|
}, null, 8, _hoisted_5$1)
|
|
1118
1123
|
])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(items.value, (item, index) => {
|
|
1119
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1124
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
1120
1125
|
key: item[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1121
1126
|
config: item,
|
|
1122
1127
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1138,7 +1143,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1138
1143
|
}
|
|
1139
1144
|
});
|
|
1140
1145
|
|
|
1141
|
-
const _sfc_main$
|
|
1146
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
1142
1147
|
...{
|
|
1143
1148
|
name: "MFormCol"
|
|
1144
1149
|
},
|
|
@@ -1156,8 +1161,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1156
1161
|
disabled: { type: Boolean }
|
|
1157
1162
|
},
|
|
1158
1163
|
emits: ["change", "addDiffCount"],
|
|
1159
|
-
setup(__props, { emit }) {
|
|
1164
|
+
setup(__props, { emit: __emit }) {
|
|
1160
1165
|
const props = __props;
|
|
1166
|
+
const emit = __emit;
|
|
1161
1167
|
const mForm = inject("mForm");
|
|
1162
1168
|
const display$1 = computed(() => display(mForm, props.config.display, props));
|
|
1163
1169
|
const changeHandler = () => emit("change", props.model);
|
|
@@ -1165,7 +1171,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1165
1171
|
return (_ctx, _cache) => {
|
|
1166
1172
|
return withDirectives((openBlock(), createBlock(unref(TMagicCol), { span: _ctx.span }, {
|
|
1167
1173
|
default: withCtx(() => [
|
|
1168
|
-
createVNode(_sfc_main$
|
|
1174
|
+
createVNode(_sfc_main$z, {
|
|
1169
1175
|
model: _ctx.model,
|
|
1170
1176
|
lastValues: _ctx.lastValues,
|
|
1171
1177
|
"is-compare": _ctx.isCompare,
|
|
@@ -1187,7 +1193,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1187
1193
|
}
|
|
1188
1194
|
});
|
|
1189
1195
|
|
|
1190
|
-
const _sfc_main$
|
|
1196
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
1191
1197
|
...{
|
|
1192
1198
|
name: "MFormRow"
|
|
1193
1199
|
},
|
|
@@ -1205,8 +1211,9 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1205
1211
|
disabled: { type: Boolean }
|
|
1206
1212
|
},
|
|
1207
1213
|
emits: ["change", "addDiffCount"],
|
|
1208
|
-
setup(__props, { emit }) {
|
|
1214
|
+
setup(__props, { emit: __emit }) {
|
|
1209
1215
|
const props = __props;
|
|
1216
|
+
const emit = __emit;
|
|
1210
1217
|
const mForm = inject("mForm");
|
|
1211
1218
|
const changeHandler = () => emit("change", props.name ? props.model[props.name] : props.model);
|
|
1212
1219
|
const onAddDiffCount = () => emit("addDiffCount");
|
|
@@ -1214,7 +1221,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1214
1221
|
return openBlock(), createBlock(unref(TMagicRow), { gutter: 10 }, {
|
|
1215
1222
|
default: withCtx(() => [
|
|
1216
1223
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (col, index) => {
|
|
1217
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1224
|
+
return openBlock(), createBlock(_sfc_main$u, {
|
|
1218
1225
|
key: col[unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1219
1226
|
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1220
1227
|
config: col,
|
|
@@ -1237,7 +1244,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1237
1244
|
}
|
|
1238
1245
|
});
|
|
1239
1246
|
|
|
1240
|
-
const _sfc_main$
|
|
1247
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
1241
1248
|
...{
|
|
1242
1249
|
name: "MFormStep"
|
|
1243
1250
|
},
|
|
@@ -1253,8 +1260,9 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1253
1260
|
disabled: { type: Boolean }
|
|
1254
1261
|
},
|
|
1255
1262
|
emits: ["change", "addDiffCount"],
|
|
1256
|
-
setup(__props, { emit }) {
|
|
1263
|
+
setup(__props, { emit: __emit }) {
|
|
1257
1264
|
const props = __props;
|
|
1265
|
+
const emit = __emit;
|
|
1258
1266
|
const mForm = inject("mForm");
|
|
1259
1267
|
const active = ref(1);
|
|
1260
1268
|
watchEffect(() => {
|
|
@@ -1291,7 +1299,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1291
1299
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1292
1300
|
(openBlock(true), createElementBlock(Fragment, null, renderList(step.items, (item) => {
|
|
1293
1301
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1294
|
-
item ? withDirectives((openBlock(), createBlock(_sfc_main$
|
|
1302
|
+
item ? withDirectives((openBlock(), createBlock(_sfc_main$z, {
|
|
1295
1303
|
key: item[unref(mForm)?.keyProp || "__key"],
|
|
1296
1304
|
config: item,
|
|
1297
1305
|
model: step.name ? _ctx.model[step.name] : _ctx.model,
|
|
@@ -1315,8 +1323,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1315
1323
|
}
|
|
1316
1324
|
});
|
|
1317
1325
|
|
|
1318
|
-
const _hoisted_1$
|
|
1319
|
-
const _hoisted_2$
|
|
1326
|
+
const _hoisted_1$9 = ["innerHTML"];
|
|
1327
|
+
const _hoisted_2$3 = ["innerHTML"];
|
|
1320
1328
|
const _hoisted_3 = { style: { "display": "flex", "justify-content": "space-between", "margin": "10px 0" } };
|
|
1321
1329
|
const _hoisted_4 = { style: { "display": "flex" } };
|
|
1322
1330
|
const _hoisted_5 = {
|
|
@@ -1324,7 +1332,7 @@ const _hoisted_5 = {
|
|
|
1324
1332
|
class: "bottom",
|
|
1325
1333
|
style: { "text-align": "right" }
|
|
1326
1334
|
};
|
|
1327
|
-
const _sfc_main$
|
|
1335
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
1328
1336
|
...{
|
|
1329
1337
|
name: "MFormTable"
|
|
1330
1338
|
},
|
|
@@ -1346,8 +1354,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1346
1354
|
showIndex: { type: Boolean, default: true }
|
|
1347
1355
|
},
|
|
1348
1356
|
emits: ["change", "select", "addDiffCount"],
|
|
1349
|
-
setup(__props, { expose: __expose, emit }) {
|
|
1357
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1350
1358
|
const props = __props;
|
|
1359
|
+
const emit = __emit;
|
|
1351
1360
|
let timer = null;
|
|
1352
1361
|
const mForm = inject("mForm");
|
|
1353
1362
|
const tMagicTable = ref();
|
|
@@ -1679,7 +1688,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1679
1688
|
key: 0,
|
|
1680
1689
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1681
1690
|
innerHTML: _ctx.config.extra
|
|
1682
|
-
}, null, 8, _hoisted_1$
|
|
1691
|
+
}, null, 8, _hoisted_1$9)) : createCommentVNode("", true),
|
|
1683
1692
|
createVNode(unref(TMagicTooltip), {
|
|
1684
1693
|
content: "拖拽可排序",
|
|
1685
1694
|
placement: "left-start",
|
|
@@ -1711,7 +1720,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1711
1720
|
createElementVNode("span", {
|
|
1712
1721
|
innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
|
|
1713
1722
|
class: "m-form-tip"
|
|
1714
|
-
}, null, 8, _hoisted_2$
|
|
1723
|
+
}, null, 8, _hoisted_2$3)
|
|
1715
1724
|
]),
|
|
1716
1725
|
_: 1
|
|
1717
1726
|
})) : createCommentVNode("", true),
|
|
@@ -1813,7 +1822,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1813
1822
|
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
1814
1823
|
}, {
|
|
1815
1824
|
default: withCtx((scope) => [
|
|
1816
|
-
scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$
|
|
1825
|
+
scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$z, {
|
|
1817
1826
|
key: 0,
|
|
1818
1827
|
labelWidth: "0",
|
|
1819
1828
|
disabled: _ctx.disabled,
|
|
@@ -1935,7 +1944,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1935
1944
|
}
|
|
1936
1945
|
});
|
|
1937
1946
|
|
|
1938
|
-
const _sfc_main$
|
|
1947
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
1939
1948
|
...{
|
|
1940
1949
|
name: "MFormTabs"
|
|
1941
1950
|
},
|
|
@@ -1953,8 +1962,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1953
1962
|
disabled: { type: Boolean }
|
|
1954
1963
|
},
|
|
1955
1964
|
emits: ["change", "addDiffCount"],
|
|
1956
|
-
setup(__props, { emit }) {
|
|
1957
|
-
const props = __props;
|
|
1965
|
+
setup(__props, { emit: __emit }) {
|
|
1958
1966
|
const tabPaneComponent = getConfig$1("components")?.tabPane;
|
|
1959
1967
|
const tabsComponent = getConfig$1("components")?.tabs;
|
|
1960
1968
|
const getActive = (mForm2, props2, activeTabName2) => {
|
|
@@ -1979,6 +1987,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1979
1987
|
tabConfig.onTabClick(mForm2, tab, { model, formValue: mForm2?.values, prop, config });
|
|
1980
1988
|
}
|
|
1981
1989
|
};
|
|
1990
|
+
const props = __props;
|
|
1991
|
+
const emit = __emit;
|
|
1982
1992
|
const mForm = inject("mForm");
|
|
1983
1993
|
const activeTabName = ref(getActive(mForm, props, ""));
|
|
1984
1994
|
const diffCount = ref({});
|
|
@@ -2089,7 +2099,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
2089
2099
|
]),
|
|
2090
2100
|
default: withCtx(() => [
|
|
2091
2101
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tabItems(tab), (item) => {
|
|
2092
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2102
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
2093
2103
|
key: item[unref(mForm)?.keyProp || "__key"],
|
|
2094
2104
|
config: item,
|
|
2095
2105
|
disabled: _ctx.disabled,
|
|
@@ -2141,7 +2151,7 @@ const useAddField = (prop) => {
|
|
|
2141
2151
|
);
|
|
2142
2152
|
};
|
|
2143
2153
|
|
|
2144
|
-
const _sfc_main$
|
|
2154
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
2145
2155
|
...{
|
|
2146
2156
|
name: "MFormCascader"
|
|
2147
2157
|
},
|
|
@@ -2158,8 +2168,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2158
2168
|
lastValues: {}
|
|
2159
2169
|
},
|
|
2160
2170
|
emits: ["change"],
|
|
2161
|
-
setup(__props, { emit }) {
|
|
2171
|
+
setup(__props, { emit: __emit }) {
|
|
2162
2172
|
const props = __props;
|
|
2173
|
+
const emit = __emit;
|
|
2163
2174
|
const mForm = inject("mForm");
|
|
2164
2175
|
useAddField(props.prop);
|
|
2165
2176
|
const requestFunc = getConfig("request");
|
|
@@ -2233,7 +2244,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2233
2244
|
}
|
|
2234
2245
|
});
|
|
2235
2246
|
|
|
2236
|
-
const _sfc_main$
|
|
2247
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
2237
2248
|
...{
|
|
2238
2249
|
name: "MFormCheckbox"
|
|
2239
2250
|
},
|
|
@@ -2250,8 +2261,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2250
2261
|
lastValues: {}
|
|
2251
2262
|
},
|
|
2252
2263
|
emits: ["change"],
|
|
2253
|
-
setup(__props, { emit }) {
|
|
2264
|
+
setup(__props, { emit: __emit }) {
|
|
2254
2265
|
const props = __props;
|
|
2266
|
+
const emit = __emit;
|
|
2255
2267
|
useAddField(props.prop);
|
|
2256
2268
|
const activeValue = computed(() => {
|
|
2257
2269
|
if (typeof props.config.activeValue === "undefined") {
|
|
@@ -2295,7 +2307,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2295
2307
|
}
|
|
2296
2308
|
});
|
|
2297
2309
|
|
|
2298
|
-
const _sfc_main$
|
|
2310
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2299
2311
|
...{
|
|
2300
2312
|
name: "MFormCheckGroup"
|
|
2301
2313
|
},
|
|
@@ -2312,8 +2324,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2312
2324
|
lastValues: {}
|
|
2313
2325
|
},
|
|
2314
2326
|
emits: ["change"],
|
|
2315
|
-
setup(__props, { emit }) {
|
|
2327
|
+
setup(__props, { emit: __emit }) {
|
|
2316
2328
|
const props = __props;
|
|
2329
|
+
const emit = __emit;
|
|
2317
2330
|
useAddField(props.prop);
|
|
2318
2331
|
if (props.model && !props.model[props.name]) {
|
|
2319
2332
|
props.model[props.name] = [];
|
|
@@ -2358,7 +2371,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2358
2371
|
}
|
|
2359
2372
|
});
|
|
2360
2373
|
|
|
2361
|
-
const _sfc_main$
|
|
2374
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
2362
2375
|
...{
|
|
2363
2376
|
name: "MFormColorPicker"
|
|
2364
2377
|
},
|
|
@@ -2375,8 +2388,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2375
2388
|
lastValues: {}
|
|
2376
2389
|
},
|
|
2377
2390
|
emits: ["change"],
|
|
2378
|
-
setup(__props, { emit }) {
|
|
2391
|
+
setup(__props, { emit: __emit }) {
|
|
2379
2392
|
const props = __props;
|
|
2393
|
+
const emit = __emit;
|
|
2380
2394
|
useAddField(props.prop);
|
|
2381
2395
|
const changeHandler = (value) => emit("change", value);
|
|
2382
2396
|
return (_ctx, _cache) => {
|
|
@@ -2392,7 +2406,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2392
2406
|
}
|
|
2393
2407
|
});
|
|
2394
2408
|
|
|
2395
|
-
const _sfc_main$
|
|
2409
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
2396
2410
|
...{
|
|
2397
2411
|
name: "MFormDate"
|
|
2398
2412
|
},
|
|
@@ -2409,8 +2423,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2409
2423
|
lastValues: {}
|
|
2410
2424
|
},
|
|
2411
2425
|
emits: ["change"],
|
|
2412
|
-
setup(__props, { emit }) {
|
|
2426
|
+
setup(__props, { emit: __emit }) {
|
|
2413
2427
|
const props = __props;
|
|
2428
|
+
const emit = __emit;
|
|
2414
2429
|
useAddField(props.prop);
|
|
2415
2430
|
props.model[props.name] = datetimeFormatter(props.model[props.name], "");
|
|
2416
2431
|
const changeHandler = (v) => {
|
|
@@ -2432,7 +2447,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2432
2447
|
}
|
|
2433
2448
|
});
|
|
2434
2449
|
|
|
2435
|
-
const _sfc_main$
|
|
2450
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
2436
2451
|
...{
|
|
2437
2452
|
name: "MFormDateRange"
|
|
2438
2453
|
},
|
|
@@ -2449,8 +2464,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2449
2464
|
lastValues: {}
|
|
2450
2465
|
},
|
|
2451
2466
|
emits: ["change"],
|
|
2452
|
-
setup(__props, { emit }) {
|
|
2467
|
+
setup(__props, { emit: __emit }) {
|
|
2453
2468
|
const props = __props;
|
|
2469
|
+
const emit = __emit;
|
|
2454
2470
|
useAddField(props.prop);
|
|
2455
2471
|
const { names } = props.config;
|
|
2456
2472
|
const value = ref([]);
|
|
@@ -2534,7 +2550,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2534
2550
|
}
|
|
2535
2551
|
});
|
|
2536
2552
|
|
|
2537
|
-
const _sfc_main$
|
|
2553
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
2538
2554
|
...{
|
|
2539
2555
|
name: "MFormDateTime"
|
|
2540
2556
|
},
|
|
@@ -2551,8 +2567,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2551
2567
|
lastValues: {}
|
|
2552
2568
|
},
|
|
2553
2569
|
emits: ["change"],
|
|
2554
|
-
setup(__props, { emit }) {
|
|
2570
|
+
setup(__props, { emit: __emit }) {
|
|
2555
2571
|
const props = __props;
|
|
2572
|
+
const emit = __emit;
|
|
2556
2573
|
useAddField(props.prop);
|
|
2557
2574
|
const value = props.model?.[props.name].toString();
|
|
2558
2575
|
if (props.model) {
|
|
@@ -2583,8 +2600,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2583
2600
|
}
|
|
2584
2601
|
});
|
|
2585
2602
|
|
|
2586
|
-
const _hoisted_1$
|
|
2587
|
-
const _sfc_main$
|
|
2603
|
+
const _hoisted_1$8 = { key: 0 };
|
|
2604
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2588
2605
|
...{
|
|
2589
2606
|
name: "MFormDisplay"
|
|
2590
2607
|
},
|
|
@@ -2607,13 +2624,13 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2607
2624
|
}
|
|
2608
2625
|
useAddField(props.prop);
|
|
2609
2626
|
return (_ctx, _cache) => {
|
|
2610
|
-
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2627
|
+
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$8, toDisplayString(_ctx.model[_ctx.name]), 1)) : createCommentVNode("", true);
|
|
2611
2628
|
};
|
|
2612
2629
|
}
|
|
2613
2630
|
});
|
|
2614
2631
|
|
|
2615
|
-
const _hoisted_1$
|
|
2616
|
-
const _sfc_main$
|
|
2632
|
+
const _hoisted_1$7 = { class: "m-fields-dynamic-field" };
|
|
2633
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
2617
2634
|
...{
|
|
2618
2635
|
name: "MFormDynamicField"
|
|
2619
2636
|
},
|
|
@@ -2630,8 +2647,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2630
2647
|
lastValues: {}
|
|
2631
2648
|
},
|
|
2632
2649
|
emits: ["change"],
|
|
2633
|
-
setup(__props, { emit }) {
|
|
2650
|
+
setup(__props, { emit: __emit }) {
|
|
2634
2651
|
const props = __props;
|
|
2652
|
+
const emit = __emit;
|
|
2635
2653
|
useAddField(props.prop);
|
|
2636
2654
|
const request = getConfig("request");
|
|
2637
2655
|
const fieldMap = reactive({
|
|
@@ -2678,7 +2696,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2678
2696
|
emit("change", fieldMap.value[key], key);
|
|
2679
2697
|
};
|
|
2680
2698
|
return (_ctx, _cache) => {
|
|
2681
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2699
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
2682
2700
|
createVNode(unref(TMagicForm), { size: "small" }, {
|
|
2683
2701
|
default: withCtx(() => [
|
|
2684
2702
|
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.keys(fieldMap.value), (key) => {
|
|
@@ -2705,7 +2723,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2705
2723
|
}
|
|
2706
2724
|
});
|
|
2707
2725
|
|
|
2708
|
-
const _sfc_main$
|
|
2726
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
2709
2727
|
...{
|
|
2710
2728
|
name: "MFormHidden"
|
|
2711
2729
|
},
|
|
@@ -2736,7 +2754,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2736
2754
|
}
|
|
2737
2755
|
});
|
|
2738
2756
|
|
|
2739
|
-
const _sfc_main$
|
|
2757
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
2740
2758
|
...{
|
|
2741
2759
|
name: "MForm"
|
|
2742
2760
|
},
|
|
@@ -2759,8 +2777,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2759
2777
|
extendState: {}
|
|
2760
2778
|
},
|
|
2761
2779
|
emits: ["change", "field-input", "field-change"],
|
|
2762
|
-
setup(__props, { expose: __expose, emit }) {
|
|
2780
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2763
2781
|
const props = __props;
|
|
2782
|
+
const emit = __emit;
|
|
2764
2783
|
const tMagicForm = ref();
|
|
2765
2784
|
const initialized = ref(false);
|
|
2766
2785
|
const values = ref({});
|
|
@@ -2875,7 +2894,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2875
2894
|
}, {
|
|
2876
2895
|
default: withCtx(() => [
|
|
2877
2896
|
initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.config, (item, index) => {
|
|
2878
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2897
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
2879
2898
|
disabled: _ctx.disabled,
|
|
2880
2899
|
key: item[_ctx.keyProp] ?? index,
|
|
2881
2900
|
config: item,
|
|
@@ -2895,8 +2914,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2895
2914
|
}
|
|
2896
2915
|
});
|
|
2897
2916
|
|
|
2898
|
-
const _hoisted_1$
|
|
2899
|
-
const _sfc_main$
|
|
2917
|
+
const _hoisted_1$6 = { style: { "min-height": "1px" } };
|
|
2918
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
2900
2919
|
...{
|
|
2901
2920
|
name: "MFormDialog"
|
|
2902
2921
|
},
|
|
@@ -2917,8 +2936,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2917
2936
|
confirmText: { default: "确定" }
|
|
2918
2937
|
},
|
|
2919
2938
|
emits: ["close", "submit", "error", "change"],
|
|
2920
|
-
setup(__props, { expose: __expose, emit }) {
|
|
2939
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2921
2940
|
const props = __props;
|
|
2941
|
+
const emit = __emit;
|
|
2922
2942
|
const form = ref();
|
|
2923
2943
|
const dialogVisible = ref(false);
|
|
2924
2944
|
const saveFetch = ref(false);
|
|
@@ -3003,7 +3023,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3003
3023
|
style: { "text-align": "left" }
|
|
3004
3024
|
}, {
|
|
3005
3025
|
default: withCtx(() => [
|
|
3006
|
-
createElementVNode("div", _hoisted_1$
|
|
3026
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
3007
3027
|
renderSlot(_ctx.$slots, "left")
|
|
3008
3028
|
])
|
|
3009
3029
|
]),
|
|
@@ -3069,7 +3089,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3069
3089
|
class: "m-dialog-body",
|
|
3070
3090
|
style: normalizeStyle(`max-height: ${bodyHeight.value}; overflow-y: auto; overflow-x: hidden;`)
|
|
3071
3091
|
}, [
|
|
3072
|
-
createVNode(_sfc_main$
|
|
3092
|
+
createVNode(_sfc_main$f, {
|
|
3073
3093
|
modelValue: stepActive.value,
|
|
3074
3094
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
|
|
3075
3095
|
ref_key: "form",
|
|
@@ -3093,12 +3113,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3093
3113
|
}
|
|
3094
3114
|
});
|
|
3095
3115
|
|
|
3096
|
-
const _hoisted_1$
|
|
3097
|
-
const _hoisted_2$
|
|
3116
|
+
const _hoisted_1$5 = ["href"];
|
|
3117
|
+
const _hoisted_2$2 = {
|
|
3098
3118
|
key: 2,
|
|
3099
3119
|
class: "m-fields-link"
|
|
3100
3120
|
};
|
|
3101
|
-
const _sfc_main$
|
|
3121
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
3102
3122
|
...{
|
|
3103
3123
|
name: "MFormLink"
|
|
3104
3124
|
},
|
|
@@ -3115,8 +3135,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3115
3135
|
lastValues: {}
|
|
3116
3136
|
},
|
|
3117
3137
|
emits: ["change"],
|
|
3118
|
-
setup(__props, { emit }) {
|
|
3138
|
+
setup(__props, { emit: __emit }) {
|
|
3119
3139
|
const props = __props;
|
|
3140
|
+
const emit = __emit;
|
|
3120
3141
|
useAddField(props.prop);
|
|
3121
3142
|
const formValue = ref({});
|
|
3122
3143
|
const editor = ref();
|
|
@@ -3166,10 +3187,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3166
3187
|
target: "_blank",
|
|
3167
3188
|
href: href.value,
|
|
3168
3189
|
style: normalizeStyle(_ctx.config.css || {})
|
|
3169
|
-
}, toDisplayString(displayText.value), 13, _hoisted_1$
|
|
3190
|
+
}, toDisplayString(displayText.value), 13, _hoisted_1$5)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock("span", {
|
|
3170
3191
|
key: 1,
|
|
3171
3192
|
style: normalizeStyle(_ctx.config.disabledCss || {})
|
|
3172
|
-
}, toDisplayString(displayText.value), 5)) : (openBlock(), createElementBlock("div", _hoisted_2$
|
|
3193
|
+
}, toDisplayString(displayText.value), 5)) : (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
3173
3194
|
createVNode(unref(TMagicButton), {
|
|
3174
3195
|
text: true,
|
|
3175
3196
|
type: "primary",
|
|
@@ -3180,7 +3201,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3180
3201
|
]),
|
|
3181
3202
|
_: 1
|
|
3182
3203
|
}),
|
|
3183
|
-
createVNode(_sfc_main$
|
|
3204
|
+
createVNode(_sfc_main$e, {
|
|
3184
3205
|
ref_key: "editor",
|
|
3185
3206
|
ref: editor,
|
|
3186
3207
|
title: _ctx.config.formTitle || "编辑扩展配置",
|
|
@@ -3196,7 +3217,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3196
3217
|
}
|
|
3197
3218
|
});
|
|
3198
3219
|
|
|
3199
|
-
const _sfc_main$
|
|
3220
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
3200
3221
|
...{
|
|
3201
3222
|
name: "MFormNumber"
|
|
3202
3223
|
},
|
|
@@ -3213,8 +3234,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3213
3234
|
lastValues: {}
|
|
3214
3235
|
},
|
|
3215
3236
|
emits: ["change", "input"],
|
|
3216
|
-
setup(__props, { emit }) {
|
|
3237
|
+
setup(__props, { emit: __emit }) {
|
|
3217
3238
|
const props = __props;
|
|
3239
|
+
const emit = __emit;
|
|
3218
3240
|
useAddField(props.prop);
|
|
3219
3241
|
const mForm = inject("mForm");
|
|
3220
3242
|
const changeHandler = (value) => {
|
|
@@ -3244,9 +3266,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3244
3266
|
}
|
|
3245
3267
|
});
|
|
3246
3268
|
|
|
3247
|
-
const _hoisted_1$
|
|
3248
|
-
const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", { class: "split-tag" }, "-", -1);
|
|
3249
|
-
const _sfc_main$
|
|
3269
|
+
const _hoisted_1$4 = { class: "m-fields-number-range" };
|
|
3270
|
+
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("span", { class: "split-tag" }, "-", -1);
|
|
3271
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
3250
3272
|
...{
|
|
3251
3273
|
name: "MFormNumberRange"
|
|
3252
3274
|
},
|
|
@@ -3263,8 +3285,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3263
3285
|
lastValues: {}
|
|
3264
3286
|
},
|
|
3265
3287
|
emits: ["change"],
|
|
3266
|
-
setup(__props, { emit }) {
|
|
3288
|
+
setup(__props, { emit: __emit }) {
|
|
3267
3289
|
const props = __props;
|
|
3290
|
+
const emit = __emit;
|
|
3268
3291
|
useAddField(props.prop);
|
|
3269
3292
|
if (!Array.isArray(props.model[props.name])) {
|
|
3270
3293
|
props.model[props.name] = [];
|
|
@@ -3276,7 +3299,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3276
3299
|
emit("change", [props.model[props.name][0], Number(v)]);
|
|
3277
3300
|
};
|
|
3278
3301
|
return (_ctx, _cache) => {
|
|
3279
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3302
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
3280
3303
|
createVNode(unref(TMagicInput), {
|
|
3281
3304
|
modelValue: _ctx.model[_ctx.name][0],
|
|
3282
3305
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name][0] = $event),
|
|
@@ -3285,7 +3308,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3285
3308
|
disabled: _ctx.disabled,
|
|
3286
3309
|
onChange: minChangeHandler
|
|
3287
3310
|
}, null, 8, ["modelValue", "size", "disabled"]),
|
|
3288
|
-
_hoisted_2,
|
|
3311
|
+
_hoisted_2$1,
|
|
3289
3312
|
createVNode(unref(TMagicInput), {
|
|
3290
3313
|
modelValue: _ctx.model[_ctx.name][1],
|
|
3291
3314
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model[_ctx.name][1] = $event),
|
|
@@ -3299,7 +3322,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3299
3322
|
}
|
|
3300
3323
|
});
|
|
3301
3324
|
|
|
3302
|
-
const _sfc_main$
|
|
3325
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
3303
3326
|
...{
|
|
3304
3327
|
name: "MFormRadioGroup"
|
|
3305
3328
|
},
|
|
@@ -3316,8 +3339,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3316
3339
|
lastValues: {}
|
|
3317
3340
|
},
|
|
3318
3341
|
emits: ["change"],
|
|
3319
|
-
setup(__props, { emit }) {
|
|
3342
|
+
setup(__props, { emit: __emit }) {
|
|
3320
3343
|
const props = __props;
|
|
3344
|
+
const emit = __emit;
|
|
3321
3345
|
const changeHandler = (value) => {
|
|
3322
3346
|
emit("change", value);
|
|
3323
3347
|
};
|
|
@@ -3351,7 +3375,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3351
3375
|
}
|
|
3352
3376
|
});
|
|
3353
3377
|
|
|
3354
|
-
const _sfc_main$
|
|
3378
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
3355
3379
|
...{
|
|
3356
3380
|
name: "MFormSelectOptionGroups"
|
|
3357
3381
|
},
|
|
@@ -3385,7 +3409,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3385
3409
|
}
|
|
3386
3410
|
});
|
|
3387
3411
|
|
|
3388
|
-
const _sfc_main$
|
|
3412
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
3389
3413
|
...{
|
|
3390
3414
|
name: "MFormSelectOptions"
|
|
3391
3415
|
},
|
|
@@ -3408,8 +3432,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3408
3432
|
}
|
|
3409
3433
|
});
|
|
3410
3434
|
|
|
3411
|
-
const _hoisted_1$
|
|
3412
|
-
const _sfc_main$
|
|
3435
|
+
const _hoisted_1$3 = { key: 2 };
|
|
3436
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3413
3437
|
...{
|
|
3414
3438
|
name: "MFormSelect"
|
|
3415
3439
|
},
|
|
@@ -3426,8 +3450,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3426
3450
|
lastValues: {}
|
|
3427
3451
|
},
|
|
3428
3452
|
emits: ["change"],
|
|
3429
|
-
setup(__props, { emit }) {
|
|
3453
|
+
setup(__props, { emit: __emit }) {
|
|
3430
3454
|
const props = __props;
|
|
3455
|
+
const emit = __emit;
|
|
3431
3456
|
if (!props.model)
|
|
3432
3457
|
throw new Error("不能没有model");
|
|
3433
3458
|
useAddField(props.prop);
|
|
@@ -3749,14 +3774,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3749
3774
|
onVisibleChange: visibleHandler
|
|
3750
3775
|
}, {
|
|
3751
3776
|
default: withCtx(() => [
|
|
3752
|
-
_ctx.config.group ? (openBlock(), createBlock(_sfc_main$
|
|
3777
|
+
_ctx.config.group ? (openBlock(), createBlock(_sfc_main$9, {
|
|
3753
3778
|
key: 0,
|
|
3754
3779
|
options: unref(groupOptions)
|
|
3755
|
-
}, null, 8, ["options"])) : (openBlock(), createBlock(_sfc_main$
|
|
3780
|
+
}, null, 8, ["options"])) : (openBlock(), createBlock(_sfc_main$8, {
|
|
3756
3781
|
key: 1,
|
|
3757
3782
|
options: unref(itemOptions)
|
|
3758
3783
|
}, null, 8, ["options"])),
|
|
3759
|
-
moreLoadingVisible.value ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$
|
|
3784
|
+
moreLoadingVisible.value ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$3, null, 512)), [
|
|
3760
3785
|
[_directive_loading, true]
|
|
3761
3786
|
]) : createCommentVNode("", true)
|
|
3762
3787
|
]),
|
|
@@ -3768,7 +3793,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3768
3793
|
}
|
|
3769
3794
|
});
|
|
3770
3795
|
|
|
3771
|
-
const _sfc_main$
|
|
3796
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
3772
3797
|
...{
|
|
3773
3798
|
name: "MFormSwitch"
|
|
3774
3799
|
},
|
|
@@ -3785,8 +3810,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3785
3810
|
lastValues: {}
|
|
3786
3811
|
},
|
|
3787
3812
|
emits: ["change"],
|
|
3788
|
-
setup(__props, { emit }) {
|
|
3813
|
+
setup(__props, { emit: __emit }) {
|
|
3789
3814
|
const props = __props;
|
|
3815
|
+
const emit = __emit;
|
|
3790
3816
|
useAddField(props.prop);
|
|
3791
3817
|
const changeHandler = (value) => {
|
|
3792
3818
|
emit("change", value);
|
|
@@ -3825,8 +3851,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3825
3851
|
}
|
|
3826
3852
|
});
|
|
3827
3853
|
|
|
3828
|
-
const _hoisted_1$
|
|
3829
|
-
const _sfc_main$
|
|
3854
|
+
const _hoisted_1$2 = { key: 0 };
|
|
3855
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3830
3856
|
...{
|
|
3831
3857
|
name: "MFormText"
|
|
3832
3858
|
},
|
|
@@ -3843,8 +3869,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3843
3869
|
lastValues: {}
|
|
3844
3870
|
},
|
|
3845
3871
|
emits: ["change", "input"],
|
|
3846
|
-
setup(__props, { emit }) {
|
|
3872
|
+
setup(__props, { emit: __emit }) {
|
|
3847
3873
|
const props = __props;
|
|
3874
|
+
const emit = __emit;
|
|
3848
3875
|
useAddField(props.prop);
|
|
3849
3876
|
const mForm = inject("mForm");
|
|
3850
3877
|
const changeHandler = (value) => {
|
|
@@ -3930,7 +3957,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3930
3957
|
_ctx.config.append ? {
|
|
3931
3958
|
name: "append",
|
|
3932
3959
|
fn: withCtx(() => [
|
|
3933
|
-
typeof _ctx.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
3960
|
+
typeof _ctx.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1$2, toDisplayString(_ctx.config.append), 1)) : createCommentVNode("", true),
|
|
3934
3961
|
typeof _ctx.config.append === "object" && _ctx.config.append.type === "button" ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3935
3962
|
key: 1,
|
|
3936
3963
|
style: { "color": "#409eff" },
|
|
@@ -3950,7 +3977,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3950
3977
|
}
|
|
3951
3978
|
});
|
|
3952
3979
|
|
|
3953
|
-
const _sfc_main$
|
|
3980
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3954
3981
|
...{
|
|
3955
3982
|
name: "MFormTextarea"
|
|
3956
3983
|
},
|
|
@@ -3967,8 +3994,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3967
3994
|
lastValues: {}
|
|
3968
3995
|
},
|
|
3969
3996
|
emits: ["change", "input"],
|
|
3970
|
-
setup(__props, { emit }) {
|
|
3997
|
+
setup(__props, { emit: __emit }) {
|
|
3971
3998
|
const props = __props;
|
|
3999
|
+
const emit = __emit;
|
|
3972
4000
|
useAddField(props.prop);
|
|
3973
4001
|
const mForm = inject("mForm");
|
|
3974
4002
|
const changeHandler = (value) => {
|
|
@@ -3994,7 +4022,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3994
4022
|
}
|
|
3995
4023
|
});
|
|
3996
4024
|
|
|
3997
|
-
const _sfc_main$
|
|
4025
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3998
4026
|
...{
|
|
3999
4027
|
name: "MFormTime"
|
|
4000
4028
|
},
|
|
@@ -4011,8 +4039,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4011
4039
|
lastValues: {}
|
|
4012
4040
|
},
|
|
4013
4041
|
emits: ["change"],
|
|
4014
|
-
setup(__props, { emit }) {
|
|
4042
|
+
setup(__props, { emit: __emit }) {
|
|
4015
4043
|
const props = __props;
|
|
4044
|
+
const emit = __emit;
|
|
4016
4045
|
useAddField(props.prop);
|
|
4017
4046
|
const changeHandler = (v) => {
|
|
4018
4047
|
emit("change", v);
|
|
@@ -4032,7 +4061,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4032
4061
|
}
|
|
4033
4062
|
});
|
|
4034
4063
|
|
|
4035
|
-
const _sfc_main$
|
|
4064
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
4036
4065
|
...{
|
|
4037
4066
|
name: "MFormTimeRange"
|
|
4038
4067
|
},
|
|
@@ -4049,8 +4078,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4049
4078
|
lastValues: {}
|
|
4050
4079
|
},
|
|
4051
4080
|
emits: ["change"],
|
|
4052
|
-
setup(__props, { emit }) {
|
|
4081
|
+
setup(__props, { emit: __emit }) {
|
|
4053
4082
|
const props = __props;
|
|
4083
|
+
const emit = __emit;
|
|
4054
4084
|
useAddField(props.prop);
|
|
4055
4085
|
const { names } = props.config;
|
|
4056
4086
|
const value = ref([]);
|
|
@@ -4112,8 +4142,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4112
4142
|
|
|
4113
4143
|
const index$1 = '';
|
|
4114
4144
|
|
|
4115
|
-
const _hoisted_1 = { style: { "min-height": "1px" } };
|
|
4116
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4145
|
+
const _hoisted_1$1 = { style: { "min-height": "1px" } };
|
|
4146
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
4117
4147
|
...{
|
|
4118
4148
|
name: "MFormDialog"
|
|
4119
4149
|
},
|
|
@@ -4135,7 +4165,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4135
4165
|
beforeClose: {}
|
|
4136
4166
|
},
|
|
4137
4167
|
emits: ["close", "closed", "submit", "error", "change", "open", "opened"],
|
|
4138
|
-
setup(__props, { expose: __expose, emit }) {
|
|
4168
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
4169
|
+
const emit = __emit;
|
|
4139
4170
|
const drawer = ref();
|
|
4140
4171
|
const form = ref();
|
|
4141
4172
|
const drawerBody = ref();
|
|
@@ -4215,7 +4246,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4215
4246
|
style: { "text-align": "left" }
|
|
4216
4247
|
}, {
|
|
4217
4248
|
default: withCtx(() => [
|
|
4218
|
-
createElementVNode("div", _hoisted_1, [
|
|
4249
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
4219
4250
|
renderSlot(_ctx.$slots, "left")
|
|
4220
4251
|
])
|
|
4221
4252
|
]),
|
|
@@ -4256,7 +4287,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4256
4287
|
ref: drawerBody,
|
|
4257
4288
|
class: "m-drawer-body"
|
|
4258
4289
|
}, [
|
|
4259
|
-
createVNode(_sfc_main$
|
|
4290
|
+
createVNode(_sfc_main$f, {
|
|
4260
4291
|
ref_key: "form",
|
|
4261
4292
|
ref: form,
|
|
4262
4293
|
size: _ctx.size,
|
|
@@ -4278,44 +4309,158 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4278
4309
|
}
|
|
4279
4310
|
});
|
|
4280
4311
|
|
|
4312
|
+
const _hoisted_1 = { class: "m-form-box" };
|
|
4313
|
+
const _hoisted_2 = { style: { "min-height": "1px" } };
|
|
4314
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4315
|
+
...{
|
|
4316
|
+
name: "MFormDialog"
|
|
4317
|
+
},
|
|
4318
|
+
__name: "FormBox",
|
|
4319
|
+
props: {
|
|
4320
|
+
config: { default: () => [] },
|
|
4321
|
+
values: { default: () => ({}) },
|
|
4322
|
+
parentValues: {},
|
|
4323
|
+
width: {},
|
|
4324
|
+
labelWidth: {},
|
|
4325
|
+
disabled: { type: Boolean },
|
|
4326
|
+
size: {},
|
|
4327
|
+
confirmText: { default: "确定" },
|
|
4328
|
+
inline: { type: Boolean },
|
|
4329
|
+
labelPosition: {}
|
|
4330
|
+
},
|
|
4331
|
+
emits: ["submit", "change", "error"],
|
|
4332
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
4333
|
+
const emit = __emit;
|
|
4334
|
+
const form = ref();
|
|
4335
|
+
const boxBody = ref();
|
|
4336
|
+
const saveFetch = ref(false);
|
|
4337
|
+
const bodyHeight = ref(0);
|
|
4338
|
+
watchEffect(() => {
|
|
4339
|
+
if (boxBody.value) {
|
|
4340
|
+
bodyHeight.value = boxBody.value.clientHeight;
|
|
4341
|
+
}
|
|
4342
|
+
});
|
|
4343
|
+
const submitHandler = async () => {
|
|
4344
|
+
try {
|
|
4345
|
+
const values = await form.value?.submitForm();
|
|
4346
|
+
emit("submit", values);
|
|
4347
|
+
} catch (e) {
|
|
4348
|
+
emit("error", e);
|
|
4349
|
+
}
|
|
4350
|
+
};
|
|
4351
|
+
const changeHandler = (value) => {
|
|
4352
|
+
emit("change", value);
|
|
4353
|
+
};
|
|
4354
|
+
const show = () => {
|
|
4355
|
+
};
|
|
4356
|
+
const hide = () => {
|
|
4357
|
+
};
|
|
4358
|
+
__expose({
|
|
4359
|
+
form,
|
|
4360
|
+
saveFetch,
|
|
4361
|
+
bodyHeight,
|
|
4362
|
+
show,
|
|
4363
|
+
hide
|
|
4364
|
+
});
|
|
4365
|
+
return (_ctx, _cache) => {
|
|
4366
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
4367
|
+
createElementVNode("div", {
|
|
4368
|
+
ref_key: "boxBody",
|
|
4369
|
+
ref: boxBody,
|
|
4370
|
+
class: "m-box-body"
|
|
4371
|
+
}, [
|
|
4372
|
+
createVNode(_sfc_main$f, {
|
|
4373
|
+
ref_key: "form",
|
|
4374
|
+
ref: form,
|
|
4375
|
+
size: _ctx.size,
|
|
4376
|
+
disabled: _ctx.disabled,
|
|
4377
|
+
config: _ctx.config,
|
|
4378
|
+
"init-values": _ctx.values,
|
|
4379
|
+
"parent-values": _ctx.parentValues,
|
|
4380
|
+
"label-width": _ctx.labelWidth,
|
|
4381
|
+
"label-position": _ctx.labelPosition,
|
|
4382
|
+
inline: _ctx.inline,
|
|
4383
|
+
onChange: changeHandler
|
|
4384
|
+
}, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline"]),
|
|
4385
|
+
renderSlot(_ctx.$slots, "default")
|
|
4386
|
+
], 512),
|
|
4387
|
+
createVNode(unref(TMagicRow), { class: "dialog-footer" }, {
|
|
4388
|
+
default: withCtx(() => [
|
|
4389
|
+
createVNode(unref(TMagicCol), {
|
|
4390
|
+
span: 12,
|
|
4391
|
+
style: { "text-align": "left" }
|
|
4392
|
+
}, {
|
|
4393
|
+
default: withCtx(() => [
|
|
4394
|
+
createElementVNode("div", _hoisted_2, [
|
|
4395
|
+
renderSlot(_ctx.$slots, "left")
|
|
4396
|
+
])
|
|
4397
|
+
]),
|
|
4398
|
+
_: 3
|
|
4399
|
+
}),
|
|
4400
|
+
createVNode(unref(TMagicCol), { span: 12 }, {
|
|
4401
|
+
default: withCtx(() => [
|
|
4402
|
+
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
4403
|
+
createVNode(unref(TMagicButton), {
|
|
4404
|
+
type: "primary",
|
|
4405
|
+
disabled: _ctx.disabled,
|
|
4406
|
+
loading: saveFetch.value,
|
|
4407
|
+
onClick: submitHandler
|
|
4408
|
+
}, {
|
|
4409
|
+
default: withCtx(() => [
|
|
4410
|
+
createTextVNode(toDisplayString(_ctx.confirmText), 1)
|
|
4411
|
+
]),
|
|
4412
|
+
_: 1
|
|
4413
|
+
}, 8, ["disabled", "loading"])
|
|
4414
|
+
])
|
|
4415
|
+
]),
|
|
4416
|
+
_: 3
|
|
4417
|
+
})
|
|
4418
|
+
]),
|
|
4419
|
+
_: 3
|
|
4420
|
+
})
|
|
4421
|
+
]);
|
|
4422
|
+
};
|
|
4423
|
+
}
|
|
4424
|
+
});
|
|
4425
|
+
|
|
4281
4426
|
const defaultInstallOpt = {};
|
|
4282
4427
|
const index = {
|
|
4283
4428
|
install(app, opt = {}) {
|
|
4284
4429
|
const option = Object.assign(defaultInstallOpt, opt);
|
|
4285
4430
|
app.config.globalProperties.$MAGIC_FORM = option;
|
|
4286
4431
|
setConfig(option);
|
|
4287
|
-
app.component("m-form", _sfc_main$
|
|
4288
|
-
app.component("m-form-dialog", _sfc_main$
|
|
4289
|
-
app.component("m-form-container", _sfc_main$
|
|
4290
|
-
app.component("m-form-fieldset", _sfc_main$
|
|
4291
|
-
app.component("m-form-group-list", _sfc_main$
|
|
4292
|
-
app.component("m-form-panel", _sfc_main$
|
|
4293
|
-
app.component("m-form-row", _sfc_main$
|
|
4294
|
-
app.component("m-form-step", _sfc_main$
|
|
4295
|
-
app.component("m-form-table", _sfc_main$
|
|
4296
|
-
app.component("m-form-tab", _sfc_main$
|
|
4297
|
-
app.component("m-fields-text", _sfc_main$
|
|
4298
|
-
app.component("m-fields-number", _sfc_main$
|
|
4299
|
-
app.component("m-fields-number-range", _sfc_main$
|
|
4300
|
-
app.component("m-fields-textarea", _sfc_main$
|
|
4301
|
-
app.component("m-fields-hidden", _sfc_main$
|
|
4302
|
-
app.component("m-fields-date", _sfc_main$
|
|
4303
|
-
app.component("m-fields-datetime", _sfc_main$
|
|
4304
|
-
app.component("m-fields-daterange", _sfc_main$
|
|
4305
|
-
app.component("m-fields-timerange", _sfc_main$
|
|
4306
|
-
app.component("m-fields-time", _sfc_main$
|
|
4307
|
-
app.component("m-fields-checkbox", _sfc_main$
|
|
4308
|
-
app.component("m-fields-switch", _sfc_main$
|
|
4309
|
-
app.component("m-fields-color-picker", _sfc_main$
|
|
4310
|
-
app.component("m-fields-checkbox-group", _sfc_main$
|
|
4311
|
-
app.component("m-fields-radio-group", _sfc_main$
|
|
4312
|
-
app.component("m-fields-display", _sfc_main$
|
|
4313
|
-
app.component("m-fields-link", _sfc_main$
|
|
4314
|
-
app.component("m-fields-select", _sfc_main$
|
|
4315
|
-
app.component("m-fields-cascader", _sfc_main$
|
|
4316
|
-
app.component("m-fields-dynamic-field", _sfc_main$
|
|
4432
|
+
app.component("m-form", _sfc_main$f);
|
|
4433
|
+
app.component("m-form-dialog", _sfc_main$e);
|
|
4434
|
+
app.component("m-form-container", _sfc_main$z);
|
|
4435
|
+
app.component("m-form-fieldset", _sfc_main$y);
|
|
4436
|
+
app.component("m-form-group-list", _sfc_main$w);
|
|
4437
|
+
app.component("m-form-panel", _sfc_main$v);
|
|
4438
|
+
app.component("m-form-row", _sfc_main$t);
|
|
4439
|
+
app.component("m-form-step", _sfc_main$s);
|
|
4440
|
+
app.component("m-form-table", _sfc_main$r);
|
|
4441
|
+
app.component("m-form-tab", _sfc_main$q);
|
|
4442
|
+
app.component("m-fields-text", _sfc_main$5);
|
|
4443
|
+
app.component("m-fields-number", _sfc_main$c);
|
|
4444
|
+
app.component("m-fields-number-range", _sfc_main$b);
|
|
4445
|
+
app.component("m-fields-textarea", _sfc_main$4);
|
|
4446
|
+
app.component("m-fields-hidden", _sfc_main$g);
|
|
4447
|
+
app.component("m-fields-date", _sfc_main$l);
|
|
4448
|
+
app.component("m-fields-datetime", _sfc_main$j);
|
|
4449
|
+
app.component("m-fields-daterange", _sfc_main$k);
|
|
4450
|
+
app.component("m-fields-timerange", _sfc_main$2);
|
|
4451
|
+
app.component("m-fields-time", _sfc_main$3);
|
|
4452
|
+
app.component("m-fields-checkbox", _sfc_main$o);
|
|
4453
|
+
app.component("m-fields-switch", _sfc_main$6);
|
|
4454
|
+
app.component("m-fields-color-picker", _sfc_main$m);
|
|
4455
|
+
app.component("m-fields-checkbox-group", _sfc_main$n);
|
|
4456
|
+
app.component("m-fields-radio-group", _sfc_main$a);
|
|
4457
|
+
app.component("m-fields-display", _sfc_main$i);
|
|
4458
|
+
app.component("m-fields-link", _sfc_main$d);
|
|
4459
|
+
app.component("m-fields-select", _sfc_main$7);
|
|
4460
|
+
app.component("m-fields-cascader", _sfc_main$p);
|
|
4461
|
+
app.component("m-fields-dynamic-field", _sfc_main$h);
|
|
4317
4462
|
}
|
|
4318
4463
|
};
|
|
4319
4464
|
|
|
4320
|
-
export { _sfc_main$
|
|
4465
|
+
export { _sfc_main$p as MCascader, _sfc_main$o as MCheckbox, _sfc_main$n as MCheckboxGroup, _sfc_main$m as MColorPicker, _sfc_main$z as MContainer, _sfc_main$l as MDate, _sfc_main$j as MDateTime, _sfc_main$k as MDaterange, _sfc_main$i as MDisplay, _sfc_main$h as MDynamicField, _sfc_main$y as MFieldset, _sfc_main$f as MForm, _sfc_main as MFormBox, _sfc_main$e as MFormDialog, _sfc_main$1 as MFormDrawer, _sfc_main$w as MGroupList, _sfc_main$g as MHidden, _sfc_main$d as MLink, _sfc_main$c as MNumber, _sfc_main$b as MNumberRange, _sfc_main$v as MPanel, _sfc_main$a as MRadioGroup, _sfc_main$t as MRow, _sfc_main$7 as MSelect, _sfc_main$6 as MSwitch, _sfc_main$r as MTable, _sfc_main$q as MTabs, _sfc_main$5 as MText, _sfc_main$4 as MTextarea, _sfc_main$3 as MTime, _sfc_main$2 as MTimerange, createValues, index as default, display, filterFunction, getRules, initValue, useAddField };
|
|
4321
4466
|
//# sourceMappingURL=tmagic-form.js.map
|