@tmagic/form 1.3.0-alpha.0 → 1.3.0-alpha.10

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.
Files changed (73) hide show
  1. package/dist/tmagic-form.js +913 -917
  2. package/dist/tmagic-form.js.map +1 -1
  3. package/dist/tmagic-form.umd.cjs +911 -915
  4. package/dist/tmagic-form.umd.cjs.map +1 -1
  5. package/package.json +10 -11
  6. package/src/Form.vue +14 -2
  7. package/src/FormDialog.vue +5 -1
  8. package/src/containers/Col.vue +5 -1
  9. package/src/containers/Container.vue +5 -1
  10. package/src/containers/Fieldset.vue +5 -1
  11. package/src/containers/GroupList.vue +6 -2
  12. package/src/containers/GroupListItem.vue +7 -7
  13. package/src/containers/Panel.vue +5 -1
  14. package/src/containers/Row.vue +5 -1
  15. package/src/containers/Step.vue +5 -1
  16. package/src/containers/Table.vue +6 -2
  17. package/src/containers/Tabs.vue +14 -8
  18. package/src/fields/Cascader.vue +5 -1
  19. package/src/fields/Checkbox.vue +5 -1
  20. package/src/fields/CheckboxGroup.vue +6 -2
  21. package/src/fields/ColorPicker.vue +5 -1
  22. package/src/fields/Date.vue +5 -1
  23. package/src/fields/DateTime.vue +5 -1
  24. package/src/fields/Daterange.vue +5 -1
  25. package/src/fields/Display.vue +5 -1
  26. package/src/fields/DynamicField.vue +5 -1
  27. package/src/fields/Hidden.vue +5 -1
  28. package/src/fields/Link.vue +5 -1
  29. package/src/fields/Number.vue +5 -1
  30. package/src/fields/RadioGroup.vue +5 -1
  31. package/src/fields/Select.vue +26 -18
  32. package/src/fields/SelectOptionGroups.vue +7 -3
  33. package/src/fields/SelectOptions.vue +5 -1
  34. package/src/fields/Switch.vue +5 -1
  35. package/src/fields/Text.vue +5 -1
  36. package/src/fields/Textarea.vue +5 -1
  37. package/src/fields/Time.vue +5 -1
  38. package/src/index.ts +39 -37
  39. package/src/schema.ts +4 -3
  40. package/types/Form.vue.d.ts +9 -4
  41. package/types/FormDialog.vue.d.ts +83 -121
  42. package/types/containers/Col.vue.d.ts +1 -1
  43. package/types/containers/Container.vue.d.ts +6 -3
  44. package/types/containers/Fieldset.vue.d.ts +6 -3
  45. package/types/containers/GroupList.vue.d.ts +1 -1
  46. package/types/containers/GroupListItem.vue.d.ts +1 -1
  47. package/types/containers/Panel.vue.d.ts +3 -3
  48. package/types/containers/Row.vue.d.ts +1 -1
  49. package/types/containers/Step.vue.d.ts +6 -3
  50. package/types/containers/Table.vue.d.ts +9 -6
  51. package/types/containers/Tabs.vue.d.ts +6 -3
  52. package/types/fields/Cascader.vue.d.ts +1 -1
  53. package/types/fields/Checkbox.vue.d.ts +1 -1
  54. package/types/fields/CheckboxGroup.vue.d.ts +1 -1
  55. package/types/fields/ColorPicker.vue.d.ts +1 -1
  56. package/types/fields/Date.vue.d.ts +1 -1
  57. package/types/fields/DateTime.vue.d.ts +1 -1
  58. package/types/fields/Daterange.vue.d.ts +1 -1
  59. package/types/fields/Display.vue.d.ts +2 -2
  60. package/types/fields/DynamicField.vue.d.ts +1 -10
  61. package/types/fields/Hidden.vue.d.ts +2 -2
  62. package/types/fields/Link.vue.d.ts +1 -1
  63. package/types/fields/Number.vue.d.ts +1 -1
  64. package/types/fields/RadioGroup.vue.d.ts +1 -1
  65. package/types/fields/Select.vue.d.ts +1 -1
  66. package/types/fields/SelectOptionGroups.vue.d.ts +2 -2
  67. package/types/fields/SelectOptions.vue.d.ts +2 -2
  68. package/types/fields/Switch.vue.d.ts +1 -1
  69. package/types/fields/Text.vue.d.ts +1 -1
  70. package/types/fields/Textarea.vue.d.ts +1 -1
  71. package/types/fields/Time.vue.d.ts +1 -1
  72. package/types/index.d.ts +4 -1
  73. package/types/schema.d.ts +4 -3
@@ -1,9 +1,9 @@
1
- import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass, unref, createBlock, resolveDynamicComponent, Fragment, createVNode, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, withDirectives, vShow, renderSlot, onMounted, toRefs, mergeProps, getCurrentInstance, reactive, onBeforeUnmount, vModelText, provide, onBeforeMount, resolveDirective, createSlots, withModifiers } from 'vue';
1
+ import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass, createBlock, resolveDynamicComponent, Fragment, createVNode, unref, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, withDirectives, vShow, renderSlot, onMounted, toRefs, mergeProps, getCurrentInstance, reactive, onBeforeUnmount, vModelText, provide, onBeforeMount, resolveDirective, createSlots, withModifiers } from 'vue';
2
2
  import { WarningFilled, CaretBottom, CaretRight, Delete, CaretTop, Grid, ArrowUp, ArrowDown, FullScreen } from '@element-plus/icons-vue';
3
3
  import { cloneDeep, isEqual, isEmpty } from 'lodash-es';
4
4
  import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicCard, TMagicCol, TMagicRow, TMagicSteps, TMagicStep, TMagicTable, TMagicTableColumn, TMagicUpload, TMagicPagination, tMagicMessage, getConfig as getConfig$1, TMagicBadge, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, TMagicDialog, TMagicInputNumber, TMagicRadioGroup, TMagicRadio, TMagicOptionGroup, TMagicOption, TMagicSelect, TMagicSwitch, TMagicTimePicker } from '@tmagic/design';
5
5
  import Sortable from 'sortablejs';
6
- import { asyncLoadJs, sleep, datetimeFormatter, isNumber } from '@tmagic/utils';
6
+ import { asyncLoadJs, sleep, datetimeFormatter, getValueByKeyPath, isNumber } from '@tmagic/utils';
7
7
  import cloneDeep$1 from 'lodash-es/cloneDeep';
8
8
 
9
9
  const isTableSelect = (type) => typeof type === "string" && ["table-select", "tableSelect"].includes(type);
@@ -167,35 +167,35 @@ const initValue = async (mForm, { initValues, config }) => {
167
167
  };
168
168
 
169
169
  const _hoisted_1$b = ["innerHTML"];
170
- const _hoisted_2$7 = ["innerHTML"];
171
- const _hoisted_3$7 = ["innerHTML"];
172
- const _hoisted_4$6 = ["innerHTML"];
173
- const _hoisted_5$4 = ["innerHTML"];
174
- const _hoisted_6$3 = ["innerHTML"];
175
- const _hoisted_7$3 = ["innerHTML"];
176
- const _hoisted_8$2 = ["innerHTML"];
177
- const _hoisted_9$1 = ["innerHTML"];
178
- const _hoisted_10$1 = ["innerHTML"];
170
+ const _hoisted_2$6 = ["innerHTML"];
171
+ const _hoisted_3$4 = ["innerHTML"];
172
+ const _hoisted_4$4 = ["innerHTML"];
173
+ const _hoisted_5$3 = ["innerHTML"];
174
+ const _hoisted_6$1 = ["innerHTML"];
175
+ const _hoisted_7$1 = ["innerHTML"];
176
+ const _hoisted_8$1 = ["innerHTML"];
177
+ const _hoisted_9 = ["innerHTML"];
178
+ const _hoisted_10 = ["innerHTML"];
179
179
  const _hoisted_11 = ["innerHTML"];
180
180
  const _hoisted_12 = ["innerHTML"];
181
181
  const _hoisted_13 = {
182
182
  key: 5,
183
183
  style: { "text-align": "center" }
184
184
  };
185
- const __default__$v = defineComponent({
186
- name: "MFormContainer"
187
- });
188
185
  const _sfc_main$v = /* @__PURE__ */ defineComponent({
189
- ...__default__$v,
186
+ ...{
187
+ name: "MFormContainer"
188
+ },
189
+ __name: "Container",
190
190
  props: {
191
- model: null,
191
+ model: {},
192
192
  lastValues: { default: () => ({}) },
193
- config: null,
193
+ config: {},
194
194
  prop: { default: "" },
195
195
  disabled: { type: Boolean },
196
- labelWidth: null,
196
+ labelWidth: {},
197
197
  expandMore: { type: Boolean, default: false },
198
- stepActive: null,
198
+ stepActive: {},
199
199
  size: { default: "small" },
200
200
  isCompare: { type: Boolean, default: false }
201
201
  },
@@ -327,94 +327,94 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
327
327
  return (_ctx, _cache) => {
328
328
  const _component_m_fields_hidden = resolveComponent("m-fields-hidden");
329
329
  const _component_Container = resolveComponent("Container", true);
330
- return __props.config ? (openBlock(), createElementBlock("div", {
330
+ return _ctx.config ? (openBlock(), createElementBlock("div", {
331
331
  key: 0,
332
- style: normalizeStyle(__props.config.tip ? "display: flex;align-items: baseline;" : ""),
333
- class: normalizeClass([__props.config.className, "m-form-container"])
332
+ style: normalizeStyle(_ctx.config.tip ? "display: flex;align-items: baseline;" : ""),
333
+ class: normalizeClass([_ctx.config.className, "m-form-container"])
334
334
  }, [
335
- unref(type) === "hidden" ? (openBlock(), createBlock(_component_m_fields_hidden, {
335
+ type.value === "hidden" ? (openBlock(), createBlock(_component_m_fields_hidden, {
336
336
  key: 0,
337
- model: __props.model,
338
- config: __props.config,
339
- name: __props.config.name,
340
- disabled: unref(disabled),
341
- prop: unref(itemProp)
342
- }, null, 8, ["model", "config", "name", "disabled", "prop"])) : unref(items) && !__props.config.text && unref(type) && unref(display$1) ? (openBlock(), createBlock(resolveDynamicComponent(unref(tagName)), {
343
- key: key(__props.config),
344
- size: __props.size,
345
- model: __props.model,
346
- "last-values": __props.lastValues,
347
- "is-compare": __props.isCompare,
348
- config: __props.config,
349
- disabled: unref(disabled),
350
- name: unref(name),
351
- prop: unref(itemProp),
352
- "step-active": __props.stepActive,
337
+ model: _ctx.model,
338
+ config: _ctx.config,
339
+ name: _ctx.config.name,
340
+ disabled: disabled.value,
341
+ prop: itemProp.value
342
+ }, null, 8, ["model", "config", "name", "disabled", "prop"])) : items.value && !_ctx.config.text && type.value && display$1.value ? (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
343
+ key: key(_ctx.config),
344
+ size: _ctx.size,
345
+ model: _ctx.model,
346
+ "last-values": _ctx.lastValues,
347
+ "is-compare": _ctx.isCompare,
348
+ config: _ctx.config,
349
+ disabled: disabled.value,
350
+ name: name.value,
351
+ prop: itemProp.value,
352
+ "step-active": _ctx.stepActive,
353
353
  "expand-more": expand.value,
354
- "label-width": unref(itemLabelWidth),
354
+ "label-width": itemLabelWidth.value,
355
355
  onChange: onChangeHandler,
356
356
  onAddDiffCount
357
- }, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : unref(type) && unref(display$1) && !unref(showDiff) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
357
+ }, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : type.value && display$1.value && !showDiff.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
358
358
  createVNode(unref(TMagicFormItem), {
359
- style: normalizeStyle(__props.config.tip ? "flex: 1" : ""),
360
- class: normalizeClass({ hidden: `${unref(itemLabelWidth)}` === "0" || !__props.config.text }),
361
- prop: unref(itemProp),
362
- "label-width": unref(itemLabelWidth),
363
- rules: unref(rule)
359
+ style: normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
360
+ class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !_ctx.config.text }),
361
+ prop: itemProp.value,
362
+ "label-width": itemLabelWidth.value,
363
+ rules: rule.value
364
364
  }, {
365
365
  label: withCtx(() => [
366
366
  createElementVNode("span", {
367
- innerHTML: unref(type) === "checkbox" ? "" : __props.config.text
367
+ innerHTML: type.value === "checkbox" ? "" : _ctx.config.text
368
368
  }, null, 8, _hoisted_1$b)
369
369
  ]),
370
370
  default: withCtx(() => [
371
- unref(tooltip) ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
371
+ tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
372
372
  content: withCtx(() => [
373
- createElementVNode("div", { innerHTML: unref(tooltip) }, null, 8, _hoisted_2$7)
373
+ createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_2$6)
374
374
  ]),
375
375
  default: withCtx(() => [
376
- (openBlock(), createBlock(resolveDynamicComponent(unref(tagName)), {
377
- key: key(__props.config),
378
- size: __props.size,
379
- model: __props.model,
380
- "last-values": __props.lastValues,
381
- config: __props.config,
382
- name: unref(name),
383
- disabled: unref(disabled),
384
- prop: unref(itemProp),
376
+ (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
377
+ key: key(_ctx.config),
378
+ size: _ctx.size,
379
+ model: _ctx.model,
380
+ "last-values": _ctx.lastValues,
381
+ config: _ctx.config,
382
+ name: name.value,
383
+ disabled: disabled.value,
384
+ prop: itemProp.value,
385
385
  onChange: onChangeHandler,
386
386
  onAddDiffCount
387
387
  }, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"]))
388
388
  ]),
389
389
  _: 1
390
- })) : (openBlock(), createBlock(resolveDynamicComponent(unref(tagName)), {
391
- key: key(__props.config),
392
- size: __props.size,
393
- model: __props.model,
394
- "last-values": __props.lastValues,
395
- config: __props.config,
396
- name: unref(name),
397
- disabled: unref(disabled),
398
- prop: unref(itemProp),
390
+ })) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
391
+ key: key(_ctx.config),
392
+ size: _ctx.size,
393
+ model: _ctx.model,
394
+ "last-values": _ctx.lastValues,
395
+ config: _ctx.config,
396
+ name: name.value,
397
+ disabled: disabled.value,
398
+ prop: itemProp.value,
399
399
  onChange: onChangeHandler,
400
400
  onAddDiffCount
401
401
  }, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
402
- unref(extra) && unref(type) !== "table" ? (openBlock(), createElementBlock("div", {
402
+ extra.value && type.value !== "table" ? (openBlock(), createElementBlock("div", {
403
403
  key: 2,
404
- innerHTML: unref(extra),
404
+ innerHTML: extra.value,
405
405
  class: "m-form-tip"
406
- }, null, 8, _hoisted_3$7)) : createCommentVNode("", true)
406
+ }, null, 8, _hoisted_3$4)) : createCommentVNode("", true)
407
407
  ]),
408
408
  _: 1
409
409
  }, 8, ["style", "class", "prop", "label-width", "rules"]),
410
- __props.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
410
+ _ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
411
411
  key: 0,
412
412
  placement: "left"
413
413
  }, {
414
414
  content: withCtx(() => [
415
415
  createElementVNode("div", {
416
- innerHTML: __props.config.tip
417
- }, null, 8, _hoisted_4$6)
416
+ innerHTML: _ctx.config.tip
417
+ }, null, 8, _hoisted_4$4)
418
418
  ]),
419
419
  default: withCtx(() => [
420
420
  createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
@@ -426,63 +426,63 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
426
426
  ]),
427
427
  _: 1
428
428
  })) : createCommentVNode("", true)
429
- ], 64)) : unref(type) && unref(display$1) && unref(showDiff) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
429
+ ], 64)) : type.value && display$1.value && showDiff.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
430
430
  createVNode(unref(TMagicFormItem), {
431
- style: normalizeStyle([__props.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
432
- class: normalizeClass({ hidden: `${unref(itemLabelWidth)}` === "0" || !__props.config.text }),
433
- prop: unref(itemProp),
434
- "label-width": unref(itemLabelWidth),
435
- rules: unref(rule)
431
+ style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
432
+ class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !_ctx.config.text }),
433
+ prop: itemProp.value,
434
+ "label-width": itemLabelWidth.value,
435
+ rules: rule.value
436
436
  }, {
437
437
  label: withCtx(() => [
438
438
  createElementVNode("span", {
439
- innerHTML: unref(type) === "checkbox" ? "" : __props.config.text
440
- }, null, 8, _hoisted_5$4)
439
+ innerHTML: type.value === "checkbox" ? "" : _ctx.config.text
440
+ }, null, 8, _hoisted_5$3)
441
441
  ]),
442
442
  default: withCtx(() => [
443
- unref(tooltip) ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
443
+ tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
444
444
  content: withCtx(() => [
445
- createElementVNode("div", { innerHTML: unref(tooltip) }, null, 8, _hoisted_6$3)
445
+ createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_6$1)
446
446
  ]),
447
447
  default: withCtx(() => [
448
- (openBlock(), createBlock(resolveDynamicComponent(unref(tagName)), {
449
- key: key(__props.config),
450
- size: __props.size,
451
- model: __props.lastValues,
452
- config: __props.config,
453
- name: unref(name),
454
- disabled: unref(disabled),
455
- prop: unref(itemProp),
448
+ (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
449
+ key: key(_ctx.config),
450
+ size: _ctx.size,
451
+ model: _ctx.lastValues,
452
+ config: _ctx.config,
453
+ name: name.value,
454
+ disabled: disabled.value,
455
+ prop: itemProp.value,
456
456
  onChange: onChangeHandler
457
457
  }, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
458
458
  ]),
459
459
  _: 1
460
- })) : (openBlock(), createBlock(resolveDynamicComponent(unref(tagName)), {
461
- key: key(__props.config),
462
- size: __props.size,
463
- model: __props.lastValues,
464
- config: __props.config,
465
- name: unref(name),
466
- disabled: unref(disabled),
467
- prop: unref(itemProp),
460
+ })) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
461
+ key: key(_ctx.config),
462
+ size: _ctx.size,
463
+ model: _ctx.lastValues,
464
+ config: _ctx.config,
465
+ name: name.value,
466
+ disabled: disabled.value,
467
+ prop: itemProp.value,
468
468
  onChange: onChangeHandler
469
469
  }, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
470
- unref(extra) ? (openBlock(), createElementBlock("div", {
470
+ extra.value ? (openBlock(), createElementBlock("div", {
471
471
  key: 2,
472
- innerHTML: unref(extra),
472
+ innerHTML: extra.value,
473
473
  class: "m-form-tip"
474
- }, null, 8, _hoisted_7$3)) : createCommentVNode("", true)
474
+ }, null, 8, _hoisted_7$1)) : createCommentVNode("", true)
475
475
  ]),
476
476
  _: 1
477
477
  }, 8, ["style", "class", "prop", "label-width", "rules"]),
478
- __props.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
478
+ _ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
479
479
  key: 0,
480
480
  placement: "left"
481
481
  }, {
482
482
  content: withCtx(() => [
483
483
  createElementVNode("div", {
484
- innerHTML: __props.config.tip
485
- }, null, 8, _hoisted_8$2)
484
+ innerHTML: _ctx.config.tip
485
+ }, null, 8, _hoisted_8$1)
486
486
  ]),
487
487
  default: withCtx(() => [
488
488
  createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
@@ -495,60 +495,60 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
495
495
  _: 1
496
496
  })) : createCommentVNode("", true),
497
497
  createVNode(unref(TMagicFormItem), {
498
- style: normalizeStyle([__props.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
499
- class: normalizeClass({ hidden: `${unref(itemLabelWidth)}` === "0" || !__props.config.text }),
500
- prop: unref(itemProp),
501
- "label-width": unref(itemLabelWidth),
502
- rules: unref(rule)
498
+ style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
499
+ class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !_ctx.config.text }),
500
+ prop: itemProp.value,
501
+ "label-width": itemLabelWidth.value,
502
+ rules: rule.value
503
503
  }, {
504
504
  label: withCtx(() => [
505
505
  createElementVNode("span", {
506
- innerHTML: unref(type) === "checkbox" ? "" : __props.config.text
507
- }, null, 8, _hoisted_9$1)
506
+ innerHTML: type.value === "checkbox" ? "" : _ctx.config.text
507
+ }, null, 8, _hoisted_9)
508
508
  ]),
509
509
  default: withCtx(() => [
510
- unref(tooltip) ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
510
+ tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
511
511
  content: withCtx(() => [
512
- createElementVNode("div", { innerHTML: unref(tooltip) }, null, 8, _hoisted_10$1)
512
+ createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_10)
513
513
  ]),
514
514
  default: withCtx(() => [
515
- (openBlock(), createBlock(resolveDynamicComponent(unref(tagName)), {
516
- key: key(__props.config),
517
- size: __props.size,
518
- model: __props.model,
519
- config: __props.config,
520
- name: unref(name),
521
- disabled: unref(disabled),
522
- prop: unref(itemProp),
515
+ (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
516
+ key: key(_ctx.config),
517
+ size: _ctx.size,
518
+ model: _ctx.model,
519
+ config: _ctx.config,
520
+ name: name.value,
521
+ disabled: disabled.value,
522
+ prop: itemProp.value,
523
523
  onChange: onChangeHandler
524
524
  }, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
525
525
  ]),
526
526
  _: 1
527
- })) : (openBlock(), createBlock(resolveDynamicComponent(unref(tagName)), {
528
- key: key(__props.config),
529
- size: __props.size,
530
- model: __props.model,
531
- config: __props.config,
532
- name: unref(name),
533
- disabled: unref(disabled),
534
- prop: unref(itemProp),
527
+ })) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
528
+ key: key(_ctx.config),
529
+ size: _ctx.size,
530
+ model: _ctx.model,
531
+ config: _ctx.config,
532
+ name: name.value,
533
+ disabled: disabled.value,
534
+ prop: itemProp.value,
535
535
  onChange: onChangeHandler
536
536
  }, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
537
- unref(extra) ? (openBlock(), createElementBlock("div", {
537
+ extra.value ? (openBlock(), createElementBlock("div", {
538
538
  key: 2,
539
- innerHTML: unref(extra),
539
+ innerHTML: extra.value,
540
540
  class: "m-form-tip"
541
541
  }, null, 8, _hoisted_11)) : createCommentVNode("", true)
542
542
  ]),
543
543
  _: 1
544
544
  }, 8, ["style", "class", "prop", "label-width", "rules"]),
545
- __props.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
545
+ _ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
546
546
  key: 1,
547
547
  placement: "left"
548
548
  }, {
549
549
  content: withCtx(() => [
550
550
  createElementVNode("div", {
551
- innerHTML: __props.config.tip
551
+ innerHTML: _ctx.config.tip
552
552
  }, null, 8, _hoisted_12)
553
553
  ]),
554
554
  default: withCtx(() => [
@@ -561,26 +561,26 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
561
561
  ]),
562
562
  _: 1
563
563
  })) : createCommentVNode("", true)
564
- ], 64)) : unref(items) && unref(display$1) ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
565
- (unref(name) || unref(name) === 0 ? __props.model[unref(name)] : __props.model) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(items), (item) => {
564
+ ], 64)) : items.value && display$1.value ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
565
+ (name.value || name.value === 0 ? _ctx.model[name.value] : _ctx.model) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(items.value, (item) => {
566
566
  return openBlock(), createBlock(_component_Container, {
567
567
  key: key(item),
568
- model: unref(name) || unref(name) === 0 ? __props.model[unref(name)] : __props.model,
569
- "last-values": unref(name) || unref(name) === 0 ? __props.lastValues[unref(name)] || {} : __props.lastValues,
570
- "is-compare": __props.isCompare,
568
+ model: name.value || name.value === 0 ? _ctx.model[name.value] : _ctx.model,
569
+ "last-values": name.value || name.value === 0 ? _ctx.lastValues[name.value] || {} : _ctx.lastValues,
570
+ "is-compare": _ctx.isCompare,
571
571
  config: item,
572
- size: __props.size,
573
- disabled: unref(disabled),
574
- "step-active": __props.stepActive,
572
+ size: _ctx.size,
573
+ disabled: disabled.value,
574
+ "step-active": _ctx.stepActive,
575
575
  "expand-more": expand.value,
576
- "label-width": unref(itemLabelWidth),
577
- prop: unref(itemProp),
576
+ "label-width": itemLabelWidth.value,
577
+ prop: itemProp.value,
578
578
  onChange: onChangeHandler,
579
579
  onAddDiffCount
580
580
  }, null, 8, ["model", "last-values", "is-compare", "config", "size", "disabled", "step-active", "expand-more", "label-width", "prop"]);
581
581
  }), 128)) : createCommentVNode("", true)
582
582
  ], 64)) : createCommentVNode("", true),
583
- __props.config.expand && unref(type) !== "fieldset" ? (openBlock(), createElementBlock("div", _hoisted_13, [
583
+ _ctx.config.expand && type.value !== "fieldset" ? (openBlock(), createElementBlock("div", _hoisted_13, [
584
584
  createVNode(unref(TMagicButton), {
585
585
  type: "primary",
586
586
  size: "small",
@@ -600,29 +600,29 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
600
600
  });
601
601
 
602
602
  const _hoisted_1$a = ["innerHTML"];
603
- const _hoisted_2$6 = ["innerHTML"];
604
- const _hoisted_3$6 = { key: 1 };
605
- const _hoisted_4$5 = ["innerHTML"];
606
- const _hoisted_5$3 = ["innerHTML"];
607
- const _hoisted_6$2 = {
603
+ const _hoisted_2$5 = ["innerHTML"];
604
+ const _hoisted_3$3 = { key: 1 };
605
+ const _hoisted_4$3 = ["innerHTML"];
606
+ const _hoisted_5$2 = ["innerHTML"];
607
+ const _hoisted_6 = {
608
608
  key: 2,
609
609
  style: { "display": "flex" }
610
610
  };
611
- const _hoisted_7$2 = { style: { "flex": "1" } };
612
- const _hoisted_8$1 = ["src"];
613
- const __default__$u = defineComponent({
614
- name: "MFormFieldset"
615
- });
611
+ const _hoisted_7 = { style: { "flex": "1" } };
612
+ const _hoisted_8 = ["src"];
616
613
  const _sfc_main$u = /* @__PURE__ */ defineComponent({
617
- ...__default__$u,
614
+ ...{
615
+ name: "MFormFieldset"
616
+ },
617
+ __name: "Fieldset",
618
618
  props: {
619
- labelWidth: null,
619
+ labelWidth: {},
620
620
  prop: { default: "" },
621
- size: null,
622
- model: null,
621
+ size: {},
622
+ model: {},
623
623
  lastValues: { default: () => ({}) },
624
624
  isCompare: { type: Boolean, default: false },
625
- config: null,
625
+ config: {},
626
626
  rules: { default: {} },
627
627
  disabled: { type: Boolean }
628
628
  },
@@ -649,61 +649,61 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
649
649
  const key = (item, index) => item[mForm?.keyProp || "__key"] ?? index;
650
650
  const onAddDiffCount = () => emit("addDiffCount");
651
651
  return (_ctx, _cache) => {
652
- return (unref(name) ? __props.model[unref(name)] : __props.model) ? (openBlock(), createElementBlock("fieldset", {
652
+ return (name.value ? _ctx.model[name.value] : _ctx.model) ? (openBlock(), createElementBlock("fieldset", {
653
653
  key: 0,
654
654
  class: "m-fieldset",
655
- style: normalizeStyle(unref(show) ? "padding: 15px 15px 0 5px;" : "border: 0")
655
+ style: normalizeStyle(show.value ? "padding: 15px 15px 0 5px;" : "border: 0")
656
656
  }, [
657
- unref(name) && __props.config.checkbox ? (openBlock(), createBlock(resolveDynamicComponent(!unref(show) ? "div" : "legend"), { key: 0 }, {
657
+ name.value && _ctx.config.checkbox ? (openBlock(), createBlock(resolveDynamicComponent(!show.value ? "div" : "legend"), { key: 0 }, {
658
658
  default: withCtx(() => [
659
659
  createVNode(unref(TMagicCheckbox), {
660
- modelValue: __props.model[unref(name)].value,
660
+ modelValue: _ctx.model[name.value].value,
661
661
  "onUpdate:modelValue": [
662
- _cache[0] || (_cache[0] = ($event) => __props.model[unref(name)].value = $event),
662
+ _cache[0] || (_cache[0] = ($event) => _ctx.model[name.value].value = $event),
663
663
  change
664
664
  ],
665
- prop: `${__props.prop}${__props.prop ? "." : ""}${__props.config.name}.value`,
665
+ prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${_ctx.config.name}.value`,
666
666
  "true-label": 1,
667
667
  "false-label": 0
668
668
  }, {
669
669
  default: withCtx(() => [
670
670
  createElementVNode("span", {
671
- innerHTML: __props.config.legend
671
+ innerHTML: _ctx.config.legend
672
672
  }, null, 8, _hoisted_1$a),
673
- __props.config.extra ? (openBlock(), createElementBlock("span", {
673
+ _ctx.config.extra ? (openBlock(), createElementBlock("span", {
674
674
  key: 0,
675
- innerHTML: __props.config.extra,
675
+ innerHTML: _ctx.config.extra,
676
676
  class: "m-form-tip"
677
- }, null, 8, _hoisted_2$6)) : createCommentVNode("", true)
677
+ }, null, 8, _hoisted_2$5)) : createCommentVNode("", true)
678
678
  ]),
679
679
  _: 1
680
680
  }, 8, ["modelValue", "prop"])
681
681
  ]),
682
682
  _: 1
683
- })) : (openBlock(), createElementBlock("legend", _hoisted_3$6, [
683
+ })) : (openBlock(), createElementBlock("legend", _hoisted_3$3, [
684
684
  createElementVNode("span", {
685
- innerHTML: __props.config.legend
686
- }, null, 8, _hoisted_4$5),
687
- __props.config.extra ? (openBlock(), createElementBlock("span", {
685
+ innerHTML: _ctx.config.legend
686
+ }, null, 8, _hoisted_4$3),
687
+ _ctx.config.extra ? (openBlock(), createElementBlock("span", {
688
688
  key: 0,
689
- innerHTML: __props.config.extra,
689
+ innerHTML: _ctx.config.extra,
690
690
  class: "m-form-tip"
691
- }, null, 8, _hoisted_5$3)) : createCommentVNode("", true)
691
+ }, null, 8, _hoisted_5$2)) : createCommentVNode("", true)
692
692
  ])),
693
- __props.config.schematic && unref(show) ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
694
- createElementVNode("div", _hoisted_7$2, [
695
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.config.items, (item, index) => {
693
+ _ctx.config.schematic && show.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
694
+ createElementVNode("div", _hoisted_7, [
695
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
696
696
  return openBlock(), createBlock(_sfc_main$v, {
697
697
  key: key(item, index),
698
- model: unref(name) ? __props.model[unref(name)] : __props.model,
699
- lastValues: unref(name) ? __props.lastValues[unref(name)] : __props.lastValues,
700
- "is-compare": __props.isCompare,
701
- rules: unref(name) ? __props.rules[unref(name)] : [],
698
+ model: name.value ? _ctx.model[name.value] : _ctx.model,
699
+ lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
700
+ "is-compare": _ctx.isCompare,
701
+ rules: name.value ? _ctx.rules[name.value] : [],
702
702
  config: item,
703
- prop: __props.prop,
704
- disabled: __props.disabled,
705
- labelWidth: unref(lWidth),
706
- size: __props.size,
703
+ prop: _ctx.prop,
704
+ disabled: _ctx.disabled,
705
+ labelWidth: lWidth.value,
706
+ size: _ctx.size,
707
707
  onChange: change,
708
708
  onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
709
709
  }, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "disabled", "labelWidth", "size"]);
@@ -711,20 +711,20 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
711
711
  ]),
712
712
  createElementVNode("img", {
713
713
  class: "m-form-schematic",
714
- src: __props.config.schematic
715
- }, null, 8, _hoisted_8$1)
716
- ])) : unref(show) ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(__props.config.items, (item, index) => {
714
+ src: _ctx.config.schematic
715
+ }, null, 8, _hoisted_8)
716
+ ])) : show.value ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(_ctx.config.items, (item, index) => {
717
717
  return openBlock(), createBlock(_sfc_main$v, {
718
718
  key: key(item, index),
719
- model: unref(name) ? __props.model[unref(name)] : __props.model,
720
- lastValues: unref(name) ? __props.lastValues[unref(name)] : __props.lastValues,
721
- "is-compare": __props.isCompare,
722
- rules: unref(name) ? __props.rules[unref(name)] : [],
719
+ model: name.value ? _ctx.model[name.value] : _ctx.model,
720
+ lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
721
+ "is-compare": _ctx.isCompare,
722
+ rules: name.value ? _ctx.rules[name.value] : [],
723
723
  config: item,
724
- prop: __props.prop,
725
- labelWidth: unref(lWidth),
726
- size: __props.size,
727
- disabled: __props.disabled,
724
+ prop: _ctx.prop,
725
+ labelWidth: lWidth.value,
726
+ size: _ctx.size,
727
+ disabled: _ctx.disabled,
728
728
  onChange: change,
729
729
  onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
730
730
  }, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "labelWidth", "size", "disabled"]);
@@ -735,34 +735,29 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
735
735
  });
736
736
 
737
737
  const _hoisted_1$9 = { class: "m-fields-group-list-item" };
738
- const _hoisted_2$5 = /* @__PURE__ */ createTextVNode("上移");
739
- const _hoisted_3$5 = /* @__PURE__ */ createTextVNode("下移");
740
- const _hoisted_4$4 = ["innerHTML"];
741
- const __default__$t = defineComponent({
742
- name: "MFormGroupListItem"
743
- });
738
+ const _hoisted_2$4 = ["innerHTML"];
744
739
  const _sfc_main$t = /* @__PURE__ */ defineComponent({
745
- ...__default__$t,
740
+ ...{
741
+ name: "MFormGroupListItem"
742
+ },
743
+ __name: "GroupListItem",
746
744
  props: {
747
- model: null,
748
- lastValues: null,
745
+ model: {},
746
+ lastValues: {},
749
747
  isCompare: { type: Boolean },
750
- groupModel: null,
751
- config: null,
752
- labelWidth: null,
753
- prop: null,
754
- size: null,
755
- index: null,
748
+ groupModel: {},
749
+ config: {},
750
+ labelWidth: {},
751
+ prop: {},
752
+ size: {},
753
+ index: {},
756
754
  disabled: { type: Boolean }
757
755
  },
758
756
  emits: ["swap-item", "remove-item", "change", "addDiffCount"],
759
757
  setup(__props, { emit }) {
760
758
  const props = __props;
761
759
  const mForm = inject("mForm");
762
- const expand = ref(false);
763
- watchEffect(() => {
764
- expand.value = !props.index;
765
- });
760
+ const expand = ref(props.config.expandAll || !props.index);
766
761
  const rowConfig = computed(() => ({
767
762
  type: "row",
768
763
  span: props.config.span || 24,
@@ -806,12 +801,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
806
801
  createElementVNode("div", null, [
807
802
  createVNode(unref(TMagicButton), {
808
803
  text: "",
809
- disabled: __props.disabled,
804
+ disabled: _ctx.disabled,
810
805
  icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
811
806
  onClick: expandHandler
812
807
  }, {
813
808
  default: withCtx(() => [
814
- createTextVNode(toDisplayString(unref(title)), 1)
809
+ createTextVNode(toDisplayString(title.value), 1)
815
810
  ]),
816
811
  _: 1
817
812
  }, 8, ["disabled", "icon"]),
@@ -819,20 +814,20 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
819
814
  style: { "color": "#f56c6c" },
820
815
  text: "",
821
816
  icon: unref(Delete),
822
- disabled: __props.disabled,
817
+ disabled: _ctx.disabled,
823
818
  onClick: removeHandler
824
819
  }, null, 8, ["icon", "disabled"]), [
825
- [vShow, showDelete(parseInt(String(__props.index)))]
820
+ [vShow, showDelete(parseInt(String(_ctx.index)))]
826
821
  ]),
827
822
  movable() ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
828
823
  withDirectives(createVNode(unref(TMagicButton), {
829
824
  text: "",
830
- disabled: __props.disabled,
825
+ disabled: _ctx.disabled,
831
826
  size: "small",
832
827
  onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
833
828
  }, {
834
829
  default: withCtx(() => [
835
- _hoisted_2$5,
830
+ createTextVNode("上移"),
836
831
  createVNode(unref(TMagicIcon), null, {
837
832
  default: withCtx(() => [
838
833
  createVNode(unref(CaretTop))
@@ -842,16 +837,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
842
837
  ]),
843
838
  _: 1
844
839
  }, 8, ["disabled"]), [
845
- [vShow, __props.index !== 0]
840
+ [vShow, _ctx.index !== 0]
846
841
  ]),
847
842
  withDirectives(createVNode(unref(TMagicButton), {
848
- disabled: __props.disabled,
843
+ disabled: _ctx.disabled,
849
844
  text: "",
850
845
  size: "small",
851
846
  onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
852
847
  }, {
853
848
  default: withCtx(() => [
854
- _hoisted_3$5,
849
+ createTextVNode("下移"),
855
850
  createVNode(unref(TMagicIcon), null, {
856
851
  default: withCtx(() => [
857
852
  createVNode(unref(CaretBottom))
@@ -861,25 +856,25 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
861
856
  ]),
862
857
  _: 1
863
858
  }, 8, ["disabled"]), [
864
- [vShow, __props.index !== unref(length) - 1]
859
+ [vShow, _ctx.index !== length.value - 1]
865
860
  ])
866
861
  ], 64)) : createCommentVNode("", true),
867
- unref(itemExtra) ? (openBlock(), createElementBlock("span", {
862
+ itemExtra.value ? (openBlock(), createElementBlock("span", {
868
863
  key: 1,
869
- innerHTML: unref(itemExtra),
864
+ innerHTML: itemExtra.value,
870
865
  class: "m-form-tip"
871
- }, null, 8, _hoisted_4$4)) : createCommentVNode("", true)
866
+ }, null, 8, _hoisted_2$4)) : createCommentVNode("", true)
872
867
  ]),
873
868
  expand.value ? (openBlock(), createBlock(_sfc_main$v, {
874
869
  key: 0,
875
- config: unref(rowConfig),
876
- model: __props.model,
877
- lastValues: __props.lastValues,
878
- "is-compare": __props.isCompare,
879
- labelWidth: __props.labelWidth,
880
- prop: `${__props.prop}${__props.prop ? "." : ""}${String(__props.index)}`,
881
- size: __props.size,
882
- disabled: __props.disabled,
870
+ config: rowConfig.value,
871
+ model: _ctx.model,
872
+ lastValues: _ctx.lastValues,
873
+ "is-compare": _ctx.isCompare,
874
+ labelWidth: _ctx.labelWidth,
875
+ prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${String(_ctx.index)}`,
876
+ size: _ctx.size,
877
+ disabled: _ctx.disabled,
883
878
  onChange: changeHandler,
884
879
  onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
885
880
  }, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : createCommentVNode("", true)
@@ -889,31 +884,29 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
889
884
  });
890
885
 
891
886
  const _hoisted_1$8 = { class: "m-fields-group-list" };
892
- const _hoisted_2$4 = ["innerHTML"];
893
- const _hoisted_3$4 = {
887
+ const _hoisted_2$3 = ["innerHTML"];
888
+ const _hoisted_3$2 = {
894
889
  key: 1,
895
890
  class: "el-table__empty-block"
896
891
  };
897
- const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("span", { class: "el-table__empty-text" }, "暂无数据", -1);
898
- const _hoisted_5$2 = [
899
- _hoisted_4$3
892
+ const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("span", { class: "el-table__empty-text" }, "暂无数据", -1);
893
+ const _hoisted_5$1 = [
894
+ _hoisted_4$2
900
895
  ];
901
- const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("添加组");
902
- const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("切换为表格");
903
- const __default__$s = defineComponent({
904
- name: "MFormGroupList"
905
- });
906
896
  const _sfc_main$s = /* @__PURE__ */ defineComponent({
907
- ...__default__$s,
897
+ ...{
898
+ name: "MFormGroupList"
899
+ },
900
+ __name: "GroupList",
908
901
  props: {
909
- model: null,
910
- lastValues: null,
902
+ model: {},
903
+ lastValues: {},
911
904
  isCompare: { type: Boolean },
912
- config: null,
913
- name: null,
914
- labelWidth: null,
915
- prop: null,
916
- size: null,
905
+ config: {},
906
+ name: {},
907
+ labelWidth: {},
908
+ prop: {},
909
+ size: {},
917
910
  disabled: { type: Boolean }
918
911
  },
919
912
  emits: ["change", "addDiffCount"],
@@ -984,49 +977,49 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
984
977
  const getLastValues = (item, index) => item?.[index] || {};
985
978
  return (_ctx, _cache) => {
986
979
  return openBlock(), createElementBlock("div", _hoisted_1$8, [
987
- __props.config.extra ? (openBlock(), createElementBlock("div", {
980
+ _ctx.config.extra ? (openBlock(), createElementBlock("div", {
988
981
  key: 0,
989
- innerHTML: __props.config.extra,
982
+ innerHTML: _ctx.config.extra,
990
983
  style: { "color": "rgba(0, 0, 0, 0.45)" }
991
- }, null, 8, _hoisted_2$4)) : createCommentVNode("", true),
992
- !__props.model[__props.name] || !__props.model[__props.name].length ? (openBlock(), createElementBlock("div", _hoisted_3$4, _hoisted_5$2)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.model[__props.name], (item, index) => {
984
+ }, null, 8, _hoisted_2$3)) : createCommentVNode("", true),
985
+ !_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) => {
993
986
  return openBlock(), createBlock(_sfc_main$t, {
994
987
  key: index,
995
988
  model: item,
996
- lastValues: getLastValues(__props.lastValues[__props.name], index),
997
- "is-compare": __props.isCompare,
998
- config: __props.config,
999
- prop: __props.prop,
989
+ lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
990
+ "is-compare": _ctx.isCompare,
991
+ config: _ctx.config,
992
+ prop: _ctx.prop,
1000
993
  index,
1001
- "label-width": __props.labelWidth,
1002
- size: __props.size,
1003
- disabled: __props.disabled,
1004
- "group-model": __props.model[__props.name],
994
+ "label-width": _ctx.labelWidth,
995
+ size: _ctx.size,
996
+ disabled: _ctx.disabled,
997
+ "group-model": _ctx.model[_ctx.name],
1005
998
  onRemoveItem: removeHandler,
1006
999
  onSwapItem: swapHandler,
1007
1000
  onChange: changeHandler,
1008
1001
  onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
1009
1002
  }, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "index", "label-width", "size", "disabled", "group-model"]);
1010
1003
  }), 128)),
1011
- unref(addable) ? (openBlock(), createBlock(unref(TMagicButton), {
1004
+ addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
1012
1005
  key: 3,
1013
1006
  onClick: addHandler,
1014
1007
  size: "small",
1015
- disabled: __props.disabled
1008
+ disabled: _ctx.disabled
1016
1009
  }, {
1017
1010
  default: withCtx(() => [
1018
- _hoisted_6$1
1011
+ createTextVNode("新增")
1019
1012
  ]),
1020
1013
  _: 1
1021
1014
  }, 8, ["disabled"])) : createCommentVNode("", true),
1022
- __props.config.enableToggleMode ? (openBlock(), createBlock(unref(TMagicButton), {
1015
+ _ctx.config.enableToggleMode ? (openBlock(), createBlock(unref(TMagicButton), {
1023
1016
  key: 4,
1024
1017
  icon: unref(Grid),
1025
1018
  size: "small",
1026
1019
  onClick: toggleMode
1027
1020
  }, {
1028
1021
  default: withCtx(() => [
1029
- _hoisted_7$1
1022
+ createTextVNode("切换为表格")
1030
1023
  ]),
1031
1024
  _: 1
1032
1025
  }, 8, ["icon"])) : createCommentVNode("", true)
@@ -1036,27 +1029,27 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1036
1029
  });
1037
1030
 
1038
1031
  const _hoisted_1$7 = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
1039
- const _hoisted_2$3 = ["innerHTML"];
1040
- const _hoisted_3$3 = {
1032
+ const _hoisted_2$2 = ["innerHTML"];
1033
+ const _hoisted_3$1 = {
1041
1034
  key: 0,
1042
1035
  style: { "display": "flex" }
1043
1036
  };
1044
- const _hoisted_4$2 = { style: { "flex": "1" } };
1045
- const _hoisted_5$1 = ["src"];
1046
- const __default__$r = defineComponent({
1047
- name: "MFormPanel"
1048
- });
1037
+ const _hoisted_4$1 = { style: { "flex": "1" } };
1038
+ const _hoisted_5 = ["src"];
1049
1039
  const _sfc_main$r = /* @__PURE__ */ defineComponent({
1050
- ...__default__$r,
1040
+ ...{
1041
+ name: "MFormPanel"
1042
+ },
1043
+ __name: "Panel",
1051
1044
  props: {
1052
- model: null,
1053
- lastValues: null,
1045
+ model: {},
1046
+ lastValues: {},
1054
1047
  isCompare: { type: Boolean },
1055
- config: null,
1056
- name: null,
1057
- labelWidth: null,
1058
- prop: null,
1059
- size: null,
1048
+ config: {},
1049
+ name: {},
1050
+ labelWidth: {},
1051
+ prop: {},
1052
+ size: {},
1060
1053
  disabled: { type: Boolean }
1061
1054
  },
1062
1055
  emits: ["change", "addDiffCount"],
@@ -1069,7 +1062,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1069
1062
  const changeHandler = () => emit("change", props.model);
1070
1063
  const onAddDiffCount = () => emit("addDiffCount");
1071
1064
  return (_ctx, _cache) => {
1072
- return unref(items) && unref(items).length ? (openBlock(), createBlock(unref(TMagicCard), {
1065
+ return items.value && items.value.length ? (openBlock(), createBlock(unref(TMagicCard), {
1073
1066
  key: 0,
1074
1067
  class: "box-card m-form-panel",
1075
1068
  "body-style": { display: expand.value ? "block" : "none" }
@@ -1082,32 +1075,32 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1082
1075
  icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
1083
1076
  onClick: _cache[0] || (_cache[0] = ($event) => expand.value = !expand.value)
1084
1077
  }, null, 8, ["icon"]),
1085
- __props.config && __props.config.extra ? (openBlock(), createElementBlock("span", {
1078
+ _ctx.config && _ctx.config.extra ? (openBlock(), createElementBlock("span", {
1086
1079
  key: 0,
1087
- innerHTML: __props.config.extra,
1080
+ innerHTML: _ctx.config.extra,
1088
1081
  class: "m-form-tip"
1089
- }, null, 8, _hoisted_2$3)) : createCommentVNode("", true),
1082
+ }, null, 8, _hoisted_2$2)) : createCommentVNode("", true),
1090
1083
  renderSlot(_ctx.$slots, "header", {}, () => [
1091
- createTextVNode(toDisplayString(filter(__props.config.title)), 1)
1084
+ createTextVNode(toDisplayString(filter(_ctx.config.title)), 1)
1092
1085
  ])
1093
1086
  ])
1094
1087
  ]),
1095
1088
  default: withCtx(() => [
1096
1089
  createElementVNode("div", null, [
1097
1090
  renderSlot(_ctx.$slots, "default"),
1098
- __props.config.schematic ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
1099
- createElementVNode("div", _hoisted_4$2, [
1100
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item, index) => {
1091
+ _ctx.config.schematic ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1092
+ createElementVNode("div", _hoisted_4$1, [
1093
+ (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
1101
1094
  return openBlock(), createBlock(_sfc_main$v, {
1102
1095
  key: item[unref(mForm)?.keyProp || "__key"] ?? index,
1103
1096
  config: item,
1104
- model: __props.name ? __props.model[__props.name] : __props.model,
1105
- lastValues: __props.name ? __props.lastValues[__props.name] : __props.lastValues,
1106
- "is-compare": __props.isCompare,
1107
- prop: __props.prop,
1108
- size: __props.size,
1109
- disabled: __props.disabled,
1110
- "label-width": __props.config.labelWidth || __props.labelWidth,
1097
+ model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
1098
+ lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
1099
+ "is-compare": _ctx.isCompare,
1100
+ prop: _ctx.prop,
1101
+ size: _ctx.size,
1102
+ disabled: _ctx.disabled,
1103
+ "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1111
1104
  onChange: changeHandler,
1112
1105
  onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
1113
1106
  }, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
@@ -1115,19 +1108,19 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1115
1108
  ]),
1116
1109
  createElementVNode("img", {
1117
1110
  class: "m-form-schematic",
1118
- src: __props.config.schematic
1119
- }, null, 8, _hoisted_5$1)
1120
- ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(items), (item, index) => {
1111
+ src: _ctx.config.schematic
1112
+ }, null, 8, _hoisted_5)
1113
+ ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(items.value, (item, index) => {
1121
1114
  return openBlock(), createBlock(_sfc_main$v, {
1122
1115
  key: item[unref(mForm)?.keyProp || "__key"] ?? index,
1123
1116
  config: item,
1124
- model: __props.name ? __props.model[__props.name] : __props.model,
1125
- lastValues: __props.name ? __props.lastValues[__props.name] : __props.lastValues,
1126
- "is-compare": __props.isCompare,
1127
- prop: __props.prop,
1128
- size: __props.size,
1129
- disabled: __props.disabled,
1130
- "label-width": __props.config.labelWidth || __props.labelWidth,
1117
+ model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
1118
+ lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
1119
+ "is-compare": _ctx.isCompare,
1120
+ prop: _ctx.prop,
1121
+ size: _ctx.size,
1122
+ disabled: _ctx.disabled,
1123
+ "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1131
1124
  onChange: changeHandler,
1132
1125
  onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
1133
1126
  }, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
@@ -1140,21 +1133,21 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1140
1133
  }
1141
1134
  });
1142
1135
 
1143
- const __default__$q = defineComponent({
1144
- name: "MFormCol"
1145
- });
1146
1136
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
1147
- ...__default__$q,
1137
+ ...{
1138
+ name: "MFormCol"
1139
+ },
1140
+ __name: "Col",
1148
1141
  props: {
1149
- model: null,
1150
- lastValues: null,
1142
+ model: {},
1143
+ lastValues: {},
1151
1144
  isCompare: { type: Boolean },
1152
- config: null,
1153
- labelWidth: null,
1145
+ config: {},
1146
+ labelWidth: {},
1154
1147
  expandMore: { type: Boolean },
1155
- span: null,
1156
- size: null,
1157
- prop: null,
1148
+ span: {},
1149
+ size: {},
1150
+ prop: {},
1158
1151
  disabled: { type: Boolean }
1159
1152
  },
1160
1153
  emits: ["change", "addDiffCount"],
@@ -1165,44 +1158,44 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1165
1158
  const changeHandler = () => emit("change", props.model);
1166
1159
  const onAddDiffCount = () => emit("addDiffCount");
1167
1160
  return (_ctx, _cache) => {
1168
- return withDirectives((openBlock(), createBlock(unref(TMagicCol), { span: __props.span }, {
1161
+ return withDirectives((openBlock(), createBlock(unref(TMagicCol), { span: _ctx.span }, {
1169
1162
  default: withCtx(() => [
1170
1163
  createVNode(_sfc_main$v, {
1171
- model: __props.model,
1172
- lastValues: __props.lastValues,
1173
- "is-compare": __props.isCompare,
1174
- config: __props.config,
1175
- prop: __props.prop,
1176
- "label-width": __props.config.labelWidth || __props.labelWidth,
1177
- "expand-more": __props.expandMore,
1178
- size: __props.size,
1179
- disabled: __props.disabled,
1164
+ model: _ctx.model,
1165
+ lastValues: _ctx.lastValues,
1166
+ "is-compare": _ctx.isCompare,
1167
+ config: _ctx.config,
1168
+ prop: _ctx.prop,
1169
+ "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1170
+ "expand-more": _ctx.expandMore,
1171
+ size: _ctx.size,
1172
+ disabled: _ctx.disabled,
1180
1173
  onChange: changeHandler,
1181
1174
  onAddDiffCount
1182
1175
  }, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "label-width", "expand-more", "size", "disabled"])
1183
1176
  ]),
1184
1177
  _: 1
1185
1178
  }, 8, ["span"])), [
1186
- [vShow, unref(display$1) && __props.config.type !== "hidden"]
1179
+ [vShow, display$1.value && _ctx.config.type !== "hidden"]
1187
1180
  ]);
1188
1181
  };
1189
1182
  }
1190
1183
  });
1191
1184
 
1192
- const __default__$p = defineComponent({
1193
- name: "MFormRow"
1194
- });
1195
1185
  const _sfc_main$p = /* @__PURE__ */ defineComponent({
1196
- ...__default__$p,
1186
+ ...{
1187
+ name: "MFormRow"
1188
+ },
1189
+ __name: "Row",
1197
1190
  props: {
1198
- model: null,
1199
- lastValues: null,
1191
+ model: {},
1192
+ lastValues: {},
1200
1193
  isCompare: { type: Boolean },
1201
- config: null,
1202
- name: null,
1203
- labelWidth: null,
1204
- prop: null,
1205
- size: null,
1194
+ config: {},
1195
+ name: {},
1196
+ labelWidth: {},
1197
+ prop: {},
1198
+ size: {},
1206
1199
  expandMore: { type: Boolean },
1207
1200
  disabled: { type: Boolean }
1208
1201
  },
@@ -1215,19 +1208,19 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1215
1208
  return (_ctx, _cache) => {
1216
1209
  return openBlock(), createBlock(unref(TMagicRow), { gutter: 10 }, {
1217
1210
  default: withCtx(() => [
1218
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.config.items, (col, index) => {
1211
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (col, index) => {
1219
1212
  return openBlock(), createBlock(_sfc_main$q, {
1220
1213
  key: col[unref(mForm)?.keyProp || "__key"] ?? index,
1221
- span: col.span || __props.config.span || 24 / __props.config.items.length,
1214
+ span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
1222
1215
  config: col,
1223
- labelWidth: __props.config.labelWidth || __props.labelWidth,
1224
- expandMore: __props.expandMore,
1225
- model: __props.name ? __props.model[__props.name] : __props.model,
1226
- lastValues: __props.name ? __props.lastValues[__props.name] : __props.lastValues,
1227
- "is-compare": __props.isCompare,
1228
- prop: __props.prop,
1229
- size: __props.size,
1230
- disabled: __props.disabled,
1216
+ labelWidth: _ctx.config.labelWidth || _ctx.labelWidth,
1217
+ expandMore: _ctx.expandMore,
1218
+ model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
1219
+ lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
1220
+ "is-compare": _ctx.isCompare,
1221
+ prop: _ctx.prop,
1222
+ size: _ctx.size,
1223
+ disabled: _ctx.disabled,
1231
1224
  onChange: changeHandler,
1232
1225
  onAddDiffCount
1233
1226
  }, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "lastValues", "is-compare", "prop", "size", "disabled"]);
@@ -1239,19 +1232,19 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1239
1232
  }
1240
1233
  });
1241
1234
 
1242
- const __default__$o = defineComponent({
1243
- name: "MFormStep"
1244
- });
1245
1235
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
1246
- ...__default__$o,
1236
+ ...{
1237
+ name: "MFormStep"
1238
+ },
1239
+ __name: "Step",
1247
1240
  props: {
1248
- model: null,
1249
- lastValues: null,
1241
+ model: {},
1242
+ lastValues: {},
1250
1243
  isCompare: { type: Boolean },
1251
- config: null,
1244
+ config: {},
1252
1245
  stepActive: { default: 1 },
1253
- labelWidth: null,
1254
- size: null,
1246
+ labelWidth: {},
1247
+ size: {},
1255
1248
  disabled: { type: Boolean }
1256
1249
  },
1257
1250
  emits: ["change", "addDiffCount"],
@@ -1275,10 +1268,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1275
1268
  createVNode(unref(TMagicSteps), {
1276
1269
  active: active.value,
1277
1270
  "align-center": "",
1278
- space: __props.config.space
1271
+ space: _ctx.config.space
1279
1272
  }, {
1280
1273
  default: withCtx(() => [
1281
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.config.items, (item, index) => {
1274
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
1282
1275
  return openBlock(), createBlock(unref(TMagicStep), {
1283
1276
  key: item.__key,
1284
1277
  title: item.title,
@@ -1289,20 +1282,20 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1289
1282
  ]),
1290
1283
  _: 1
1291
1284
  }, 8, ["active", "space"]),
1292
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.config.items, (step, index) => {
1285
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (step, index) => {
1293
1286
  return openBlock(), createElementBlock(Fragment, null, [
1294
1287
  (openBlock(true), createElementBlock(Fragment, null, renderList(step.items, (item) => {
1295
1288
  return openBlock(), createElementBlock(Fragment, null, [
1296
1289
  item ? withDirectives((openBlock(), createBlock(_sfc_main$v, {
1297
1290
  key: item[unref(mForm)?.keyProp || "__key"],
1298
1291
  config: item,
1299
- model: step.name ? __props.model[step.name] : __props.model,
1300
- lastValues: step.name ? __props.lastValues[step.name] : __props.lastValues,
1301
- "is-compare": __props.isCompare,
1292
+ model: step.name ? _ctx.model[step.name] : _ctx.model,
1293
+ lastValues: step.name ? _ctx.lastValues[step.name] : _ctx.lastValues,
1294
+ "is-compare": _ctx.isCompare,
1302
1295
  prop: `${step.name}`,
1303
- size: __props.size,
1304
- disabled: __props.disabled,
1305
- "label-width": __props.config.labelWidth || __props.labelWidth,
1296
+ size: _ctx.size,
1297
+ disabled: _ctx.disabled,
1298
+ "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1306
1299
  onChange: changeHandler,
1307
1300
  onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
1308
1301
  }, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"])), [
@@ -1318,42 +1311,36 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1318
1311
  });
1319
1312
 
1320
1313
  const _hoisted_1$6 = ["innerHTML"];
1321
- const _hoisted_2$2 = { class: "el-form-item__content" };
1322
- const _hoisted_3$2 = ["innerHTML"];
1323
- const _hoisted_4$1 = /* @__PURE__ */ createTextVNode("添加");
1324
- const _hoisted_5 = /* @__PURE__ */ createTextVNode("   ");
1325
- const _hoisted_6 = /* @__PURE__ */ createTextVNode("展开配置");
1326
- const _hoisted_7 = /* @__PURE__ */ createTextVNode("导入EXCEL");
1327
- const _hoisted_8 = /* @__PURE__ */ createTextVNode("  ");
1328
- const _hoisted_9 = /* @__PURE__ */ createTextVNode("清空");
1329
- const _hoisted_10 = {
1314
+ const _hoisted_2$1 = { class: "el-form-item__content" };
1315
+ const _hoisted_3 = ["innerHTML"];
1316
+ const _hoisted_4 = {
1330
1317
  key: 1,
1331
1318
  class: "bottom",
1332
1319
  style: { "text-align": "right" }
1333
1320
  };
1334
- const __default__$n = defineComponent({
1335
- name: "MFormTable"
1336
- });
1337
1321
  const _sfc_main$n = /* @__PURE__ */ defineComponent({
1338
- ...__default__$n,
1322
+ ...{
1323
+ name: "MFormTable"
1324
+ },
1325
+ __name: "Table",
1339
1326
  props: {
1340
- model: null,
1327
+ model: {},
1341
1328
  lastValues: { default: () => ({}) },
1342
1329
  isCompare: { type: Boolean, default: false },
1343
- config: null,
1344
- name: null,
1330
+ config: {},
1331
+ name: {},
1345
1332
  prop: { default: "" },
1346
- labelWidth: null,
1333
+ labelWidth: {},
1347
1334
  sort: { type: Boolean },
1348
1335
  disabled: { type: Boolean },
1349
1336
  sortKey: { default: "" },
1350
- text: null,
1351
- size: null,
1337
+ text: {},
1338
+ size: {},
1352
1339
  enableToggleMode: { type: Boolean, default: true },
1353
1340
  showIndex: { type: Boolean, default: true }
1354
1341
  },
1355
1342
  emits: ["change", "select", "addDiffCount"],
1356
- setup(__props, { expose, emit }) {
1343
+ setup(__props, { expose: __expose, emit }) {
1357
1344
  const props = __props;
1358
1345
  let timer = null;
1359
1346
  const mForm = inject("mForm");
@@ -1673,43 +1660,43 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1673
1660
  return `${prop.value}${prop.value ? "." : ""}${index + 1 + pagecontext.value * pagesize.value - 1}`;
1674
1661
  };
1675
1662
  const onAddDiffCount = () => emit("addDiffCount");
1676
- expose({
1663
+ __expose({
1677
1664
  toggleRowSelection
1678
1665
  });
1679
1666
  return (_ctx, _cache) => {
1680
1667
  return openBlock(), createElementBlock("div", {
1681
1668
  ref_key: "mTable",
1682
1669
  ref: mTable,
1683
- class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra": __props.config.itemExtra }])
1670
+ class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra": _ctx.config.itemExtra }])
1684
1671
  }, [
1685
- __props.config.extra ? (openBlock(), createElementBlock("span", {
1672
+ _ctx.config.extra ? (openBlock(), createElementBlock("span", {
1686
1673
  key: 0,
1687
1674
  style: { "color": "rgba(0, 0, 0, 0.45)" },
1688
- innerHTML: __props.config.extra
1675
+ innerHTML: _ctx.config.extra
1689
1676
  }, null, 8, _hoisted_1$6)) : createCommentVNode("", true),
1690
- createElementVNode("div", _hoisted_2$2, [
1677
+ createElementVNode("div", _hoisted_2$1, [
1691
1678
  createVNode(unref(TMagicTooltip), {
1692
1679
  content: "拖拽可排序",
1693
1680
  placement: "left-start",
1694
- disabled: __props.config.dropSort !== true
1681
+ disabled: _ctx.config.dropSort !== true
1695
1682
  }, {
1696
1683
  default: withCtx(() => [
1697
- __props.model[unref(modelName)] ? (openBlock(), createBlock(unref(TMagicTable), {
1684
+ _ctx.model[modelName.value] ? (openBlock(), createBlock(unref(TMagicTable), {
1698
1685
  ref_key: "tMagicTable",
1699
1686
  ref: tMagicTable,
1700
1687
  style: { "width": "100%" },
1701
- "row-key": __props.config.rowKey || "id",
1702
- data: unref(data),
1703
- lastData: unref(lastData),
1704
- border: __props.config.border,
1705
- "max-height": __props.config.maxHeight,
1688
+ "row-key": _ctx.config.rowKey || "id",
1689
+ data: data.value,
1690
+ lastData: lastData.value,
1691
+ border: _ctx.config.border,
1692
+ "max-height": _ctx.config.maxHeight,
1706
1693
  "default-expand-all": true,
1707
1694
  key: updateKey.value,
1708
1695
  onSelect: selectHandle,
1709
1696
  onSortChange: sortChange
1710
1697
  }, {
1711
1698
  default: withCtx(() => [
1712
- __props.config.itemExtra ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1699
+ _ctx.config.itemExtra ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1713
1700
  key: 0,
1714
1701
  fixed: "left",
1715
1702
  width: "30",
@@ -1717,17 +1704,17 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1717
1704
  }, {
1718
1705
  default: withCtx((scope) => [
1719
1706
  createElementVNode("span", {
1720
- innerHTML: itemExtra(__props.config.itemExtra, scope.$index),
1707
+ innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
1721
1708
  class: "m-form-tip"
1722
- }, null, 8, _hoisted_3$2)
1709
+ }, null, 8, _hoisted_3)
1723
1710
  ]),
1724
1711
  _: 1
1725
1712
  })) : createCommentVNode("", true),
1726
1713
  createVNode(unref(TMagicTableColumn), {
1727
1714
  label: "操作",
1728
- width: __props.config.operateColWidth || 55,
1715
+ width: _ctx.config.operateColWidth || 55,
1729
1716
  align: "center",
1730
- fixed: __props.config.fixed === false ? void 0 : "left"
1717
+ fixed: _ctx.config.fixed === false ? void 0 : "left"
1731
1718
  }, {
1732
1719
  default: withCtx((scope) => [
1733
1720
  renderSlot(_ctx.$slots, "operateCol", { scope }),
@@ -1745,7 +1732,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1745
1732
  ]),
1746
1733
  _: 3
1747
1734
  }, 8, ["width", "fixed"]),
1748
- __props.sort && __props.model[unref(modelName)] && __props.model[unref(modelName)].length > 1 ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1735
+ _ctx.sort && _ctx.model[modelName.value] && _ctx.model[modelName.value].length > 1 ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1749
1736
  key: 1,
1750
1737
  label: "排序",
1751
1738
  width: "60"
@@ -1762,7 +1749,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1762
1749
  size: "small",
1763
1750
  type: "primary",
1764
1751
  icon: unref(ArrowUp),
1765
- disabled: __props.disabled,
1752
+ disabled: _ctx.disabled,
1766
1753
  text: "",
1767
1754
  onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
1768
1755
  onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
@@ -1770,7 +1757,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1770
1757
  ]),
1771
1758
  _: 2
1772
1759
  }, 1024)) : createCommentVNode("", true),
1773
- scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== __props.model[unref(modelName)].length - 1 ? (openBlock(), createBlock(unref(TMagicTooltip), {
1760
+ scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== _ctx.model[modelName.value].length - 1 ? (openBlock(), createBlock(unref(TMagicTooltip), {
1774
1761
  key: 1,
1775
1762
  content: "点击下移,双击置底",
1776
1763
  placement: "top"
@@ -1781,7 +1768,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1781
1768
  size: "small",
1782
1769
  type: "primary",
1783
1770
  icon: unref(ArrowDown),
1784
- disabled: __props.disabled,
1771
+ disabled: _ctx.disabled,
1785
1772
  text: "",
1786
1773
  onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
1787
1774
  onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
@@ -1792,14 +1779,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1792
1779
  ]),
1793
1780
  _: 1
1794
1781
  })) : createCommentVNode("", true),
1795
- unref(selection) ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1782
+ selection.value ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1796
1783
  key: 2,
1797
1784
  align: "center",
1798
1785
  "header-align": "center",
1799
1786
  type: "selection",
1800
1787
  width: "45"
1801
1788
  })) : createCommentVNode("", true),
1802
- __props.showIndex && __props.config.showIndex ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1789
+ _ctx.showIndex && _ctx.config.showIndex ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1803
1790
  key: 3,
1804
1791
  width: "60",
1805
1792
  label: "序号"
@@ -1809,7 +1796,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1809
1796
  ]),
1810
1797
  _: 1
1811
1798
  })) : createCommentVNode("", true),
1812
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.config.items, (column, index) => {
1799
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (column, index) => {
1813
1800
  return openBlock(), createElementBlock(Fragment, null, [
1814
1801
  column.type !== "hidden" && display$1(column.display) ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1815
1802
  prop: column.name,
@@ -1818,21 +1805,21 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1818
1805
  sortable: column.sortable,
1819
1806
  "sort-orders": ["ascending", "descending"],
1820
1807
  key: column[unref(mForm)?.keyProp || "__key"] ?? index,
1821
- "class-name": __props.config.dropSort === true ? "el-table__column--dropable" : ""
1808
+ "class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
1822
1809
  }, {
1823
1810
  default: withCtx((scope) => [
1824
1811
  scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$v, {
1825
1812
  key: 0,
1826
1813
  labelWidth: "0",
1827
- disabled: __props.disabled,
1814
+ disabled: _ctx.disabled,
1828
1815
  prop: getProp(scope.$index),
1829
1816
  rules: column.rules,
1830
1817
  config: makeConfig(column, scope.row),
1831
1818
  model: scope.row,
1832
- lastValues: unref(lastData)[scope.$index],
1833
- "is-compare": __props.isCompare,
1834
- size: __props.size,
1835
- onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change", __props.model[unref(modelName)])),
1819
+ lastValues: lastData.value[scope.$index],
1820
+ "is-compare": _ctx.isCompare,
1821
+ size: _ctx.size,
1822
+ onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change", _ctx.model[modelName.value])),
1836
1823
  onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
1837
1824
  }, null, 8, ["disabled", "prop", "rules", "config", "model", "lastValues", "is-compare", "size"])) : createCommentVNode("", true)
1838
1825
  ]),
@@ -1847,21 +1834,21 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1847
1834
  _: 3
1848
1835
  }, 8, ["disabled"]),
1849
1836
  renderSlot(_ctx.$slots, "default"),
1850
- unref(addable) ? (openBlock(), createBlock(unref(TMagicButton), {
1837
+ addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
1851
1838
  key: 0,
1852
1839
  size: "small",
1853
1840
  type: "primary",
1854
- disabled: __props.disabled,
1841
+ disabled: _ctx.disabled,
1855
1842
  plain: "",
1856
1843
  onClick: _cache[2] || (_cache[2] = ($event) => newHandler())
1857
1844
  }, {
1858
1845
  default: withCtx(() => [
1859
- _hoisted_4$1
1846
+ createTextVNode("新增一行")
1860
1847
  ]),
1861
1848
  _: 1
1862
1849
  }, 8, ["disabled"])) : createCommentVNode("", true),
1863
- _hoisted_5,
1864
- __props.enableToggleMode && !isFullscreen.value ? (openBlock(), createBlock(unref(TMagicButton), {
1850
+ createTextVNode("   "),
1851
+ _ctx.enableToggleMode && !isFullscreen.value ? (openBlock(), createBlock(unref(TMagicButton), {
1865
1852
  key: 1,
1866
1853
  icon: unref(Grid),
1867
1854
  size: "small",
@@ -1869,11 +1856,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1869
1856
  onClick: toggleMode
1870
1857
  }, {
1871
1858
  default: withCtx(() => [
1872
- _hoisted_6
1859
+ createTextVNode("展开配置")
1873
1860
  ]),
1874
1861
  _: 1
1875
1862
  }, 8, ["icon"])) : createCommentVNode("", true),
1876
- __props.config.enableFullscreen !== false ? (openBlock(), createBlock(unref(TMagicButton), {
1863
+ _ctx.config.enableFullscreen !== false ? (openBlock(), createBlock(unref(TMagicButton), {
1877
1864
  key: 2,
1878
1865
  icon: unref(FullScreen),
1879
1866
  size: "small",
@@ -1885,13 +1872,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1885
1872
  ]),
1886
1873
  _: 1
1887
1874
  }, 8, ["icon"])) : createCommentVNode("", true),
1888
- unref(importable) ? (openBlock(), createBlock(unref(TMagicUpload), {
1875
+ importable.value ? (openBlock(), createBlock(unref(TMagicUpload), {
1889
1876
  key: 3,
1890
1877
  style: { "display": "inline-block" },
1891
1878
  ref_key: "excelBtn",
1892
1879
  ref: excelBtn,
1893
1880
  action: "/noop",
1894
- disabled: __props.disabled,
1881
+ disabled: _ctx.disabled,
1895
1882
  "on-change": excelHandler,
1896
1883
  "auto-upload": false
1897
1884
  }, {
@@ -1899,40 +1886,40 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1899
1886
  createVNode(unref(TMagicButton), {
1900
1887
  size: "small",
1901
1888
  type: "success",
1902
- disabled: __props.disabled,
1889
+ disabled: _ctx.disabled,
1903
1890
  plain: ""
1904
1891
  }, {
1905
1892
  default: withCtx(() => [
1906
- _hoisted_7
1893
+ createTextVNode("导入EXCEL")
1907
1894
  ]),
1908
1895
  _: 1
1909
1896
  }, 8, ["disabled"])
1910
1897
  ]),
1911
1898
  _: 1
1912
1899
  }, 8, ["disabled"])) : createCommentVNode("", true),
1913
- _hoisted_8,
1914
- unref(importable) ? (openBlock(), createBlock(unref(TMagicButton), {
1900
+ createTextVNode("  "),
1901
+ importable.value ? (openBlock(), createBlock(unref(TMagicButton), {
1915
1902
  key: 4,
1916
1903
  size: "small",
1917
1904
  type: "warning",
1918
- disabled: __props.disabled,
1905
+ disabled: _ctx.disabled,
1919
1906
  plain: "",
1920
1907
  onClick: _cache[3] || (_cache[3] = ($event) => clearHandler())
1921
1908
  }, {
1922
1909
  default: withCtx(() => [
1923
- _hoisted_9
1910
+ createTextVNode("清空")
1924
1911
  ]),
1925
1912
  _: 1
1926
1913
  }, 8, ["disabled"])) : createCommentVNode("", true)
1927
1914
  ]),
1928
- __props.config.pagination ? (openBlock(), createElementBlock("div", _hoisted_10, [
1915
+ _ctx.config.pagination ? (openBlock(), createElementBlock("div", _hoisted_4, [
1929
1916
  createVNode(unref(TMagicPagination), {
1930
1917
  layout: "total, sizes, prev, pager, next, jumper",
1931
- "hide-on-single-page": __props.model[unref(modelName)].length < pagesize.value,
1918
+ "hide-on-single-page": _ctx.model[modelName.value].length < pagesize.value,
1932
1919
  "current-page": pagecontext.value + 1,
1933
1920
  "page-sizes": [pagesize.value, 60, 120, 300],
1934
1921
  "page-size": pagesize.value,
1935
- total: __props.model[unref(modelName)].length,
1922
+ total: _ctx.model[modelName.value].length,
1936
1923
  onSizeChange: handleSizeChange,
1937
1924
  onCurrentChange: handleCurrentChange
1938
1925
  }, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total"])
@@ -1942,28 +1929,28 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1942
1929
  }
1943
1930
  });
1944
1931
 
1945
- const __default__$m = defineComponent({
1946
- name: "MFormTabs"
1947
- });
1948
1932
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
1949
- ...__default__$m,
1933
+ ...{
1934
+ name: "MFormTabs"
1935
+ },
1936
+ __name: "Tabs",
1950
1937
  props: {
1951
- model: null,
1938
+ model: {},
1952
1939
  lastValues: { default: () => ({}) },
1953
1940
  isCompare: { type: Boolean, default: false },
1954
- config: null,
1955
- name: null,
1956
- size: null,
1957
- labelWidth: null,
1958
- prop: null,
1941
+ config: {},
1942
+ name: {},
1943
+ size: {},
1944
+ labelWidth: {},
1945
+ prop: {},
1959
1946
  expandMore: { type: Boolean },
1960
1947
  disabled: { type: Boolean }
1961
1948
  },
1962
1949
  emits: ["change", "addDiffCount"],
1963
1950
  setup(__props, { emit }) {
1964
1951
  const props = __props;
1965
- const tabPaneComponent = getConfig$1("components").tabPane;
1966
- const tabsComponent = getConfig$1("components").tabs;
1952
+ const tabPaneComponent = getConfig$1("components")?.tabPane;
1953
+ const tabsComponent = getConfig$1("components")?.tabs;
1967
1954
  const getActive = (mForm2, props2, activeTabName2) => {
1968
1955
  const { config, model, prop } = props2;
1969
1956
  const { active } = config;
@@ -2059,28 +2046,31 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2059
2046
  emit("addDiffCount");
2060
2047
  };
2061
2048
  return (_ctx, _cache) => {
2062
- return openBlock(), createBlock(resolveDynamicComponent(unref(tabsComponent).component), mergeProps(
2049
+ return openBlock(), createBlock(resolveDynamicComponent(unref(tabsComponent)?.component || "el-tabs"), mergeProps(
2063
2050
  {
2064
2051
  modelValue: activeTabName.value,
2065
2052
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabName.value = $event)
2066
2053
  },
2067
- unref(tabsComponent).props({
2068
- type: __props.config.tabType,
2069
- editable: __props.config.editable || false,
2070
- tabPosition: __props.config.tabPosition || "top"
2071
- }),
2054
+ unref(tabsComponent)?.props({
2055
+ type: _ctx.config.tabType,
2056
+ editable: _ctx.config.editable || false,
2057
+ tabPosition: _ctx.config.tabPosition || "top"
2058
+ }) || {},
2072
2059
  {
2073
- class: `tmagic-design-tabs ${__props.config.dynamic ? "magic-form-dynamic-tab" : "magic-form-tab"}`,
2060
+ class: `tmagic-design-tabs ${_ctx.config.dynamic ? "magic-form-dynamic-tab" : "magic-form-tab"}`,
2074
2061
  onTabClick: tabClickHandler,
2075
2062
  onTabAdd,
2076
2063
  onTabRemove
2077
2064
  }
2078
2065
  ), {
2079
2066
  default: withCtx(() => [
2080
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(tabs), (tab, tabIndex) => {
2081
- return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent).component), mergeProps({
2082
- key: tab[unref(mForm)?.keyProp || "__key"] ?? tabIndex
2083
- }, unref(tabPaneComponent).props({ name: filter(tab.status) || tabIndex.toString(), lazy: tab.lazy || false })), {
2067
+ (openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab, tabIndex) => {
2068
+ return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent)?.component || "el-tab-pane"), mergeProps(
2069
+ {
2070
+ key: tab[unref(mForm)?.keyProp || "__key"] ?? tabIndex
2071
+ },
2072
+ unref(tabPaneComponent)?.props({ name: filter(tab.status) || tabIndex.toString(), lazy: tab.lazy || false }) || {}
2073
+ ), {
2084
2074
  label: withCtx(() => [
2085
2075
  createElementVNode("span", null, [
2086
2076
  createTextVNode(toDisplayString(filter(tab.title)), 1),
@@ -2096,14 +2086,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2096
2086
  return openBlock(), createBlock(_sfc_main$v, {
2097
2087
  key: item[unref(mForm)?.keyProp || "__key"],
2098
2088
  config: item,
2099
- disabled: __props.disabled,
2100
- model: __props.config.dynamic ? (__props.name ? __props.model[__props.name] : __props.model)[tabIndex] : tab.name ? (__props.name ? __props.model[__props.name] : __props.model)[tab.name] : __props.name ? __props.model[__props.name] : __props.model,
2101
- "last-values": unref(isEmpty)(__props.lastValues) ? {} : __props.config.dynamic ? (__props.name ? __props.lastValues[__props.name] : __props.lastValues)[tabIndex] : tab.name ? (__props.name ? __props.lastValues[__props.name] : __props.lastValues)[tab.name] : __props.name ? __props.lastValues[__props.name] : __props.lastValues,
2102
- "is-compare": __props.isCompare,
2103
- prop: __props.config.dynamic ? `${__props.prop}${__props.prop ? "." : ""}${String(tabIndex)}` : __props.prop,
2104
- size: __props.size,
2105
- "label-width": tab.labelWidth || __props.labelWidth,
2106
- "expand-more": __props.expandMore,
2089
+ disabled: _ctx.disabled,
2090
+ model: _ctx.config.dynamic ? (_ctx.name ? _ctx.model[_ctx.name] : _ctx.model)[tabIndex] : tab.name ? (_ctx.name ? _ctx.model[_ctx.name] : _ctx.model)[tab.name] : _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
2091
+ "last-values": unref(isEmpty)(_ctx.lastValues) ? {} : _ctx.config.dynamic ? (_ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues)[tabIndex] : tab.name ? (_ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues)[tab.name] : _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
2092
+ "is-compare": _ctx.isCompare,
2093
+ prop: _ctx.config.dynamic ? `${_ctx.prop}${_ctx.prop ? "." : ""}${String(tabIndex)}` : _ctx.prop,
2094
+ size: _ctx.size,
2095
+ "label-width": tab.labelWidth || _ctx.labelWidth,
2096
+ "expand-more": _ctx.expandMore,
2107
2097
  onChange: changeHandler,
2108
2098
  onAddDiffCount: ($event) => onAddDiffCount(tabIndex)
2109
2099
  }, null, 8, ["config", "disabled", "model", "last-values", "is-compare", "prop", "size", "label-width", "expand-more", "onAddDiffCount"]);
@@ -2145,21 +2135,21 @@ const useAddField = (prop) => {
2145
2135
  );
2146
2136
  };
2147
2137
 
2148
- const __default__$l = defineComponent({
2149
- name: "MFormCascader"
2150
- });
2151
2138
  const _sfc_main$l = /* @__PURE__ */ defineComponent({
2152
- ...__default__$l,
2139
+ ...{
2140
+ name: "MFormCascader"
2141
+ },
2142
+ __name: "Cascader",
2153
2143
  props: {
2154
- config: null,
2155
- model: null,
2156
- initValues: null,
2157
- values: null,
2158
- name: null,
2159
- prop: null,
2144
+ config: {},
2145
+ model: {},
2146
+ initValues: {},
2147
+ values: {},
2148
+ name: {},
2149
+ prop: {},
2160
2150
  disabled: { type: Boolean },
2161
- size: null,
2162
- lastValues: null
2151
+ size: {},
2152
+ lastValues: {}
2163
2153
  },
2164
2154
  emits: ["change"],
2165
2155
  setup(__props, { emit }) {
@@ -2215,39 +2205,39 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2215
2205
  };
2216
2206
  return (_ctx, _cache) => {
2217
2207
  return openBlock(), createBlock(unref(TMagicCascader), {
2218
- modelValue: __props.model[__props.name],
2219
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
2208
+ modelValue: _ctx.model[_ctx.name],
2209
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
2220
2210
  ref_key: "tMagicCascader",
2221
2211
  ref: tMagicCascader,
2222
2212
  style: { "width": "100%" },
2223
2213
  clearable: "",
2224
2214
  filterable: "",
2225
- size: __props.size,
2226
- placeholder: __props.config.placeholder,
2227
- disabled: __props.disabled,
2215
+ size: _ctx.size,
2216
+ placeholder: _ctx.config.placeholder,
2217
+ disabled: _ctx.disabled,
2228
2218
  options: unref(options),
2229
- props: { multiple: __props.config.multiple },
2219
+ props: { multiple: _ctx.config.multiple },
2230
2220
  onChange: changeHandler
2231
2221
  }, null, 8, ["modelValue", "size", "placeholder", "disabled", "options", "props"]);
2232
2222
  };
2233
2223
  }
2234
2224
  });
2235
2225
 
2236
- const __default__$k = defineComponent({
2237
- name: "MFormCheckbox"
2238
- });
2239
2226
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
2240
- ...__default__$k,
2227
+ ...{
2228
+ name: "MFormCheckbox"
2229
+ },
2230
+ __name: "Checkbox",
2241
2231
  props: {
2242
- config: null,
2243
- model: null,
2244
- initValues: null,
2245
- values: null,
2246
- name: null,
2247
- prop: null,
2232
+ config: {},
2233
+ model: {},
2234
+ initValues: {},
2235
+ values: {},
2236
+ name: {},
2237
+ prop: {},
2248
2238
  disabled: { type: Boolean },
2249
- size: null,
2250
- lastValues: null
2239
+ size: {},
2240
+ lastValues: {}
2251
2241
  },
2252
2242
  emits: ["change"],
2253
2243
  setup(__props, { emit }) {
@@ -2278,16 +2268,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2278
2268
  };
2279
2269
  return (_ctx, _cache) => {
2280
2270
  return openBlock(), createBlock(unref(TMagicCheckbox), {
2281
- modelValue: __props.model[__props.name],
2282
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
2283
- size: __props.size,
2284
- trueLabel: unref(activeValue),
2285
- falseLabel: unref(inactiveValue),
2286
- disabled: __props.disabled,
2271
+ modelValue: _ctx.model[_ctx.name],
2272
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
2273
+ size: _ctx.size,
2274
+ trueLabel: activeValue.value,
2275
+ falseLabel: inactiveValue.value,
2276
+ disabled: _ctx.disabled,
2287
2277
  onChange: changeHandler
2288
2278
  }, {
2289
2279
  default: withCtx(() => [
2290
- createTextVNode(toDisplayString(__props.config.text), 1)
2280
+ createTextVNode(toDisplayString(_ctx.config.text), 1)
2291
2281
  ]),
2292
2282
  _: 1
2293
2283
  }, 8, ["modelValue", "size", "trueLabel", "falseLabel", "disabled"]);
@@ -2295,21 +2285,21 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2295
2285
  }
2296
2286
  });
2297
2287
 
2298
- const __default__$j = defineComponent({
2299
- name: "MFormCheckGroup"
2300
- });
2301
2288
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
2302
- ...__default__$j,
2289
+ ...{
2290
+ name: "MFormCheckGroup"
2291
+ },
2292
+ __name: "CheckboxGroup",
2303
2293
  props: {
2304
- config: null,
2305
- model: null,
2306
- initValues: null,
2307
- values: null,
2308
- name: null,
2309
- prop: null,
2294
+ config: {},
2295
+ model: {},
2296
+ initValues: {},
2297
+ values: {},
2298
+ name: {},
2299
+ prop: {},
2310
2300
  disabled: { type: Boolean },
2311
- size: null,
2312
- lastValues: null
2301
+ size: {},
2302
+ lastValues: {}
2313
2303
  },
2314
2304
  emits: ["change"],
2315
2305
  setup(__props, { emit }) {
@@ -2331,14 +2321,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2331
2321
  });
2332
2322
  return (_ctx, _cache) => {
2333
2323
  return openBlock(), createBlock(unref(TMagicCheckboxGroup), {
2334
- modelValue: __props.model[__props.name],
2335
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
2336
- size: __props.size,
2337
- disabled: __props.disabled,
2324
+ modelValue: _ctx.model[_ctx.name],
2325
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
2326
+ size: _ctx.size,
2327
+ disabled: _ctx.disabled,
2338
2328
  onChange: changeHandler
2339
2329
  }, {
2340
2330
  default: withCtx(() => [
2341
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(options), (option) => {
2331
+ (openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (option) => {
2342
2332
  return openBlock(), createBlock(unref(TMagicCheckbox), {
2343
2333
  label: option.value,
2344
2334
  value: option.value,
@@ -2358,21 +2348,21 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2358
2348
  }
2359
2349
  });
2360
2350
 
2361
- const __default__$i = defineComponent({
2362
- name: "MFormColorPicker"
2363
- });
2364
2351
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
2365
- ...__default__$i,
2352
+ ...{
2353
+ name: "MFormColorPicker"
2354
+ },
2355
+ __name: "ColorPicker",
2366
2356
  props: {
2367
- config: null,
2368
- model: null,
2369
- initValues: null,
2370
- values: null,
2371
- name: null,
2372
- prop: null,
2357
+ config: {},
2358
+ model: {},
2359
+ initValues: {},
2360
+ values: {},
2361
+ name: {},
2362
+ prop: {},
2373
2363
  disabled: { type: Boolean },
2374
- size: null,
2375
- lastValues: null
2364
+ size: {},
2365
+ lastValues: {}
2376
2366
  },
2377
2367
  emits: ["change"],
2378
2368
  setup(__props, { emit }) {
@@ -2381,10 +2371,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2381
2371
  const changeHandler = (value) => emit("change", value);
2382
2372
  return (_ctx, _cache) => {
2383
2373
  return openBlock(), createBlock(unref(TMagicColorPicker), {
2384
- modelValue: __props.model[__props.name],
2385
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
2386
- size: __props.size,
2387
- disabled: __props.disabled,
2374
+ modelValue: _ctx.model[_ctx.name],
2375
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
2376
+ size: _ctx.size,
2377
+ disabled: _ctx.disabled,
2388
2378
  showAlpha: true,
2389
2379
  onChange: changeHandler
2390
2380
  }, null, 8, ["modelValue", "size", "disabled"]);
@@ -2392,21 +2382,21 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2392
2382
  }
2393
2383
  });
2394
2384
 
2395
- const __default__$h = defineComponent({
2396
- name: "MFormDate"
2397
- });
2398
2385
  const _sfc_main$h = /* @__PURE__ */ defineComponent({
2399
- ...__default__$h,
2386
+ ...{
2387
+ name: "MFormDate"
2388
+ },
2389
+ __name: "Date",
2400
2390
  props: {
2401
- config: null,
2402
- model: null,
2403
- initValues: null,
2404
- values: null,
2405
- name: null,
2406
- prop: null,
2391
+ config: {},
2392
+ model: {},
2393
+ initValues: {},
2394
+ values: {},
2395
+ name: {},
2396
+ prop: {},
2407
2397
  disabled: { type: Boolean },
2408
- size: null,
2409
- lastValues: null
2398
+ size: {},
2399
+ lastValues: {}
2410
2400
  },
2411
2401
  emits: ["change"],
2412
2402
  setup(__props, { emit }) {
@@ -2418,35 +2408,35 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2418
2408
  };
2419
2409
  return (_ctx, _cache) => {
2420
2410
  return openBlock(), createBlock(unref(TMagicDatePicker), {
2421
- modelValue: __props.model[__props.name],
2422
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
2411
+ modelValue: _ctx.model[_ctx.name],
2412
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
2423
2413
  type: "date",
2424
- size: __props.size,
2425
- placeholder: __props.config.placeholder,
2426
- disabled: __props.disabled,
2427
- format: __props.config.format,
2428
- "value-format": __props.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
2414
+ size: _ctx.size,
2415
+ placeholder: _ctx.config.placeholder,
2416
+ disabled: _ctx.disabled,
2417
+ format: _ctx.config.format,
2418
+ "value-format": _ctx.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
2429
2419
  onChange: changeHandler
2430
2420
  }, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format"]);
2431
2421
  };
2432
2422
  }
2433
2423
  });
2434
2424
 
2435
- const __default__$g = defineComponent({
2436
- name: "MFormDateRange"
2437
- });
2438
2425
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
2439
- ...__default__$g,
2426
+ ...{
2427
+ name: "MFormDateRange"
2428
+ },
2429
+ __name: "Daterange",
2440
2430
  props: {
2441
- config: null,
2442
- model: null,
2443
- initValues: null,
2444
- values: null,
2445
- name: null,
2446
- prop: null,
2431
+ config: {},
2432
+ model: {},
2433
+ initValues: {},
2434
+ values: {},
2435
+ name: {},
2436
+ prop: {},
2447
2437
  disabled: { type: Boolean },
2448
- size: null,
2449
- lastValues: null
2438
+ size: {},
2439
+ lastValues: {}
2450
2440
  },
2451
2441
  emits: ["change"],
2452
2442
  setup(__props, { emit }) {
@@ -2524,31 +2514,31 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2524
2514
  "range-separator": "-",
2525
2515
  "start-placeholder": "开始日期",
2526
2516
  "end-placeholder": "结束日期",
2527
- size: __props.size,
2517
+ size: _ctx.size,
2528
2518
  "unlink-panels": true,
2529
- disabled: __props.disabled,
2530
- "default-time": __props.config.defaultTime,
2519
+ disabled: _ctx.disabled,
2520
+ "default-time": _ctx.config.defaultTime,
2531
2521
  onChange: changeHandler
2532
2522
  }, null, 8, ["modelValue", "size", "disabled", "default-time"]);
2533
2523
  };
2534
2524
  }
2535
2525
  });
2536
2526
 
2537
- const __default__$f = defineComponent({
2538
- name: "MFormDateTime"
2539
- });
2540
2527
  const _sfc_main$f = /* @__PURE__ */ defineComponent({
2541
- ...__default__$f,
2528
+ ...{
2529
+ name: "MFormDateTime"
2530
+ },
2531
+ __name: "DateTime",
2542
2532
  props: {
2543
- config: null,
2544
- model: null,
2545
- initValues: null,
2546
- values: null,
2547
- name: null,
2548
- prop: null,
2533
+ config: {},
2534
+ model: {},
2535
+ initValues: {},
2536
+ values: {},
2537
+ name: {},
2538
+ prop: {},
2549
2539
  disabled: { type: Boolean },
2550
- size: null,
2551
- lastValues: null
2540
+ size: {},
2541
+ lastValues: {}
2552
2542
  },
2553
2543
  emits: ["change"],
2554
2544
  setup(__props, { emit }) {
@@ -2567,16 +2557,16 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2567
2557
  };
2568
2558
  return (_ctx, _cache) => {
2569
2559
  return openBlock(), createBlock(unref(TMagicDatePicker), {
2570
- modelValue: __props.model[__props.name],
2571
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
2560
+ modelValue: _ctx.model[_ctx.name],
2561
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
2572
2562
  "popper-class": "magic-datetime-picker-popper",
2573
2563
  type: "datetime",
2574
- size: __props.size,
2575
- placeholder: __props.config.placeholder,
2576
- disabled: __props.disabled,
2577
- format: __props.config.format || "YYYY-MM-DD HH:mm:ss",
2578
- "value-format": __props.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
2579
- "default-time": __props.config.defaultTime,
2564
+ size: _ctx.size,
2565
+ placeholder: _ctx.config.placeholder,
2566
+ disabled: _ctx.disabled,
2567
+ format: _ctx.config.format || "YYYY-MM-DD HH:mm:ss",
2568
+ "value-format": _ctx.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
2569
+ "default-time": _ctx.config.defaultTime,
2580
2570
  onChange: changeHandler
2581
2571
  }, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "default-time"]);
2582
2572
  };
@@ -2584,19 +2574,19 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2584
2574
  });
2585
2575
 
2586
2576
  const _hoisted_1$5 = { key: 0 };
2587
- const __default__$e = defineComponent({
2588
- name: "MFormDisplay"
2589
- });
2590
2577
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
2591
- ...__default__$e,
2578
+ ...{
2579
+ name: "MFormDisplay"
2580
+ },
2581
+ __name: "Display",
2592
2582
  props: {
2593
- config: null,
2594
- model: null,
2595
- initValues: null,
2596
- values: null,
2597
- name: null,
2598
- prop: null,
2599
- lastValues: null
2583
+ config: {},
2584
+ model: {},
2585
+ initValues: {},
2586
+ values: {},
2587
+ name: {},
2588
+ prop: {},
2589
+ lastValues: {}
2600
2590
  },
2601
2591
  setup(__props) {
2602
2592
  const props = __props;
@@ -2605,27 +2595,27 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2605
2595
  }
2606
2596
  useAddField(props.prop);
2607
2597
  return (_ctx, _cache) => {
2608
- return __props.model ? (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(__props.model[__props.name]), 1)) : createCommentVNode("", true);
2598
+ return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(_ctx.model[_ctx.name]), 1)) : createCommentVNode("", true);
2609
2599
  };
2610
2600
  }
2611
2601
  });
2612
2602
 
2613
2603
  const _hoisted_1$4 = { class: "m-fields-dynamic-field" };
2614
- const __default__$d = defineComponent({
2615
- name: "MFormDynamicField"
2616
- });
2617
2604
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
2618
- ...__default__$d,
2605
+ ...{
2606
+ name: "MFormDynamicField"
2607
+ },
2608
+ __name: "DynamicField",
2619
2609
  props: {
2620
- config: null,
2621
- model: null,
2622
- initValues: null,
2623
- values: null,
2624
- name: null,
2625
- prop: null,
2610
+ config: {},
2611
+ model: {},
2612
+ initValues: {},
2613
+ values: {},
2614
+ name: {},
2615
+ prop: {},
2626
2616
  disabled: { type: Boolean },
2627
- size: null,
2628
- lastValues: null
2617
+ size: {},
2618
+ lastValues: {}
2629
2619
  },
2630
2620
  emits: ["change"],
2631
2621
  setup(__props, { emit }) {
@@ -2703,40 +2693,40 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2703
2693
  }
2704
2694
  });
2705
2695
 
2706
- const __default__$c = defineComponent({
2707
- name: "MFormHidden"
2708
- });
2709
2696
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
2710
- ...__default__$c,
2697
+ ...{
2698
+ name: "MFormHidden"
2699
+ },
2700
+ __name: "Hidden",
2711
2701
  props: {
2712
- config: null,
2713
- model: null,
2714
- initValues: null,
2715
- values: null,
2716
- name: null,
2717
- prop: null,
2718
- lastValues: null
2702
+ config: {},
2703
+ model: {},
2704
+ initValues: {},
2705
+ values: {},
2706
+ name: {},
2707
+ prop: {},
2708
+ lastValues: {}
2719
2709
  },
2720
2710
  setup(__props) {
2721
2711
  const props = __props;
2722
2712
  useAddField(props.prop);
2723
2713
  return (_ctx, _cache) => {
2724
- return __props.model ? withDirectives((openBlock(), createElementBlock("input", {
2714
+ return _ctx.model ? withDirectives((openBlock(), createElementBlock("input", {
2725
2715
  key: 0,
2726
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
2716
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
2727
2717
  type: "hidden"
2728
2718
  }, null, 512)), [
2729
- [vModelText, __props.model[__props.name]]
2719
+ [vModelText, _ctx.model[_ctx.name]]
2730
2720
  ]) : createCommentVNode("", true);
2731
2721
  };
2732
2722
  }
2733
2723
  });
2734
2724
 
2735
- const __default__$b = defineComponent({
2736
- name: "MForm"
2737
- });
2738
2725
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
2739
- ...__default__$b,
2726
+ ...{
2727
+ name: "MForm"
2728
+ },
2729
+ __name: "Form",
2740
2730
  props: {
2741
2731
  config: { default: () => [] },
2742
2732
  initValues: { default: () => ({}) },
@@ -2747,14 +2737,15 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2747
2737
  disabled: { type: Boolean, default: false },
2748
2738
  height: { default: "auto" },
2749
2739
  stepActive: { default: 1 },
2750
- size: null,
2740
+ size: {},
2751
2741
  inline: { type: Boolean, default: false },
2752
2742
  labelPosition: { default: "right" },
2753
2743
  keyProp: { default: "__key" },
2754
- popperClass: null
2744
+ popperClass: {},
2745
+ extendState: {}
2755
2746
  },
2756
2747
  emits: ["change", "field-input", "field-change"],
2757
- setup(__props, { expose, emit }) {
2748
+ setup(__props, { expose: __expose, emit }) {
2758
2749
  const props = __props;
2759
2750
  const tMagicForm = ref();
2760
2751
  const initialized = ref(false);
@@ -2786,7 +2777,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2786
2777
  }
2787
2778
  }
2788
2779
  });
2789
- watchEffect(() => {
2780
+ watchEffect(async () => {
2790
2781
  formState.initValues = props.initValues;
2791
2782
  formState.lastValues = props.lastValues;
2792
2783
  formState.isCompare = props.isCompare;
@@ -2794,6 +2785,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2794
2785
  formState.keyProp = props.keyProp;
2795
2786
  formState.popperClass = props.popperClass;
2796
2787
  formState.parentValues = props.parentValues;
2788
+ if (typeof props.extendState === "function") {
2789
+ const state = await props.extendState(formState) || {};
2790
+ Object.entries(state).forEach(([key, value]) => {
2791
+ formState[key] = value;
2792
+ });
2793
+ }
2797
2794
  });
2798
2795
  provide("mForm", formState);
2799
2796
  watch(
@@ -2824,7 +2821,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2824
2821
  const changeHandler = () => {
2825
2822
  emit("change", values.value);
2826
2823
  };
2827
- expose({
2824
+ __expose({
2828
2825
  values,
2829
2826
  lastValuesProcessed,
2830
2827
  formState,
@@ -2857,23 +2854,23 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2857
2854
  ref_key: "tMagicForm",
2858
2855
  ref: tMagicForm,
2859
2856
  model: values.value,
2860
- "label-width": __props.labelWidth,
2861
- style: normalizeStyle(`height: ${__props.height}`),
2862
- inline: __props.inline,
2863
- "label-position": __props.labelPosition
2857
+ "label-width": _ctx.labelWidth,
2858
+ style: normalizeStyle(`height: ${_ctx.height}`),
2859
+ inline: _ctx.inline,
2860
+ "label-position": _ctx.labelPosition
2864
2861
  }, {
2865
2862
  default: withCtx(() => [
2866
- initialized.value && Array.isArray(__props.config) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.config, (item, index) => {
2863
+ initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.config, (item, index) => {
2867
2864
  return openBlock(), createBlock(_sfc_main$v, {
2868
- disabled: __props.disabled,
2869
- key: item[__props.keyProp] ?? index,
2865
+ disabled: _ctx.disabled,
2866
+ key: item[_ctx.keyProp] ?? index,
2870
2867
  config: item,
2871
2868
  model: values.value,
2872
2869
  "last-values": lastValuesProcessed.value,
2873
- "is-compare": __props.isCompare,
2874
- "label-width": item.labelWidth || __props.labelWidth,
2875
- "step-active": __props.stepActive,
2876
- size: __props.size,
2870
+ "is-compare": _ctx.isCompare,
2871
+ "label-width": item.labelWidth || _ctx.labelWidth,
2872
+ "step-active": _ctx.stepActive,
2873
+ size: _ctx.size,
2877
2874
  onChange: changeHandler
2878
2875
  }, null, 8, ["disabled", "config", "model", "last-values", "is-compare", "label-width", "step-active", "size"]);
2879
2876
  }), 128)) : createCommentVNode("", true)
@@ -2885,29 +2882,26 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2885
2882
  });
2886
2883
 
2887
2884
  const _hoisted_1$3 = { style: { "min-height": "1px" } };
2888
- const _hoisted_2$1 = /* @__PURE__ */ createTextVNode("取 消");
2889
- const _hoisted_3$1 = /* @__PURE__ */ createTextVNode("上一步");
2890
- const _hoisted_4 = /* @__PURE__ */ createTextVNode("下一步");
2891
- const __default__$a = defineComponent({
2892
- name: "MFormDialog"
2893
- });
2894
2885
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
2895
- ...__default__$a,
2886
+ ...{
2887
+ name: "MFormDialog"
2888
+ },
2889
+ __name: "FormDialog",
2896
2890
  props: {
2897
2891
  config: { default: () => [] },
2898
2892
  values: { default: () => ({}) },
2899
- parentValues: null,
2900
- width: null,
2901
- labelWidth: null,
2893
+ parentValues: {},
2894
+ width: {},
2895
+ labelWidth: {},
2902
2896
  fullscreen: { type: Boolean },
2903
2897
  disabled: { type: Boolean },
2904
- title: null,
2905
- zIndex: null,
2906
- size: null,
2898
+ title: {},
2899
+ zIndex: {},
2900
+ size: {},
2907
2901
  confirmText: { default: "确定" }
2908
2902
  },
2909
2903
  emits: ["close", "submit", "error", "change"],
2910
- setup(__props, { expose, emit }) {
2904
+ setup(__props, { expose: __expose, emit }) {
2911
2905
  const props = __props;
2912
2906
  const form = ref();
2913
2907
  const dialogVisible = ref(false);
@@ -2956,7 +2950,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2956
2950
  const changeHandler = (value) => {
2957
2951
  emit("change", value);
2958
2952
  };
2959
- expose({
2953
+ __expose({
2960
2954
  form,
2961
2955
  saveFetch,
2962
2956
  dialogVisible,
@@ -2970,10 +2964,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2970
2964
  class: "m-form-dialog",
2971
2965
  top: "20px",
2972
2966
  "append-to-body": "",
2973
- title: __props.title,
2974
- width: __props.width,
2975
- zIndex: __props.zIndex,
2976
- fullscreen: __props.fullscreen,
2967
+ title: _ctx.title,
2968
+ width: _ctx.width,
2969
+ zIndex: _ctx.zIndex,
2970
+ fullscreen: _ctx.fullscreen,
2977
2971
  "close-on-click-modal": false,
2978
2972
  onClose: closeHandler
2979
2973
  }, {
@@ -2999,29 +2993,29 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2999
2993
  size: "small"
3000
2994
  }, {
3001
2995
  default: withCtx(() => [
3002
- _hoisted_2$1
2996
+ createTextVNode("取 消")
3003
2997
  ]),
3004
2998
  _: 1
3005
2999
  }),
3006
- unref(hasStep) && stepActive.value > 1 ? (openBlock(), createBlock(unref(TMagicButton), {
3000
+ hasStep.value && stepActive.value > 1 ? (openBlock(), createBlock(unref(TMagicButton), {
3007
3001
  key: 0,
3008
3002
  type: "info",
3009
3003
  size: "small",
3010
3004
  onClick: preStep
3011
3005
  }, {
3012
3006
  default: withCtx(() => [
3013
- _hoisted_3$1
3007
+ createTextVNode("上一步")
3014
3008
  ]),
3015
3009
  _: 1
3016
3010
  })) : createCommentVNode("", true),
3017
- unref(hasStep) && unref(stepCount) > stepActive.value ? (openBlock(), createBlock(unref(TMagicButton), {
3011
+ hasStep.value && stepCount.value > stepActive.value ? (openBlock(), createBlock(unref(TMagicButton), {
3018
3012
  key: 1,
3019
3013
  type: "info",
3020
3014
  size: "small",
3021
3015
  onClick: nextStep
3022
3016
  }, {
3023
3017
  default: withCtx(() => [
3024
- _hoisted_4
3018
+ createTextVNode("下一步")
3025
3019
  ]),
3026
3020
  _: 1
3027
3021
  })) : (openBlock(), createBlock(unref(TMagicButton), {
@@ -3032,7 +3026,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3032
3026
  onClick: save
3033
3027
  }, {
3034
3028
  default: withCtx(() => [
3035
- createTextVNode(toDisplayString(__props.confirmText), 1)
3029
+ createTextVNode(toDisplayString(_ctx.confirmText), 1)
3036
3030
  ]),
3037
3031
  _: 1
3038
3032
  }, 8, ["loading"]))
@@ -3055,12 +3049,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3055
3049
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
3056
3050
  ref_key: "form",
3057
3051
  ref: form,
3058
- size: __props.size,
3059
- disabled: __props.disabled,
3060
- config: __props.config,
3061
- "init-values": __props.values,
3062
- "parent-values": __props.parentValues,
3063
- "label-width": __props.labelWidth,
3052
+ size: _ctx.size,
3053
+ disabled: _ctx.disabled,
3054
+ config: _ctx.config,
3055
+ "init-values": _ctx.values,
3056
+ "parent-values": _ctx.parentValues,
3057
+ "label-width": _ctx.labelWidth,
3064
3058
  onChange: changeHandler
3065
3059
  }, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width"]),
3066
3060
  renderSlot(_ctx.$slots, "default")
@@ -3077,22 +3071,21 @@ const _hoisted_2 = {
3077
3071
  key: 2,
3078
3072
  class: "m-fields-link"
3079
3073
  };
3080
- const _hoisted_3 = /* @__PURE__ */ createTextVNode("点击编辑");
3081
- const __default__$9 = defineComponent({
3082
- name: "MFormLink"
3083
- });
3084
3074
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3085
- ...__default__$9,
3075
+ ...{
3076
+ name: "MFormLink"
3077
+ },
3078
+ __name: "Link",
3086
3079
  props: {
3087
- config: null,
3088
- model: null,
3089
- initValues: null,
3090
- values: null,
3091
- name: null,
3092
- prop: null,
3080
+ config: {},
3081
+ model: {},
3082
+ initValues: {},
3083
+ values: {},
3084
+ name: {},
3085
+ prop: {},
3093
3086
  disabled: { type: Boolean },
3094
- size: null,
3095
- lastValues: null
3087
+ size: {},
3088
+ lastValues: {}
3096
3089
  },
3097
3090
  emits: ["change"],
3098
3091
  setup(__props, { emit }) {
@@ -3141,34 +3134,34 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3141
3134
  editor.value && (editor.value.dialogVisible = false);
3142
3135
  };
3143
3136
  return (_ctx, _cache) => {
3144
- return __props.config.href && !__props.disabled ? (openBlock(), createElementBlock("a", {
3137
+ return _ctx.config.href && !_ctx.disabled ? (openBlock(), createElementBlock("a", {
3145
3138
  key: 0,
3146
3139
  target: "_blank",
3147
- href: unref(href),
3148
- style: normalizeStyle(__props.config.css || {})
3149
- }, toDisplayString(unref(displayText)), 13, _hoisted_1$2)) : __props.config.href && __props.disabled ? (openBlock(), createElementBlock("span", {
3140
+ href: href.value,
3141
+ style: normalizeStyle(_ctx.config.css || {})
3142
+ }, toDisplayString(displayText.value), 13, _hoisted_1$2)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock("span", {
3150
3143
  key: 1,
3151
- style: normalizeStyle(__props.config.disabledCss || {})
3152
- }, toDisplayString(unref(displayText)), 5)) : (openBlock(), createElementBlock("div", _hoisted_2, [
3144
+ style: normalizeStyle(_ctx.config.disabledCss || {})
3145
+ }, toDisplayString(displayText.value), 5)) : (openBlock(), createElementBlock("div", _hoisted_2, [
3153
3146
  createVNode(unref(TMagicButton), {
3154
3147
  text: true,
3155
3148
  type: "primary",
3156
3149
  onClick: editHandler
3157
3150
  }, {
3158
3151
  default: withCtx(() => [
3159
- _hoisted_3
3152
+ createTextVNode("点击编辑")
3160
3153
  ]),
3161
3154
  _: 1
3162
3155
  }),
3163
3156
  createVNode(_sfc_main$a, {
3164
3157
  ref_key: "editor",
3165
3158
  ref: editor,
3166
- title: __props.config.formTitle || "编辑扩展配置",
3167
- width: __props.config.formWidth,
3159
+ title: _ctx.config.formTitle || "编辑扩展配置",
3160
+ width: _ctx.config.formWidth,
3168
3161
  values: formValue.value,
3169
- config: unref(formConfig),
3170
- parentValues: __props.values,
3171
- fullscreen: __props.config.fullscreen,
3162
+ config: formConfig.value,
3163
+ parentValues: _ctx.values,
3164
+ fullscreen: _ctx.config.fullscreen,
3172
3165
  onSubmit: action
3173
3166
  }, null, 8, ["title", "width", "values", "config", "parentValues", "fullscreen"])
3174
3167
  ]));
@@ -3176,21 +3169,21 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3176
3169
  }
3177
3170
  });
3178
3171
 
3179
- const __default__$8 = defineComponent({
3180
- name: "MFormNumber"
3181
- });
3182
3172
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3183
- ...__default__$8,
3173
+ ...{
3174
+ name: "MFormNumber"
3175
+ },
3176
+ __name: "Number",
3184
3177
  props: {
3185
- config: null,
3186
- model: null,
3187
- initValues: null,
3188
- values: null,
3189
- name: null,
3190
- prop: null,
3178
+ config: {},
3179
+ model: {},
3180
+ initValues: {},
3181
+ values: {},
3182
+ name: {},
3183
+ prop: {},
3191
3184
  disabled: { type: Boolean },
3192
- size: null,
3193
- lastValues: null
3185
+ size: {},
3186
+ lastValues: {}
3194
3187
  },
3195
3188
  emits: ["change", "input"],
3196
3189
  setup(__props, { emit }) {
@@ -3205,18 +3198,18 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3205
3198
  mForm?.$emit("field-input", props.prop, v);
3206
3199
  };
3207
3200
  return (_ctx, _cache) => {
3208
- return __props.model ? (openBlock(), createBlock(unref(TMagicInputNumber), {
3201
+ return _ctx.model ? (openBlock(), createBlock(unref(TMagicInputNumber), {
3209
3202
  key: 0,
3210
- modelValue: __props.model[__props.name],
3211
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
3203
+ modelValue: _ctx.model[_ctx.name],
3204
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3212
3205
  clearable: "",
3213
3206
  "controls-position": "right",
3214
- size: __props.size,
3215
- max: __props.config.max,
3216
- min: __props.config.min,
3217
- step: __props.config.step,
3218
- placeholder: __props.config.placeholder,
3219
- disabled: __props.disabled,
3207
+ size: _ctx.size,
3208
+ max: _ctx.config.max,
3209
+ min: _ctx.config.min,
3210
+ step: _ctx.config.step,
3211
+ placeholder: _ctx.config.placeholder,
3212
+ disabled: _ctx.disabled,
3220
3213
  onChange: changeHandler,
3221
3214
  onInput: inputHandler
3222
3215
  }, null, 8, ["modelValue", "size", "max", "min", "step", "placeholder", "disabled"])) : createCommentVNode("", true);
@@ -3224,21 +3217,21 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3224
3217
  }
3225
3218
  });
3226
3219
 
3227
- const __default__$7 = defineComponent({
3228
- name: "MFormRadioGroup"
3229
- });
3230
3220
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3231
- ...__default__$7,
3221
+ ...{
3222
+ name: "MFormRadioGroup"
3223
+ },
3224
+ __name: "RadioGroup",
3232
3225
  props: {
3233
- config: null,
3234
- model: null,
3235
- initValues: null,
3236
- values: null,
3237
- name: null,
3238
- prop: null,
3226
+ config: {},
3227
+ model: {},
3228
+ initValues: {},
3229
+ values: {},
3230
+ name: {},
3231
+ prop: {},
3239
3232
  disabled: { type: Boolean },
3240
- size: null,
3241
- lastValues: null
3233
+ size: {},
3234
+ lastValues: {}
3242
3235
  },
3243
3236
  emits: ["change"],
3244
3237
  setup(__props, { emit }) {
@@ -3248,16 +3241,16 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3248
3241
  };
3249
3242
  useAddField(props.prop);
3250
3243
  return (_ctx, _cache) => {
3251
- return __props.model ? (openBlock(), createBlock(unref(TMagicRadioGroup), {
3244
+ return _ctx.model ? (openBlock(), createBlock(unref(TMagicRadioGroup), {
3252
3245
  key: 0,
3253
- modelValue: __props.model[__props.name],
3254
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
3255
- size: __props.size,
3256
- disabled: __props.disabled,
3246
+ modelValue: _ctx.model[_ctx.name],
3247
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3248
+ size: _ctx.size,
3249
+ disabled: _ctx.disabled,
3257
3250
  onChange: changeHandler
3258
3251
  }, {
3259
3252
  default: withCtx(() => [
3260
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.config.options, (option) => {
3253
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.options, (option) => {
3261
3254
  return openBlock(), createBlock(unref(TMagicRadio), {
3262
3255
  label: option.value,
3263
3256
  value: option.value,
@@ -3276,18 +3269,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3276
3269
  }
3277
3270
  });
3278
3271
 
3279
- const __default__$6 = defineComponent({
3280
- name: "MFormSelectOptionGroups"
3281
- });
3282
3272
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3283
- ...__default__$6,
3273
+ ...{
3274
+ name: "MFormSelectOptionGroups"
3275
+ },
3276
+ __name: "SelectOptionGroups",
3284
3277
  props: {
3285
- options: null
3278
+ options: {}
3286
3279
  },
3287
3280
  setup(__props) {
3288
- const uiComponent = getConfig$1("components").option;
3281
+ const uiComponent = getConfig$1("components")?.option.component || "el-option";
3289
3282
  return (_ctx, _cache) => {
3290
- return openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (group, index) => {
3283
+ return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (group, index) => {
3291
3284
  return openBlock(), createBlock(unref(TMagicOptionGroup), {
3292
3285
  key: index,
3293
3286
  label: group.label,
@@ -3295,7 +3288,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3295
3288
  }, {
3296
3289
  default: withCtx(() => [
3297
3290
  (openBlock(true), createElementBlock(Fragment, null, renderList(group.options, (item, index2) => {
3298
- return openBlock(), createBlock(resolveDynamicComponent(unref(uiComponent).component), {
3291
+ return openBlock(), createBlock(resolveDynamicComponent(unref(uiComponent)), {
3299
3292
  key: index2,
3300
3293
  label: item.label || item.text,
3301
3294
  value: item.value,
@@ -3310,22 +3303,22 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3310
3303
  }
3311
3304
  });
3312
3305
 
3313
- const __default__$5 = defineComponent({
3314
- name: "MFormSelectOptions"
3315
- });
3316
3306
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3317
- ...__default__$5,
3307
+ ...{
3308
+ name: "MFormSelectOptions"
3309
+ },
3310
+ __name: "SelectOptions",
3318
3311
  props: {
3319
- options: null,
3320
- valueKey: null
3312
+ options: {},
3313
+ valueKey: {}
3321
3314
  },
3322
3315
  setup(__props) {
3323
3316
  return (_ctx, _cache) => {
3324
- return openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
3317
+ return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option) => {
3325
3318
  return openBlock(), createBlock(unref(TMagicOption), {
3326
3319
  label: option.text,
3327
3320
  value: option.value,
3328
- key: __props.valueKey ? option.value[__props.valueKey] : option.value,
3321
+ key: _ctx.valueKey ? option.value[_ctx.valueKey] : option.value,
3329
3322
  disabled: option.disabled
3330
3323
  }, null, 8, ["label", "value", "disabled"]);
3331
3324
  }), 128);
@@ -3334,21 +3327,21 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3334
3327
  });
3335
3328
 
3336
3329
  const _hoisted_1$1 = { key: 2 };
3337
- const __default__$4 = defineComponent({
3338
- name: "MFormSelect"
3339
- });
3340
3330
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3341
- ...__default__$4,
3331
+ ...{
3332
+ name: "MFormSelect"
3333
+ },
3334
+ __name: "Select",
3342
3335
  props: {
3343
- config: null,
3344
- model: null,
3345
- initValues: null,
3346
- values: null,
3347
- name: null,
3348
- prop: null,
3336
+ config: {},
3337
+ model: {},
3338
+ initValues: {},
3339
+ values: {},
3340
+ name: {},
3341
+ prop: {},
3349
3342
  disabled: { type: Boolean },
3350
- size: null,
3351
- lastValues: null
3343
+ size: {},
3344
+ lastValues: {}
3352
3345
  },
3353
3346
  emits: ["change"],
3354
3347
  setup(__props, { emit }) {
@@ -3376,12 +3369,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3376
3369
  return value === v;
3377
3370
  };
3378
3371
  const mapOptions = (data) => {
3379
- const { option } = props.config;
3380
- const { text } = option;
3381
- const { value } = option;
3372
+ const {
3373
+ option = {
3374
+ text: "text",
3375
+ value: "value"
3376
+ }
3377
+ } = props.config;
3378
+ const { text = "text", value = "value" } = option;
3382
3379
  return data.map((item) => ({
3383
- text: typeof text === "function" ? text(item) : item[text || "text"],
3384
- value: typeof value === "function" ? value(item) : item[value || "value"]
3380
+ text: typeof text === "function" ? text(item) : item[text],
3381
+ value: typeof value === "function" ? value(item) : item[value]
3385
3382
  }));
3386
3383
  };
3387
3384
  const getOptions = async () => {
@@ -3392,8 +3389,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3392
3389
  }
3393
3390
  loading.value = true;
3394
3391
  let items = [];
3395
- const { config } = props;
3396
- const { option } = config;
3392
+ const { option } = props.config;
3393
+ if (!option)
3394
+ return [];
3397
3395
  const { root = "", totalKey = "total" } = option;
3398
3396
  let { body = {}, url } = option;
3399
3397
  if (typeof url === "function") {
@@ -3440,11 +3438,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3440
3438
  postOptions
3441
3439
  });
3442
3440
  }
3443
- const optionsData = root.split(".").reduce((accumulator, currentValue) => accumulator[currentValue], res);
3444
- const resTotal = globalThis.parseInt(
3445
- totalKey.split(".").reduce((accumulator, currentValue) => accumulator[currentValue], res),
3446
- 10
3447
- );
3441
+ const optionsData = getValueByKeyPath(root, res);
3442
+ const resTotal = globalThis.parseInt(getValueByKeyPath(totalKey, res), 10);
3448
3443
  if (resTotal > 0) {
3449
3444
  total.value = resTotal;
3450
3445
  }
@@ -3493,8 +3488,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3493
3488
  const getInitOption = async () => {
3494
3489
  if (!props.model)
3495
3490
  return [];
3496
- const { config } = props;
3497
- const { option } = config;
3491
+ const { option } = props.config;
3492
+ if (!option)
3493
+ return [];
3498
3494
  const { root = "", initRoot = "" } = option;
3499
3495
  let { initBody = {} } = option;
3500
3496
  let options2 = [];
@@ -3544,7 +3540,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3544
3540
  postOptions
3545
3541
  });
3546
3542
  }
3547
- let initData = (initRoot || root).split(".").reduce((accumulator, currentValue) => accumulator[currentValue], res);
3543
+ let initData = getValueByKeyPath(initRoot || root, res);
3548
3544
  if (initData) {
3549
3545
  if (!Array.isArray(initData)) {
3550
3546
  initData = [initData];
@@ -3649,29 +3645,29 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3649
3645
  const groupOptions = options;
3650
3646
  return (_ctx, _cache) => {
3651
3647
  const _directive_loading = resolveDirective("loading");
3652
- return __props.model ? withDirectives((openBlock(), createBlock(unref(TMagicSelect), {
3648
+ return _ctx.model ? withDirectives((openBlock(), createBlock(unref(TMagicSelect), {
3653
3649
  key: 0,
3654
- modelValue: __props.model[__props.name],
3655
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
3650
+ modelValue: _ctx.model[_ctx.name],
3651
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3656
3652
  class: "m-select",
3657
3653
  ref_key: "tMagicSelect",
3658
3654
  ref: tMagicSelect,
3659
- clearable: typeof __props.config.clearable !== "undefined" ? __props.config.clearable : true,
3660
- filterable: typeof __props.config.filterable !== "undefined" ? __props.config.filterable : true,
3655
+ clearable: typeof _ctx.config.clearable !== "undefined" ? _ctx.config.clearable : true,
3656
+ filterable: typeof _ctx.config.filterable !== "undefined" ? _ctx.config.filterable : true,
3661
3657
  "popper-class": `m-select-popper ${unref(popperClass)}`,
3662
- size: __props.size,
3658
+ size: _ctx.size,
3663
3659
  remote: remote.value,
3664
- placeholder: __props.config.placeholder,
3665
- multiple: __props.config.multiple,
3666
- "value-key": __props.config.valueKey || "value",
3667
- "allow-create": __props.config.allowCreate,
3668
- disabled: __props.disabled,
3669
- "remote-method": __props.config.remote && remoteMethod,
3660
+ placeholder: _ctx.config.placeholder,
3661
+ multiple: _ctx.config.multiple,
3662
+ "value-key": _ctx.config.valueKey || "value",
3663
+ "allow-create": _ctx.config.allowCreate,
3664
+ disabled: _ctx.disabled,
3665
+ "remote-method": _ctx.config.remote && remoteMethod,
3670
3666
  onChange: changeHandler,
3671
3667
  onVisibleChange: visibleHandler
3672
3668
  }, {
3673
3669
  default: withCtx(() => [
3674
- __props.config.group ? (openBlock(), createBlock(_sfc_main$6, {
3670
+ _ctx.config.group ? (openBlock(), createBlock(_sfc_main$6, {
3675
3671
  key: 0,
3676
3672
  options: unref(groupOptions)
3677
3673
  }, null, 8, ["options"])) : (openBlock(), createBlock(_sfc_main$5, {
@@ -3690,21 +3686,21 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3690
3686
  }
3691
3687
  });
3692
3688
 
3693
- const __default__$3 = defineComponent({
3694
- name: "MFormSwitch"
3695
- });
3696
3689
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3697
- ...__default__$3,
3690
+ ...{
3691
+ name: "MFormSwitch"
3692
+ },
3693
+ __name: "Switch",
3698
3694
  props: {
3699
- config: null,
3700
- model: null,
3701
- initValues: null,
3702
- values: null,
3703
- name: null,
3704
- prop: null,
3695
+ config: {},
3696
+ model: {},
3697
+ initValues: {},
3698
+ values: {},
3699
+ name: {},
3700
+ prop: {},
3705
3701
  disabled: { type: Boolean },
3706
- size: null,
3707
- lastValues: null
3702
+ size: {},
3703
+ lastValues: {}
3708
3704
  },
3709
3705
  emits: ["change"],
3710
3706
  setup(__props, { emit }) {
@@ -3735,12 +3731,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3735
3731
  });
3736
3732
  return (_ctx, _cache) => {
3737
3733
  return openBlock(), createBlock(unref(TMagicSwitch), {
3738
- modelValue: __props.model[__props.name],
3739
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
3740
- size: __props.size,
3741
- activeValue: unref(activeValue),
3742
- inactiveValue: unref(inactiveValue),
3743
- disabled: __props.disabled,
3734
+ modelValue: _ctx.model[_ctx.name],
3735
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3736
+ size: _ctx.size,
3737
+ activeValue: activeValue.value,
3738
+ inactiveValue: inactiveValue.value,
3739
+ disabled: _ctx.disabled,
3744
3740
  onChange: changeHandler
3745
3741
  }, null, 8, ["modelValue", "size", "activeValue", "inactiveValue", "disabled"]);
3746
3742
  };
@@ -3748,21 +3744,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3748
3744
  });
3749
3745
 
3750
3746
  const _hoisted_1 = { key: 0 };
3751
- const __default__$2 = defineComponent({
3752
- name: "MFormText"
3753
- });
3754
3747
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3755
- ...__default__$2,
3748
+ ...{
3749
+ name: "MFormText"
3750
+ },
3751
+ __name: "Text",
3756
3752
  props: {
3757
- config: null,
3758
- model: null,
3759
- initValues: null,
3760
- values: null,
3761
- name: null,
3762
- prop: null,
3753
+ config: {},
3754
+ model: {},
3755
+ initValues: {},
3756
+ values: {},
3757
+ name: {},
3758
+ prop: {},
3763
3759
  disabled: { type: Boolean },
3764
- size: null,
3765
- lastValues: null
3760
+ size: {},
3761
+ lastValues: {}
3766
3762
  },
3767
3763
  emits: ["change", "input"],
3768
3764
  setup(__props, { emit }) {
@@ -3839,53 +3835,54 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3839
3835
  };
3840
3836
  return (_ctx, _cache) => {
3841
3837
  return openBlock(), createBlock(unref(TMagicInput), {
3842
- modelValue: __props.model[__props.name],
3843
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
3838
+ modelValue: _ctx.model[_ctx.name],
3839
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3844
3840
  clearable: "",
3845
- size: __props.size,
3846
- placeholder: __props.config.placeholder,
3847
- disabled: __props.disabled,
3841
+ size: _ctx.size,
3842
+ placeholder: _ctx.config.placeholder,
3843
+ disabled: _ctx.disabled,
3848
3844
  onChange: changeHandler,
3849
3845
  onInput: inputHandler,
3850
3846
  onKeyup: _cache[1] || (_cache[1] = ($event) => keyUpHandler($event))
3851
3847
  }, createSlots({ _: 2 }, [
3852
- __props.config.append ? {
3848
+ _ctx.config.append ? {
3853
3849
  name: "append",
3854
3850
  fn: withCtx(() => [
3855
- typeof __props.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(__props.config.append), 1)) : createCommentVNode("", true),
3856
- typeof __props.config.append === "object" && __props.config.append.type === "button" ? (openBlock(), createBlock(unref(TMagicButton), {
3851
+ typeof _ctx.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.config.append), 1)) : createCommentVNode("", true),
3852
+ typeof _ctx.config.append === "object" && _ctx.config.append.type === "button" ? (openBlock(), createBlock(unref(TMagicButton), {
3857
3853
  key: 1,
3858
3854
  style: { "color": "#409eff" },
3859
- size: __props.size,
3855
+ size: _ctx.size,
3860
3856
  onClick: withModifiers(buttonClickHandler, ["prevent"])
3861
3857
  }, {
3862
3858
  default: withCtx(() => [
3863
- createTextVNode(toDisplayString(__props.config.append.text), 1)
3859
+ createTextVNode(toDisplayString(_ctx.config.append.text), 1)
3864
3860
  ]),
3865
3861
  _: 1
3866
3862
  }, 8, ["size", "onClick"])) : createCommentVNode("", true)
3867
- ])
3863
+ ]),
3864
+ key: "0"
3868
3865
  } : void 0
3869
3866
  ]), 1032, ["modelValue", "size", "placeholder", "disabled"]);
3870
3867
  };
3871
3868
  }
3872
3869
  });
3873
3870
 
3874
- const __default__$1 = defineComponent({
3875
- name: "MFormTextarea"
3876
- });
3877
3871
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3878
- ...__default__$1,
3872
+ ...{
3873
+ name: "MFormTextarea"
3874
+ },
3875
+ __name: "Textarea",
3879
3876
  props: {
3880
- config: null,
3881
- model: null,
3882
- initValues: null,
3883
- values: null,
3884
- name: null,
3885
- prop: null,
3877
+ config: {},
3878
+ model: {},
3879
+ initValues: {},
3880
+ values: {},
3881
+ name: {},
3882
+ prop: {},
3886
3883
  disabled: { type: Boolean },
3887
- size: null,
3888
- lastValues: null
3884
+ size: {},
3885
+ lastValues: {}
3889
3886
  },
3890
3887
  emits: ["change", "input"],
3891
3888
  setup(__props, { emit }) {
@@ -3901,13 +3898,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3901
3898
  };
3902
3899
  return (_ctx, _cache) => {
3903
3900
  return openBlock(), createBlock(unref(TMagicInput), {
3904
- modelValue: __props.model[__props.name],
3905
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
3901
+ modelValue: _ctx.model[_ctx.name],
3902
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3906
3903
  type: "textarea",
3907
- size: __props.size,
3904
+ size: _ctx.size,
3908
3905
  clearable: "",
3909
- placeholder: __props.config.placeholder,
3910
- disabled: __props.disabled,
3906
+ placeholder: _ctx.config.placeholder,
3907
+ disabled: _ctx.disabled,
3911
3908
  onChange: changeHandler,
3912
3909
  onInput: inputHandler
3913
3910
  }, null, 8, ["modelValue", "size", "placeholder", "disabled"]);
@@ -3915,21 +3912,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3915
3912
  }
3916
3913
  });
3917
3914
 
3918
- const __default__ = defineComponent({
3919
- name: "MFormTime"
3920
- });
3921
3915
  const _sfc_main = /* @__PURE__ */ defineComponent({
3922
- ...__default__,
3916
+ ...{
3917
+ name: "MFormTime"
3918
+ },
3919
+ __name: "Time",
3923
3920
  props: {
3924
- config: null,
3925
- model: null,
3926
- initValues: null,
3927
- values: null,
3928
- name: null,
3929
- prop: null,
3921
+ config: {},
3922
+ model: {},
3923
+ initValues: {},
3924
+ values: {},
3925
+ name: {},
3926
+ prop: {},
3930
3927
  disabled: { type: Boolean },
3931
- size: null,
3932
- lastValues: null
3928
+ size: {},
3929
+ lastValues: {}
3933
3930
  },
3934
3931
  emits: ["change"],
3935
3932
  setup(__props, { emit }) {
@@ -3940,13 +3937,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3940
3937
  };
3941
3938
  return (_ctx, _cache) => {
3942
3939
  return openBlock(), createBlock(unref(TMagicTimePicker), {
3943
- modelValue: __props.model[__props.name],
3944
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
3945
- "value-format": __props.config.valueFormat || "HH:mm:ss",
3946
- format: __props.config.format || "HH:mm:ss",
3947
- size: __props.size,
3948
- placeholder: __props.config.placeholder,
3949
- disabled: __props.disabled,
3940
+ modelValue: _ctx.model[_ctx.name],
3941
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3942
+ "value-format": _ctx.config.valueFormat || "HH:mm:ss",
3943
+ format: _ctx.config.format || "HH:mm:ss",
3944
+ size: _ctx.size,
3945
+ placeholder: _ctx.config.placeholder,
3946
+ disabled: _ctx.disabled,
3950
3947
  onChange: changeHandler
3951
3948
  }, null, 8, ["modelValue", "value-format", "format", "size", "placeholder", "disabled"]);
3952
3949
  };
@@ -3956,41 +3953,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3956
3953
  const index$1 = '';
3957
3954
 
3958
3955
  const defaultInstallOpt = {};
3959
- const install = (app, opt) => {
3960
- const option = Object.assign(defaultInstallOpt, opt);
3961
- app.config.globalProperties.$MAGIC_FORM = option;
3962
- setConfig(option);
3963
- app.component("m-form", _sfc_main$b);
3964
- app.component("m-form-dialog", _sfc_main$a);
3965
- app.component("m-form-container", _sfc_main$v);
3966
- app.component("m-form-fieldset", _sfc_main$u);
3967
- app.component("m-form-group-list", _sfc_main$s);
3968
- app.component("m-form-panel", _sfc_main$r);
3969
- app.component("m-form-row", _sfc_main$p);
3970
- app.component("m-form-step", _sfc_main$o);
3971
- app.component("m-form-table", _sfc_main$n);
3972
- app.component("m-form-tab", _sfc_main$m);
3973
- app.component("m-fields-text", _sfc_main$2);
3974
- app.component("m-fields-number", _sfc_main$8);
3975
- app.component("m-fields-textarea", _sfc_main$1);
3976
- app.component("m-fields-hidden", _sfc_main$c);
3977
- app.component("m-fields-date", _sfc_main$h);
3978
- app.component("m-fields-datetime", _sfc_main$f);
3979
- app.component("m-fields-daterange", _sfc_main$g);
3980
- app.component("m-fields-time", _sfc_main);
3981
- app.component("m-fields-checkbox", _sfc_main$k);
3982
- app.component("m-fields-switch", _sfc_main$3);
3983
- app.component("m-fields-color-picker", _sfc_main$i);
3984
- app.component("m-fields-checkbox-group", _sfc_main$j);
3985
- app.component("m-fields-radio-group", _sfc_main$7);
3986
- app.component("m-fields-display", _sfc_main$e);
3987
- app.component("m-fields-link", _sfc_main$9);
3988
- app.component("m-fields-select", _sfc_main$4);
3989
- app.component("m-fields-cascader", _sfc_main$l);
3990
- app.component("m-fields-dynamic-field", _sfc_main$d);
3991
- };
3992
3956
  const index = {
3993
- install
3957
+ install(app, opt = {}) {
3958
+ const option = Object.assign(defaultInstallOpt, opt);
3959
+ app.config.globalProperties.$MAGIC_FORM = option;
3960
+ setConfig(option);
3961
+ app.component("m-form", _sfc_main$b);
3962
+ app.component("m-form-dialog", _sfc_main$a);
3963
+ app.component("m-form-container", _sfc_main$v);
3964
+ app.component("m-form-fieldset", _sfc_main$u);
3965
+ app.component("m-form-group-list", _sfc_main$s);
3966
+ app.component("m-form-panel", _sfc_main$r);
3967
+ app.component("m-form-row", _sfc_main$p);
3968
+ app.component("m-form-step", _sfc_main$o);
3969
+ app.component("m-form-table", _sfc_main$n);
3970
+ app.component("m-form-tab", _sfc_main$m);
3971
+ app.component("m-fields-text", _sfc_main$2);
3972
+ app.component("m-fields-number", _sfc_main$8);
3973
+ app.component("m-fields-textarea", _sfc_main$1);
3974
+ app.component("m-fields-hidden", _sfc_main$c);
3975
+ app.component("m-fields-date", _sfc_main$h);
3976
+ app.component("m-fields-datetime", _sfc_main$f);
3977
+ app.component("m-fields-daterange", _sfc_main$g);
3978
+ app.component("m-fields-time", _sfc_main);
3979
+ app.component("m-fields-checkbox", _sfc_main$k);
3980
+ app.component("m-fields-switch", _sfc_main$3);
3981
+ app.component("m-fields-color-picker", _sfc_main$i);
3982
+ app.component("m-fields-checkbox-group", _sfc_main$j);
3983
+ app.component("m-fields-radio-group", _sfc_main$7);
3984
+ app.component("m-fields-display", _sfc_main$e);
3985
+ app.component("m-fields-link", _sfc_main$9);
3986
+ app.component("m-fields-select", _sfc_main$4);
3987
+ app.component("m-fields-cascader", _sfc_main$l);
3988
+ app.component("m-fields-dynamic-field", _sfc_main$d);
3989
+ }
3994
3990
  };
3995
3991
 
3996
3992
  export { _sfc_main$l as MCascader, _sfc_main$k as MCheckbox, _sfc_main$j as MCheckboxGroup, _sfc_main$i as MColorPicker, _sfc_main$v as MContainer, _sfc_main$h as MDate, _sfc_main$f as MDateTime, _sfc_main$g as MDaterange, _sfc_main$e as MDisplay, _sfc_main$d as MDynamicField, _sfc_main$u as MFieldset, _sfc_main$b as MForm, _sfc_main$a as MFormDialog, _sfc_main$s as MGroupList, _sfc_main$c as MHidden, _sfc_main$9 as MLink, _sfc_main$8 as MNumber, _sfc_main$r as MPanel, _sfc_main$7 as MRadioGroup, _sfc_main$p as MRow, _sfc_main$4 as MSelect, _sfc_main$3 as MSwitch, _sfc_main$n as MTable, _sfc_main$m as MTabs, _sfc_main$2 as MText, _sfc_main$1 as MTextarea, _sfc_main as MTime, createValues, index as default, display, filterFunction, getRules, initValue, useAddField };