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