@tmagic/form 1.3.1 → 1.3.2

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