@tmagic/form 1.3.0-alpha.23 → 1.3.0-alpha.24

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.
@@ -183,7 +183,7 @@ const _hoisted_13 = {
183
183
  key: 5,
184
184
  style: { "text-align": "center" }
185
185
  };
186
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
186
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
187
187
  ...{
188
188
  name: "MFormContainer"
189
189
  },
@@ -612,7 +612,7 @@ const _hoisted_6 = {
612
612
  };
613
613
  const _hoisted_7 = { style: { "flex": "1" } };
614
614
  const _hoisted_8 = ["src"];
615
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
615
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
616
616
  ...{
617
617
  name: "MFormFieldset"
618
618
  },
@@ -695,7 +695,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
695
695
  _ctx.config.schematic && show.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
696
696
  createElementVNode("div", _hoisted_7, [
697
697
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
698
- return openBlock(), createBlock(_sfc_main$x, {
698
+ return openBlock(), createBlock(_sfc_main$y, {
699
699
  key: key(item, index),
700
700
  model: name.value ? _ctx.model[name.value] : _ctx.model,
701
701
  lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
@@ -716,7 +716,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
716
716
  src: _ctx.config.schematic
717
717
  }, null, 8, _hoisted_8)
718
718
  ])) : show.value ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(_ctx.config.items, (item, index) => {
719
- return openBlock(), createBlock(_sfc_main$x, {
719
+ return openBlock(), createBlock(_sfc_main$y, {
720
720
  key: key(item, index),
721
721
  model: name.value ? _ctx.model[name.value] : _ctx.model,
722
722
  lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
@@ -738,7 +738,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
738
738
 
739
739
  const _hoisted_1$b = { class: "m-fields-group-list-item" };
740
740
  const _hoisted_2$5 = ["innerHTML"];
741
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
741
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
742
742
  ...{
743
743
  name: "MFormGroupListItem"
744
744
  },
@@ -871,7 +871,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
871
871
  class: "m-form-tip"
872
872
  }, null, 8, _hoisted_2$5)) : createCommentVNode("", true)
873
873
  ]),
874
- expand.value ? (openBlock(), createBlock(_sfc_main$x, {
874
+ expand.value ? (openBlock(), createBlock(_sfc_main$y, {
875
875
  key: 0,
876
876
  config: rowConfig.value,
877
877
  model: _ctx.model,
@@ -899,7 +899,7 @@ const _hoisted_4$1 = /* @__PURE__ */ createElementVNode("span", { class: "el-tab
899
899
  const _hoisted_5$1 = [
900
900
  _hoisted_4$1
901
901
  ];
902
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
902
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
903
903
  ...{
904
904
  name: "MFormGroupList"
905
905
  },
@@ -989,7 +989,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
989
989
  style: { "color": "rgba(0, 0, 0, 0.45)" }
990
990
  }, null, 8, _hoisted_2$4)) : createCommentVNode("", true),
991
991
  !_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (openBlock(), createElementBlock("div", _hoisted_3$2, _hoisted_5$1)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(_ctx.model[_ctx.name], (item, index) => {
992
- return openBlock(), createBlock(_sfc_main$v, {
992
+ return openBlock(), createBlock(_sfc_main$w, {
993
993
  key: index,
994
994
  model: item,
995
995
  lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
@@ -1042,7 +1042,7 @@ const _hoisted_3$1 = {
1042
1042
  };
1043
1043
  const _hoisted_4 = { style: { "flex": "1" } };
1044
1044
  const _hoisted_5 = ["src"];
1045
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
1045
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1046
1046
  ...{
1047
1047
  name: "MFormPanel"
1048
1048
  },
@@ -1097,7 +1097,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1097
1097
  _ctx.config.schematic ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1098
1098
  createElementVNode("div", _hoisted_4, [
1099
1099
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
1100
- return openBlock(), createBlock(_sfc_main$x, {
1100
+ return openBlock(), createBlock(_sfc_main$y, {
1101
1101
  key: item[unref(mForm)?.keyProp || "__key"] ?? index,
1102
1102
  config: item,
1103
1103
  model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
@@ -1117,7 +1117,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1117
1117
  src: _ctx.config.schematic
1118
1118
  }, null, 8, _hoisted_5)
1119
1119
  ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(items.value, (item, index) => {
1120
- return openBlock(), createBlock(_sfc_main$x, {
1120
+ return openBlock(), createBlock(_sfc_main$y, {
1121
1121
  key: item[unref(mForm)?.keyProp || "__key"] ?? index,
1122
1122
  config: item,
1123
1123
  model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
@@ -1139,7 +1139,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1139
1139
  }
1140
1140
  });
1141
1141
 
1142
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
1142
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1143
1143
  ...{
1144
1144
  name: "MFormCol"
1145
1145
  },
@@ -1166,7 +1166,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1166
1166
  return (_ctx, _cache) => {
1167
1167
  return withDirectives((openBlock(), createBlock(unref(TMagicCol), { span: _ctx.span }, {
1168
1168
  default: withCtx(() => [
1169
- createVNode(_sfc_main$x, {
1169
+ createVNode(_sfc_main$y, {
1170
1170
  model: _ctx.model,
1171
1171
  lastValues: _ctx.lastValues,
1172
1172
  "is-compare": _ctx.isCompare,
@@ -1188,7 +1188,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1188
1188
  }
1189
1189
  });
1190
1190
 
1191
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
1191
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1192
1192
  ...{
1193
1193
  name: "MFormRow"
1194
1194
  },
@@ -1215,7 +1215,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1215
1215
  return openBlock(), createBlock(unref(TMagicRow), { gutter: 10 }, {
1216
1216
  default: withCtx(() => [
1217
1217
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (col, index) => {
1218
- return openBlock(), createBlock(_sfc_main$s, {
1218
+ return openBlock(), createBlock(_sfc_main$t, {
1219
1219
  key: col[unref(mForm)?.keyProp || "__key"] ?? index,
1220
1220
  span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
1221
1221
  config: col,
@@ -1238,7 +1238,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1238
1238
  }
1239
1239
  });
1240
1240
 
1241
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
1241
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1242
1242
  ...{
1243
1243
  name: "MFormStep"
1244
1244
  },
@@ -1292,7 +1292,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1292
1292
  return openBlock(), createElementBlock(Fragment, null, [
1293
1293
  (openBlock(true), createElementBlock(Fragment, null, renderList(step.items, (item) => {
1294
1294
  return openBlock(), createElementBlock(Fragment, null, [
1295
- item ? withDirectives((openBlock(), createBlock(_sfc_main$x, {
1295
+ item ? withDirectives((openBlock(), createBlock(_sfc_main$y, {
1296
1296
  key: item[unref(mForm)?.keyProp || "__key"],
1297
1297
  config: item,
1298
1298
  model: step.name ? _ctx.model[step.name] : _ctx.model,
@@ -1323,7 +1323,7 @@ const _hoisted_3 = {
1323
1323
  class: "bottom",
1324
1324
  style: { "text-align": "right" }
1325
1325
  };
1326
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
1326
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1327
1327
  ...{
1328
1328
  name: "MFormTable"
1329
1329
  },
@@ -1812,7 +1812,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1812
1812
  "class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
1813
1813
  }, {
1814
1814
  default: withCtx((scope) => [
1815
- scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$x, {
1815
+ scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$y, {
1816
1816
  key: 0,
1817
1817
  labelWidth: "0",
1818
1818
  disabled: _ctx.disabled,
@@ -1932,7 +1932,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1932
1932
  }
1933
1933
  });
1934
1934
 
1935
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
1935
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1936
1936
  ...{
1937
1937
  name: "MFormTabs"
1938
1938
  },
@@ -2086,7 +2086,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2086
2086
  ]),
2087
2087
  default: withCtx(() => [
2088
2088
  (openBlock(true), createElementBlock(Fragment, null, renderList(tabItems(tab), (item) => {
2089
- return openBlock(), createBlock(_sfc_main$x, {
2089
+ return openBlock(), createBlock(_sfc_main$y, {
2090
2090
  key: item[unref(mForm)?.keyProp || "__key"],
2091
2091
  config: item,
2092
2092
  disabled: _ctx.disabled,
@@ -2138,7 +2138,7 @@ const useAddField = (prop) => {
2138
2138
  );
2139
2139
  };
2140
2140
 
2141
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
2141
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2142
2142
  ...{
2143
2143
  name: "MFormCascader"
2144
2144
  },
@@ -2226,7 +2226,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
2226
2226
  }
2227
2227
  });
2228
2228
 
2229
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
2229
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
2230
2230
  ...{
2231
2231
  name: "MFormCheckbox"
2232
2232
  },
@@ -2288,7 +2288,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2288
2288
  }
2289
2289
  });
2290
2290
 
2291
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
2291
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2292
2292
  ...{
2293
2293
  name: "MFormCheckGroup"
2294
2294
  },
@@ -2351,7 +2351,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2351
2351
  }
2352
2352
  });
2353
2353
 
2354
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
2354
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2355
2355
  ...{
2356
2356
  name: "MFormColorPicker"
2357
2357
  },
@@ -2385,7 +2385,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2385
2385
  }
2386
2386
  });
2387
2387
 
2388
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
2388
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2389
2389
  ...{
2390
2390
  name: "MFormDate"
2391
2391
  },
@@ -2425,7 +2425,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2425
2425
  }
2426
2426
  });
2427
2427
 
2428
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
2428
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2429
2429
  ...{
2430
2430
  name: "MFormDateRange"
2431
2431
  },
@@ -2527,7 +2527,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2527
2527
  }
2528
2528
  });
2529
2529
 
2530
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
2530
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2531
2531
  ...{
2532
2532
  name: "MFormDateTime"
2533
2533
  },
@@ -2577,7 +2577,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2577
2577
  });
2578
2578
 
2579
2579
  const _hoisted_1$7 = { key: 0 };
2580
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
2580
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2581
2581
  ...{
2582
2582
  name: "MFormDisplay"
2583
2583
  },
@@ -2606,7 +2606,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2606
2606
  });
2607
2607
 
2608
2608
  const _hoisted_1$6 = { class: "m-fields-dynamic-field" };
2609
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
2609
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2610
2610
  ...{
2611
2611
  name: "MFormDynamicField"
2612
2612
  },
@@ -2698,7 +2698,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2698
2698
  }
2699
2699
  });
2700
2700
 
2701
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
2701
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2702
2702
  ...{
2703
2703
  name: "MFormHidden"
2704
2704
  },
@@ -2729,7 +2729,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2729
2729
  }
2730
2730
  });
2731
2731
 
2732
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
2732
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2733
2733
  ...{
2734
2734
  name: "MForm"
2735
2735
  },
@@ -2868,7 +2868,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2868
2868
  }, {
2869
2869
  default: withCtx(() => [
2870
2870
  initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.config, (item, index) => {
2871
- return openBlock(), createBlock(_sfc_main$x, {
2871
+ return openBlock(), createBlock(_sfc_main$y, {
2872
2872
  disabled: _ctx.disabled,
2873
2873
  key: item[_ctx.keyProp] ?? index,
2874
2874
  config: item,
@@ -2889,7 +2889,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2889
2889
  });
2890
2890
 
2891
2891
  const _hoisted_1$5 = { style: { "min-height": "1px" } };
2892
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
2892
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2893
2893
  ...{
2894
2894
  name: "MFormDialog"
2895
2895
  },
@@ -2903,6 +2903,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2903
2903
  fullscreen: { type: Boolean },
2904
2904
  disabled: { type: Boolean },
2905
2905
  title: {},
2906
+ inline: { type: Boolean },
2907
+ labelPosition: {},
2906
2908
  zIndex: {},
2907
2909
  size: {},
2908
2910
  confirmText: { default: "确定" }
@@ -3060,7 +3062,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3060
3062
  class: "m-dialog-body",
3061
3063
  style: normalizeStyle(`max-height: ${bodyHeight.value}; overflow-y: auto; overflow-x: hidden;`)
3062
3064
  }, [
3063
- createVNode(_sfc_main$d, {
3065
+ createVNode(_sfc_main$e, {
3064
3066
  modelValue: stepActive.value,
3065
3067
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
3066
3068
  ref_key: "form",
@@ -3071,8 +3073,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3071
3073
  "init-values": _ctx.values,
3072
3074
  "parent-values": _ctx.parentValues,
3073
3075
  "label-width": _ctx.labelWidth,
3076
+ "label-position": _ctx.labelPosition,
3077
+ inline: _ctx.inline,
3074
3078
  onChange: changeHandler
3075
- }, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width"]),
3079
+ }, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline"]),
3076
3080
  renderSlot(_ctx.$slots, "default")
3077
3081
  ], 4)) : createCommentVNode("", true)
3078
3082
  ]),
@@ -3087,7 +3091,7 @@ const _hoisted_2$1 = {
3087
3091
  key: 2,
3088
3092
  class: "m-fields-link"
3089
3093
  };
3090
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
3094
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3091
3095
  ...{
3092
3096
  name: "MFormLink"
3093
3097
  },
@@ -3169,7 +3173,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3169
3173
  ]),
3170
3174
  _: 1
3171
3175
  }),
3172
- createVNode(_sfc_main$c, {
3176
+ createVNode(_sfc_main$d, {
3173
3177
  ref_key: "editor",
3174
3178
  ref: editor,
3175
3179
  title: _ctx.config.formTitle || "编辑扩展配置",
@@ -3185,7 +3189,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3185
3189
  }
3186
3190
  });
3187
3191
 
3188
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
3192
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3189
3193
  ...{
3190
3194
  name: "MFormNumber"
3191
3195
  },
@@ -3235,7 +3239,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3235
3239
 
3236
3240
  const _hoisted_1$3 = { class: "m-fields-number-range" };
3237
3241
  const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", { class: "split-tag" }, "-", -1);
3238
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3242
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3239
3243
  ...{
3240
3244
  name: "MFormNumberRange"
3241
3245
  },
@@ -3288,7 +3292,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3288
3292
  }
3289
3293
  });
3290
3294
 
3291
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3295
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3292
3296
  ...{
3293
3297
  name: "MFormRadioGroup"
3294
3298
  },
@@ -3340,7 +3344,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3340
3344
  }
3341
3345
  });
3342
3346
 
3343
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3347
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3344
3348
  ...{
3345
3349
  name: "MFormSelectOptionGroups"
3346
3350
  },
@@ -3374,7 +3378,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3374
3378
  }
3375
3379
  });
3376
3380
 
3377
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3381
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3378
3382
  ...{
3379
3383
  name: "MFormSelectOptions"
3380
3384
  },
@@ -3398,7 +3402,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3398
3402
  });
3399
3403
 
3400
3404
  const _hoisted_1$2 = { key: 2 };
3401
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3405
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3402
3406
  ...{
3403
3407
  name: "MFormSelect"
3404
3408
  },
@@ -3738,10 +3742,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3738
3742
  onVisibleChange: visibleHandler
3739
3743
  }, {
3740
3744
  default: withCtx(() => [
3741
- _ctx.config.group ? (openBlock(), createBlock(_sfc_main$7, {
3745
+ _ctx.config.group ? (openBlock(), createBlock(_sfc_main$8, {
3742
3746
  key: 0,
3743
3747
  options: unref(groupOptions)
3744
- }, null, 8, ["options"])) : (openBlock(), createBlock(_sfc_main$6, {
3748
+ }, null, 8, ["options"])) : (openBlock(), createBlock(_sfc_main$7, {
3745
3749
  key: 1,
3746
3750
  options: unref(itemOptions)
3747
3751
  }, null, 8, ["options"])),
@@ -3757,7 +3761,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3757
3761
  }
3758
3762
  });
3759
3763
 
3760
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3764
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3761
3765
  ...{
3762
3766
  name: "MFormSwitch"
3763
3767
  },
@@ -3815,7 +3819,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3815
3819
  });
3816
3820
 
3817
3821
  const _hoisted_1$1 = { key: 0 };
3818
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3822
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3819
3823
  ...{
3820
3824
  name: "MFormText"
3821
3825
  },
@@ -3939,7 +3943,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3939
3943
  }
3940
3944
  });
3941
3945
 
3942
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3946
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3943
3947
  ...{
3944
3948
  name: "MFormTextarea"
3945
3949
  },
@@ -3983,7 +3987,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3983
3987
  }
3984
3988
  });
3985
3989
 
3986
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3990
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3987
3991
  ...{
3988
3992
  name: "MFormTime"
3989
3993
  },
@@ -4021,6 +4025,84 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4021
4025
  }
4022
4026
  });
4023
4027
 
4028
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4029
+ ...{
4030
+ name: "MFormTimeRange"
4031
+ },
4032
+ __name: "Timerange",
4033
+ props: {
4034
+ config: {},
4035
+ model: {},
4036
+ initValues: {},
4037
+ values: {},
4038
+ name: {},
4039
+ prop: {},
4040
+ disabled: { type: Boolean },
4041
+ size: {},
4042
+ lastValues: {}
4043
+ },
4044
+ emits: ["change"],
4045
+ setup(__props, { emit }) {
4046
+ const props = __props;
4047
+ useAddField(props.prop);
4048
+ const { names } = props.config;
4049
+ const value = ref([]);
4050
+ if (props.model !== void 0 && names?.length) {
4051
+ watch(
4052
+ [() => props.model[names[0]], () => props.model[names[1]]],
4053
+ ([start, end], [preStart, preEnd]) => {
4054
+ if (!value.value) {
4055
+ value.value = [];
4056
+ }
4057
+ if (!start || !end)
4058
+ value.value = [];
4059
+ if (start !== preStart)
4060
+ value.value[0] = start;
4061
+ if (end !== preEnd)
4062
+ value.value[1] = end;
4063
+ },
4064
+ {
4065
+ immediate: true
4066
+ }
4067
+ );
4068
+ }
4069
+ const setValue = (v) => {
4070
+ names?.forEach((item, index) => {
4071
+ if (!props.model) {
4072
+ return;
4073
+ }
4074
+ if (Array.isArray(v)) {
4075
+ props.model[item] = datetimeFormatter(v[index]?.toString(), "");
4076
+ } else {
4077
+ props.model[item] = void 0;
4078
+ }
4079
+ });
4080
+ };
4081
+ const changeHandler = (v) => {
4082
+ const value2 = v || [];
4083
+ if (names?.length) {
4084
+ setValue(value2);
4085
+ }
4086
+ emit("change", value2);
4087
+ };
4088
+ return (_ctx, _cache) => {
4089
+ return openBlock(), createBlock(unref(TMagicTimePicker), {
4090
+ modelValue: value.value,
4091
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
4092
+ "is-range": "",
4093
+ "range-separator": "-",
4094
+ "start-placeholder": "开始时间",
4095
+ "end-placeholder": "结束时间",
4096
+ size: _ctx.size,
4097
+ "unlink-panels": true,
4098
+ disabled: _ctx.disabled,
4099
+ "default-time": _ctx.config.defaultTime,
4100
+ onChange: changeHandler
4101
+ }, null, 8, ["modelValue", "size", "disabled", "default-time"]);
4102
+ };
4103
+ }
4104
+ });
4105
+
4024
4106
  const index$1 = '';
4025
4107
 
4026
4108
  const _hoisted_1 = { style: { "min-height": "1px" } };
@@ -4040,7 +4122,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4040
4122
  title: {},
4041
4123
  zIndex: {},
4042
4124
  size: {},
4043
- confirmText: { default: "确定" }
4125
+ confirmText: { default: "确定" },
4126
+ inline: { type: Boolean },
4127
+ labelPosition: {}
4044
4128
  },
4045
4129
  emits: ["close", "submit", "error", "change", "open", "opened"],
4046
4130
  setup(__props, { expose: __expose, emit }) {
@@ -4148,7 +4232,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4148
4232
  ref: drawerBody,
4149
4233
  class: "m-drawer-body"
4150
4234
  }, [
4151
- createVNode(_sfc_main$d, {
4235
+ createVNode(_sfc_main$e, {
4152
4236
  ref_key: "form",
4153
4237
  ref: form,
4154
4238
  size: _ctx.size,
@@ -4157,8 +4241,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4157
4241
  "init-values": _ctx.values,
4158
4242
  "parent-values": _ctx.parentValues,
4159
4243
  "label-width": _ctx.labelWidth,
4244
+ "label-position": _ctx.labelPosition,
4245
+ inline: _ctx.inline,
4160
4246
  onChange: changeHandler
4161
- }, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width"]),
4247
+ }, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline"]),
4162
4248
  renderSlot(_ctx.$slots, "default")
4163
4249
  ], 512)) : createCommentVNode("", true)
4164
4250
  ]),
@@ -4174,37 +4260,38 @@ const index = {
4174
4260
  const option = Object.assign(defaultInstallOpt, opt);
4175
4261
  app.config.globalProperties.$MAGIC_FORM = option;
4176
4262
  setConfig(option);
4177
- app.component("m-form", _sfc_main$d);
4178
- app.component("m-form-dialog", _sfc_main$c);
4179
- app.component("m-form-container", _sfc_main$x);
4180
- app.component("m-form-fieldset", _sfc_main$w);
4181
- app.component("m-form-group-list", _sfc_main$u);
4182
- app.component("m-form-panel", _sfc_main$t);
4183
- app.component("m-form-row", _sfc_main$r);
4184
- app.component("m-form-step", _sfc_main$q);
4185
- app.component("m-form-table", _sfc_main$p);
4186
- app.component("m-form-tab", _sfc_main$o);
4187
- app.component("m-fields-text", _sfc_main$3);
4188
- app.component("m-fields-number", _sfc_main$a);
4189
- app.component("m-fields-number-range", _sfc_main$9);
4190
- app.component("m-fields-textarea", _sfc_main$2);
4191
- app.component("m-fields-hidden", _sfc_main$e);
4192
- app.component("m-fields-date", _sfc_main$j);
4193
- app.component("m-fields-datetime", _sfc_main$h);
4194
- app.component("m-fields-daterange", _sfc_main$i);
4195
- app.component("m-fields-time", _sfc_main$1);
4196
- app.component("m-fields-checkbox", _sfc_main$m);
4197
- app.component("m-fields-switch", _sfc_main$4);
4198
- app.component("m-fields-color-picker", _sfc_main$k);
4199
- app.component("m-fields-checkbox-group", _sfc_main$l);
4200
- app.component("m-fields-radio-group", _sfc_main$8);
4201
- app.component("m-fields-display", _sfc_main$g);
4202
- app.component("m-fields-link", _sfc_main$b);
4203
- app.component("m-fields-select", _sfc_main$5);
4204
- app.component("m-fields-cascader", _sfc_main$n);
4205
- app.component("m-fields-dynamic-field", _sfc_main$f);
4263
+ app.component("m-form", _sfc_main$e);
4264
+ app.component("m-form-dialog", _sfc_main$d);
4265
+ app.component("m-form-container", _sfc_main$y);
4266
+ app.component("m-form-fieldset", _sfc_main$x);
4267
+ app.component("m-form-group-list", _sfc_main$v);
4268
+ app.component("m-form-panel", _sfc_main$u);
4269
+ app.component("m-form-row", _sfc_main$s);
4270
+ app.component("m-form-step", _sfc_main$r);
4271
+ app.component("m-form-table", _sfc_main$q);
4272
+ app.component("m-form-tab", _sfc_main$p);
4273
+ app.component("m-fields-text", _sfc_main$4);
4274
+ app.component("m-fields-number", _sfc_main$b);
4275
+ app.component("m-fields-number-range", _sfc_main$a);
4276
+ app.component("m-fields-textarea", _sfc_main$3);
4277
+ app.component("m-fields-hidden", _sfc_main$f);
4278
+ app.component("m-fields-date", _sfc_main$k);
4279
+ app.component("m-fields-datetime", _sfc_main$i);
4280
+ app.component("m-fields-daterange", _sfc_main$j);
4281
+ app.component("m-fields-timerange", _sfc_main$1);
4282
+ app.component("m-fields-time", _sfc_main$2);
4283
+ app.component("m-fields-checkbox", _sfc_main$n);
4284
+ app.component("m-fields-switch", _sfc_main$5);
4285
+ app.component("m-fields-color-picker", _sfc_main$l);
4286
+ app.component("m-fields-checkbox-group", _sfc_main$m);
4287
+ app.component("m-fields-radio-group", _sfc_main$9);
4288
+ app.component("m-fields-display", _sfc_main$h);
4289
+ app.component("m-fields-link", _sfc_main$c);
4290
+ app.component("m-fields-select", _sfc_main$6);
4291
+ app.component("m-fields-cascader", _sfc_main$o);
4292
+ app.component("m-fields-dynamic-field", _sfc_main$g);
4206
4293
  }
4207
4294
  };
4208
4295
 
4209
- export { _sfc_main$n as MCascader, _sfc_main$m as MCheckbox, _sfc_main$l as MCheckboxGroup, _sfc_main$k as MColorPicker, _sfc_main$x as MContainer, _sfc_main$j as MDate, _sfc_main$h as MDateTime, _sfc_main$i as MDaterange, _sfc_main$g as MDisplay, _sfc_main$f as MDynamicField, _sfc_main$w as MFieldset, _sfc_main$d as MForm, _sfc_main$c as MFormDialog, _sfc_main as MFormDrawer, _sfc_main$u as MGroupList, _sfc_main$e as MHidden, _sfc_main$b as MLink, _sfc_main$a as MNumber, _sfc_main$9 as MNumberRange, _sfc_main$t as MPanel, _sfc_main$8 as MRadioGroup, _sfc_main$r as MRow, _sfc_main$5 as MSelect, _sfc_main$4 as MSwitch, _sfc_main$p as MTable, _sfc_main$o as MTabs, _sfc_main$3 as MText, _sfc_main$2 as MTextarea, _sfc_main$1 as MTime, createValues, index as default, display, filterFunction, getRules, initValue, useAddField };
4296
+ export { _sfc_main$o as MCascader, _sfc_main$n as MCheckbox, _sfc_main$m as MCheckboxGroup, _sfc_main$l as MColorPicker, _sfc_main$y as MContainer, _sfc_main$k as MDate, _sfc_main$i as MDateTime, _sfc_main$j as MDaterange, _sfc_main$h as MDisplay, _sfc_main$g as MDynamicField, _sfc_main$x as MFieldset, _sfc_main$e as MForm, _sfc_main$d as MFormDialog, _sfc_main as MFormDrawer, _sfc_main$v as MGroupList, _sfc_main$f as MHidden, _sfc_main$c as MLink, _sfc_main$b as MNumber, _sfc_main$a as MNumberRange, _sfc_main$u as MPanel, _sfc_main$9 as MRadioGroup, _sfc_main$s as MRow, _sfc_main$6 as MSelect, _sfc_main$5 as MSwitch, _sfc_main$q as MTable, _sfc_main$p as MTabs, _sfc_main$4 as MText, _sfc_main$3 as MTextarea, _sfc_main$2 as MTime, _sfc_main$1 as MTimerange, createValues, index as default, display, filterFunction, getRules, initValue, useAddField };
4210
4297
  //# sourceMappingURL=tmagic-form.js.map