@tmagic/form 1.5.22 → 1.5.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -411,238 +411,277 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
411
411
  "label-width": itemLabelWidth.value,
412
412
  onChange: onChangeHandler,
413
413
  onAddDiffCount
414
- }, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : type.value && display$1.value && !showDiff.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
415
- createVNode(unref(TMagicFormItem), {
416
- style: normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
417
- class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
418
- prop: itemProp.value,
419
- "label-width": itemLabelWidth.value,
420
- "label-position": _ctx.config.labelPosition,
421
- rules: rule.value
422
- }, {
423
- label: withCtx(() => [
424
- createElementVNode("span", {
425
- innerHTML: type.value === "checkbox" ? "" : text.value,
426
- title: _ctx.config.labelTitle
427
- }, null, 8, _hoisted_2$7)
428
- ]),
429
- default: withCtx(() => [
430
- tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
431
- content: withCtx(() => [
432
- createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_3$5)
433
- ]),
434
- default: withCtx(() => [
435
- (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
436
- key: key(_ctx.config),
437
- size: _ctx.size,
438
- model: _ctx.model,
439
- "last-values": _ctx.lastValues,
440
- config: _ctx.config,
441
- name: name.value,
442
- disabled: disabled.value,
443
- prop: itemProp.value,
444
- onChange: onChangeHandler,
445
- onAddDiffCount
446
- }, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"]))
447
- ]),
448
- _: 1
449
- })) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
450
- key: key(_ctx.config),
451
- size: _ctx.size,
452
- model: _ctx.model,
453
- "last-values": _ctx.lastValues,
454
- config: _ctx.config,
455
- name: name.value,
456
- disabled: disabled.value,
457
- prop: itemProp.value,
458
- onChange: onChangeHandler,
459
- onAddDiffCount
460
- }, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
461
- extra.value && type.value !== "table" ? (openBlock(), createElementBlock("div", {
462
- key: 2,
463
- innerHTML: extra.value,
464
- class: "m-form-tip"
465
- }, null, 8, _hoisted_4$3)) : createCommentVNode("", true)
466
- ]),
467
- _: 1
468
- }, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
469
- _ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
470
- key: 0,
471
- placement: "left"
472
- }, {
473
- content: withCtx(() => [
474
- createElementVNode("div", {
475
- innerHTML: _ctx.config.tip
476
- }, null, 8, _hoisted_5$3)
477
- ]),
478
- default: withCtx(() => [
479
- createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
480
- default: withCtx(() => [
481
- createVNode(unref(WarningFilled))
482
- ]),
483
- _: 1
484
- })
485
- ]),
486
- _: 1
487
- })) : createCommentVNode("", true)
488
- ], 64)) : type.value && display$1.value && showDiff.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
489
- createVNode(unref(TMagicFormItem), {
490
- style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
491
- class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
492
- prop: itemProp.value,
493
- "label-width": itemLabelWidth.value,
494
- "label-position": _ctx.config.labelPosition,
495
- rules: rule.value
496
- }, {
497
- label: withCtx(() => [
498
- createElementVNode("span", {
499
- innerHTML: type.value === "checkbox" ? "" : text.value,
500
- title: _ctx.config.labelTitle
501
- }, null, 8, _hoisted_6$2)
502
- ]),
503
- default: withCtx(() => [
504
- tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
505
- content: withCtx(() => [
506
- createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_7$1)
507
- ]),
508
- default: withCtx(() => [
509
- (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
510
- key: key(_ctx.config),
511
- size: _ctx.size,
512
- model: _ctx.lastValues,
513
- config: _ctx.config,
514
- name: name.value,
515
- disabled: disabled.value,
516
- prop: itemProp.value,
517
- onChange: onChangeHandler
518
- }, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
519
- ]),
520
- _: 1
521
- })) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
522
- key: key(_ctx.config),
523
- size: _ctx.size,
524
- model: _ctx.lastValues,
525
- config: _ctx.config,
526
- name: name.value,
527
- disabled: disabled.value,
528
- prop: itemProp.value,
529
- onChange: onChangeHandler
530
- }, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
531
- extra.value ? (openBlock(), createElementBlock("div", {
532
- key: 2,
533
- innerHTML: extra.value,
534
- class: "m-form-tip"
535
- }, null, 8, _hoisted_8$1)) : createCommentVNode("", true)
536
- ]),
537
- _: 1
538
- }, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
539
- _ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
540
- key: 0,
541
- placement: "left"
542
- }, {
543
- content: withCtx(() => [
544
- createElementVNode("div", {
545
- innerHTML: _ctx.config.tip
546
- }, null, 8, _hoisted_9)
547
- ]),
548
- default: withCtx(() => [
549
- createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
550
- default: withCtx(() => [
551
- createVNode(unref(WarningFilled))
552
- ]),
553
- _: 1
554
- })
555
- ]),
556
- _: 1
557
- })) : createCommentVNode("", true),
558
- createVNode(unref(TMagicFormItem), {
559
- style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
560
- class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
561
- prop: itemProp.value,
562
- "label-width": itemLabelWidth.value,
563
- "label-position": _ctx.config.labelPosition,
564
- rules: rule.value
565
- }, {
566
- label: withCtx(() => [
567
- createElementVNode("span", {
568
- innerHTML: type.value === "checkbox" ? "" : text.value,
569
- title: _ctx.config.labelTitle
570
- }, null, 8, _hoisted_10)
571
- ]),
572
- default: withCtx(() => [
573
- tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
574
- content: withCtx(() => [
575
- createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_11)
576
- ]),
577
- default: withCtx(() => [
578
- (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
579
- key: key(_ctx.config),
580
- size: _ctx.size,
581
- model: _ctx.model,
582
- config: _ctx.config,
583
- name: name.value,
584
- disabled: disabled.value,
585
- prop: itemProp.value,
586
- onChange: onChangeHandler
587
- }, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
588
- ]),
589
- _: 1
590
- })) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
591
- key: key(_ctx.config),
592
- size: _ctx.size,
593
- model: _ctx.model,
594
- config: _ctx.config,
595
- name: name.value,
596
- disabled: disabled.value,
597
- prop: itemProp.value,
598
- onChange: onChangeHandler
599
- }, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
600
- extra.value ? (openBlock(), createElementBlock("div", {
601
- key: 2,
602
- innerHTML: extra.value,
603
- class: "m-form-tip"
604
- }, null, 8, _hoisted_12)) : createCommentVNode("", true)
605
- ]),
606
- _: 1
607
- }, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
608
- _ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
609
- key: 1,
610
- placement: "left"
611
- }, {
612
- content: withCtx(() => [
613
- createElementVNode("div", {
614
- innerHTML: _ctx.config.tip
615
- }, null, 8, _hoisted_13)
616
- ]),
617
- default: withCtx(() => [
618
- createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
619
- default: withCtx(() => [
620
- createVNode(unref(WarningFilled))
621
- ]),
622
- _: 1
623
- })
624
- ]),
625
- _: 1
626
- })) : createCommentVNode("", true)
627
- ], 64)) : items.value && display$1.value ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
628
- (isValidName() ? _ctx.model[name.value] : _ctx.model) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(items.value, (item) => {
629
- return openBlock(), createBlock(_component_Container, {
630
- key: key(item),
631
- model: isValidName() ? _ctx.model[name.value] : _ctx.model,
632
- "last-values": isValidName() ? _ctx.lastValues[name.value] || {} : _ctx.lastValues,
633
- "is-compare": _ctx.isCompare,
634
- config: item,
635
- size: _ctx.size,
636
- disabled: disabled.value,
637
- "step-active": _ctx.stepActive,
638
- "expand-more": expand.value,
414
+ }, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : type.value && display$1.value && !showDiff.value ? (openBlock(), createElementBlock(
415
+ Fragment,
416
+ { key: 2 },
417
+ [
418
+ createVNode(unref(TMagicFormItem), {
419
+ style: normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
420
+ class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
421
+ prop: itemProp.value,
422
+ "label-width": itemLabelWidth.value,
423
+ "label-position": _ctx.config.labelPosition,
424
+ rules: rule.value
425
+ }, {
426
+ label: withCtx(() => [
427
+ createElementVNode("span", {
428
+ innerHTML: type.value === "checkbox" ? "" : text.value,
429
+ title: _ctx.config.labelTitle
430
+ }, null, 8, _hoisted_2$7)
431
+ ]),
432
+ default: withCtx(() => [
433
+ tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
434
+ content: withCtx(() => [
435
+ createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_3$5)
436
+ ]),
437
+ default: withCtx(() => [
438
+ (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
439
+ key: key(_ctx.config),
440
+ size: _ctx.size,
441
+ model: _ctx.model,
442
+ "last-values": _ctx.lastValues,
443
+ config: _ctx.config,
444
+ name: name.value,
445
+ disabled: disabled.value,
446
+ prop: itemProp.value,
447
+ onChange: onChangeHandler,
448
+ onAddDiffCount
449
+ }, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"]))
450
+ ]),
451
+ _: 1
452
+ /* STABLE */
453
+ })) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
454
+ key: key(_ctx.config),
455
+ size: _ctx.size,
456
+ model: _ctx.model,
457
+ "last-values": _ctx.lastValues,
458
+ config: _ctx.config,
459
+ name: name.value,
460
+ disabled: disabled.value,
461
+ prop: itemProp.value,
462
+ onChange: onChangeHandler,
463
+ onAddDiffCount
464
+ }, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
465
+ extra.value && type.value !== "table" ? (openBlock(), createElementBlock("div", {
466
+ key: 2,
467
+ innerHTML: extra.value,
468
+ class: "m-form-tip"
469
+ }, null, 8, _hoisted_4$3)) : createCommentVNode("v-if", true)
470
+ ]),
471
+ _: 1
472
+ /* STABLE */
473
+ }, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
474
+ _ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
475
+ key: 0,
476
+ placement: "left"
477
+ }, {
478
+ content: withCtx(() => [
479
+ createElementVNode("div", {
480
+ innerHTML: _ctx.config.tip
481
+ }, null, 8, _hoisted_5$3)
482
+ ]),
483
+ default: withCtx(() => [
484
+ createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
485
+ default: withCtx(() => [
486
+ createVNode(unref(WarningFilled))
487
+ ]),
488
+ _: 1
489
+ /* STABLE */
490
+ })
491
+ ]),
492
+ _: 1
493
+ /* STABLE */
494
+ })) : createCommentVNode("v-if", true)
495
+ ],
496
+ 64
497
+ /* STABLE_FRAGMENT */
498
+ )) : type.value && display$1.value && showDiff.value ? (openBlock(), createElementBlock(
499
+ Fragment,
500
+ { key: 3 },
501
+ [
502
+ createCommentVNode(" 对比 "),
503
+ createCommentVNode(" 上次内容 "),
504
+ createVNode(unref(TMagicFormItem), {
505
+ style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
506
+ class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
507
+ prop: itemProp.value,
639
508
  "label-width": itemLabelWidth.value,
509
+ "label-position": _ctx.config.labelPosition,
510
+ rules: rule.value
511
+ }, {
512
+ label: withCtx(() => [
513
+ createElementVNode("span", {
514
+ innerHTML: type.value === "checkbox" ? "" : text.value,
515
+ title: _ctx.config.labelTitle
516
+ }, null, 8, _hoisted_6$2)
517
+ ]),
518
+ default: withCtx(() => [
519
+ tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
520
+ content: withCtx(() => [
521
+ createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_7$1)
522
+ ]),
523
+ default: withCtx(() => [
524
+ (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
525
+ key: key(_ctx.config),
526
+ size: _ctx.size,
527
+ model: _ctx.lastValues,
528
+ config: _ctx.config,
529
+ name: name.value,
530
+ disabled: disabled.value,
531
+ prop: itemProp.value,
532
+ onChange: onChangeHandler
533
+ }, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
534
+ ]),
535
+ _: 1
536
+ /* STABLE */
537
+ })) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
538
+ key: key(_ctx.config),
539
+ size: _ctx.size,
540
+ model: _ctx.lastValues,
541
+ config: _ctx.config,
542
+ name: name.value,
543
+ disabled: disabled.value,
544
+ prop: itemProp.value,
545
+ onChange: onChangeHandler
546
+ }, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
547
+ extra.value ? (openBlock(), createElementBlock("div", {
548
+ key: 2,
549
+ innerHTML: extra.value,
550
+ class: "m-form-tip"
551
+ }, null, 8, _hoisted_8$1)) : createCommentVNode("v-if", true)
552
+ ]),
553
+ _: 1
554
+ /* STABLE */
555
+ }, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
556
+ _ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
557
+ key: 0,
558
+ placement: "left"
559
+ }, {
560
+ content: withCtx(() => [
561
+ createElementVNode("div", {
562
+ innerHTML: _ctx.config.tip
563
+ }, null, 8, _hoisted_9)
564
+ ]),
565
+ default: withCtx(() => [
566
+ createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
567
+ default: withCtx(() => [
568
+ createVNode(unref(WarningFilled))
569
+ ]),
570
+ _: 1
571
+ /* STABLE */
572
+ })
573
+ ]),
574
+ _: 1
575
+ /* STABLE */
576
+ })) : createCommentVNode("v-if", true),
577
+ createCommentVNode(" 当前内容 "),
578
+ createVNode(unref(TMagicFormItem), {
579
+ style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
580
+ class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
640
581
  prop: itemProp.value,
641
- onChange: onChangeHandler,
642
- onAddDiffCount
643
- }, null, 8, ["model", "last-values", "is-compare", "config", "size", "disabled", "step-active", "expand-more", "label-width", "prop"]);
644
- }), 128)) : createCommentVNode("", true)
645
- ], 64)) : createCommentVNode("", true),
582
+ "label-width": itemLabelWidth.value,
583
+ "label-position": _ctx.config.labelPosition,
584
+ rules: rule.value
585
+ }, {
586
+ label: withCtx(() => [
587
+ createElementVNode("span", {
588
+ innerHTML: type.value === "checkbox" ? "" : text.value,
589
+ title: _ctx.config.labelTitle
590
+ }, null, 8, _hoisted_10)
591
+ ]),
592
+ default: withCtx(() => [
593
+ tooltip.value ? (openBlock(), createBlock(unref(TMagicTooltip), { key: 0 }, {
594
+ content: withCtx(() => [
595
+ createElementVNode("div", { innerHTML: tooltip.value }, null, 8, _hoisted_11)
596
+ ]),
597
+ default: withCtx(() => [
598
+ (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
599
+ key: key(_ctx.config),
600
+ size: _ctx.size,
601
+ model: _ctx.model,
602
+ config: _ctx.config,
603
+ name: name.value,
604
+ disabled: disabled.value,
605
+ prop: itemProp.value,
606
+ onChange: onChangeHandler
607
+ }, null, 40, ["size", "model", "config", "name", "disabled", "prop"]))
608
+ ]),
609
+ _: 1
610
+ /* STABLE */
611
+ })) : (openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
612
+ key: key(_ctx.config),
613
+ size: _ctx.size,
614
+ model: _ctx.model,
615
+ config: _ctx.config,
616
+ name: name.value,
617
+ disabled: disabled.value,
618
+ prop: itemProp.value,
619
+ onChange: onChangeHandler
620
+ }, null, 40, ["size", "model", "config", "name", "disabled", "prop"])),
621
+ extra.value ? (openBlock(), createElementBlock("div", {
622
+ key: 2,
623
+ innerHTML: extra.value,
624
+ class: "m-form-tip"
625
+ }, null, 8, _hoisted_12)) : createCommentVNode("v-if", true)
626
+ ]),
627
+ _: 1
628
+ /* STABLE */
629
+ }, 8, ["style", "class", "prop", "label-width", "label-position", "rules"]),
630
+ _ctx.config.tip ? (openBlock(), createBlock(unref(TMagicTooltip), {
631
+ key: 1,
632
+ placement: "left"
633
+ }, {
634
+ content: withCtx(() => [
635
+ createElementVNode("div", {
636
+ innerHTML: _ctx.config.tip
637
+ }, null, 8, _hoisted_13)
638
+ ]),
639
+ default: withCtx(() => [
640
+ createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
641
+ default: withCtx(() => [
642
+ createVNode(unref(WarningFilled))
643
+ ]),
644
+ _: 1
645
+ /* STABLE */
646
+ })
647
+ ]),
648
+ _: 1
649
+ /* STABLE */
650
+ })) : createCommentVNode("v-if", true)
651
+ ],
652
+ 64
653
+ /* STABLE_FRAGMENT */
654
+ )) : items.value && display$1.value ? (openBlock(), createElementBlock(
655
+ Fragment,
656
+ { key: 4 },
657
+ [
658
+ (isValidName() ? _ctx.model[name.value] : _ctx.model) ? (openBlock(true), createElementBlock(
659
+ Fragment,
660
+ { key: 0 },
661
+ renderList(items.value, (item) => {
662
+ return openBlock(), createBlock(_component_Container, {
663
+ key: key(item),
664
+ model: isValidName() ? _ctx.model[name.value] : _ctx.model,
665
+ "last-values": isValidName() ? _ctx.lastValues[name.value] || {} : _ctx.lastValues,
666
+ "is-compare": _ctx.isCompare,
667
+ config: item,
668
+ size: _ctx.size,
669
+ disabled: disabled.value,
670
+ "step-active": _ctx.stepActive,
671
+ "expand-more": expand.value,
672
+ "label-width": itemLabelWidth.value,
673
+ prop: itemProp.value,
674
+ onChange: onChangeHandler,
675
+ onAddDiffCount
676
+ }, null, 8, ["model", "last-values", "is-compare", "config", "size", "disabled", "step-active", "expand-more", "label-width", "prop"]);
677
+ }),
678
+ 128
679
+ /* KEYED_FRAGMENT */
680
+ )) : createCommentVNode("v-if", true)
681
+ ],
682
+ 64
683
+ /* STABLE_FRAGMENT */
684
+ )) : createCommentVNode("v-if", true),
646
685
  _ctx.config.expand && type.value !== "fieldset" ? (openBlock(), createElementBlock("div", _hoisted_14, [
647
686
  createVNode(unref(TMagicButton), {
648
687
  type: "primary",
@@ -652,12 +691,17 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
652
691
  onClick: expandHandler
653
692
  }, {
654
693
  default: withCtx(() => [
655
- createTextVNode(toDisplayString(expand.value ? "收起配置" : "展开更多配置"), 1)
694
+ createTextVNode(
695
+ toDisplayString(expand.value ? "收起配置" : "展开更多配置"),
696
+ 1
697
+ /* TEXT */
698
+ )
656
699
  ]),
657
700
  _: 1
701
+ /* STABLE */
658
702
  })
659
- ])) : createCommentVNode("", true)
660
- ], 14, _hoisted_1$e)) : createCommentVNode("", true);
703
+ ])) : createCommentVNode("v-if", true)
704
+ ], 14, _hoisted_1$e)) : createCommentVNode("v-if", true);
661
705
  };
662
706
  }
663
707
  });
@@ -714,50 +758,85 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
714
758
  const key = (item, index) => item[mForm?.keyProp || "__key"] ?? index;
715
759
  const onAddDiffCount = () => emit("addDiffCount");
716
760
  return (_ctx, _cache) => {
717
- return (name.value ? _ctx.model[name.value] : _ctx.model) ? (openBlock(), createElementBlock("fieldset", {
718
- key: 0,
719
- class: "m-fieldset",
720
- style: normalizeStyle(show.value ? "padding: 15px" : "border: 0")
721
- }, [
722
- name.value && _ctx.config.checkbox ? (openBlock(), createBlock(resolveDynamicComponent(!show.value ? "div" : "legend"), { key: 0 }, {
723
- default: withCtx(() => [
724
- createVNode(unref(TMagicCheckbox), {
725
- modelValue: _ctx.model[name.value].value,
726
- "onUpdate:modelValue": [
727
- _cache[0] || (_cache[0] = ($event) => _ctx.model[name.value].value = $event),
728
- valueChangeHandler
729
- ],
730
- prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${_ctx.config.name}.value`,
731
- "true-value": 1,
732
- "false-value": 0
733
- }, {
734
- default: withCtx(() => [
735
- createElementVNode("span", {
736
- innerHTML: _ctx.config.legend
737
- }, null, 8, _hoisted_1$d),
738
- _ctx.config.extra ? (openBlock(), createElementBlock("span", {
739
- key: 0,
740
- innerHTML: _ctx.config.extra,
741
- class: "m-form-tip"
742
- }, null, 8, _hoisted_2$6)) : createCommentVNode("", true)
743
- ]),
744
- _: 1
745
- }, 8, ["modelValue", "prop"])
746
- ]),
747
- _: 1
748
- })) : (openBlock(), createElementBlock("legend", _hoisted_3$4, [
749
- createElementVNode("span", {
750
- innerHTML: _ctx.config.legend
751
- }, null, 8, _hoisted_4$2),
752
- _ctx.config.extra ? (openBlock(), createElementBlock("span", {
753
- key: 0,
754
- innerHTML: _ctx.config.extra,
755
- class: "m-form-tip"
756
- }, null, 8, _hoisted_5$2)) : createCommentVNode("", true)
757
- ])),
758
- _ctx.config.schematic && show.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
759
- createElementVNode("div", _hoisted_7, [
760
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
761
+ return (name.value ? _ctx.model[name.value] : _ctx.model) ? (openBlock(), createElementBlock(
762
+ "fieldset",
763
+ {
764
+ key: 0,
765
+ class: "m-fieldset",
766
+ style: normalizeStyle(show.value ? "padding: 15px" : "border: 0")
767
+ },
768
+ [
769
+ name.value && _ctx.config.checkbox ? (openBlock(), createBlock(resolveDynamicComponent(!show.value ? "div" : "legend"), { key: 0 }, {
770
+ default: withCtx(() => [
771
+ createVNode(unref(TMagicCheckbox), {
772
+ modelValue: _ctx.model[name.value].value,
773
+ "onUpdate:modelValue": [
774
+ _cache[0] || (_cache[0] = ($event) => _ctx.model[name.value].value = $event),
775
+ valueChangeHandler
776
+ ],
777
+ prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${_ctx.config.name}.value`,
778
+ "true-value": 1,
779
+ "false-value": 0
780
+ }, {
781
+ default: withCtx(() => [
782
+ createElementVNode("span", {
783
+ innerHTML: _ctx.config.legend
784
+ }, null, 8, _hoisted_1$d),
785
+ _ctx.config.extra ? (openBlock(), createElementBlock("span", {
786
+ key: 0,
787
+ innerHTML: _ctx.config.extra,
788
+ class: "m-form-tip"
789
+ }, null, 8, _hoisted_2$6)) : createCommentVNode("v-if", true)
790
+ ]),
791
+ _: 1
792
+ /* STABLE */
793
+ }, 8, ["modelValue", "prop"])
794
+ ]),
795
+ _: 1
796
+ /* STABLE */
797
+ })) : (openBlock(), createElementBlock("legend", _hoisted_3$4, [
798
+ createElementVNode("span", {
799
+ innerHTML: _ctx.config.legend
800
+ }, null, 8, _hoisted_4$2),
801
+ _ctx.config.extra ? (openBlock(), createElementBlock("span", {
802
+ key: 0,
803
+ innerHTML: _ctx.config.extra,
804
+ class: "m-form-tip"
805
+ }, null, 8, _hoisted_5$2)) : createCommentVNode("v-if", true)
806
+ ])),
807
+ _ctx.config.schematic && show.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
808
+ createElementVNode("div", _hoisted_7, [
809
+ (openBlock(true), createElementBlock(
810
+ Fragment,
811
+ null,
812
+ renderList(_ctx.config.items, (item, index) => {
813
+ return openBlock(), createBlock(_sfc_main$x, {
814
+ key: key(item, index),
815
+ model: name.value ? _ctx.model[name.value] : _ctx.model,
816
+ lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
817
+ "is-compare": _ctx.isCompare,
818
+ rules: name.value ? _ctx.rules[name.value] : [],
819
+ config: item,
820
+ prop: _ctx.prop,
821
+ disabled: _ctx.disabled,
822
+ labelWidth: lWidth.value,
823
+ size: _ctx.size,
824
+ onChange: changeHandler,
825
+ onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
826
+ }, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "disabled", "labelWidth", "size"]);
827
+ }),
828
+ 128
829
+ /* KEYED_FRAGMENT */
830
+ ))
831
+ ]),
832
+ createElementVNode("img", {
833
+ class: "m-form-schematic",
834
+ src: _ctx.config.schematic
835
+ }, null, 8, _hoisted_8)
836
+ ])) : show.value ? (openBlock(true), createElementBlock(
837
+ Fragment,
838
+ { key: 3 },
839
+ renderList(_ctx.config.items, (item, index) => {
761
840
  return openBlock(), createBlock(_sfc_main$x, {
762
841
  key: key(item, index),
763
842
  model: name.value ? _ctx.model[name.value] : _ctx.model,
@@ -766,35 +845,20 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
766
845
  rules: name.value ? _ctx.rules[name.value] : [],
767
846
  config: item,
768
847
  prop: _ctx.prop,
769
- disabled: _ctx.disabled,
770
848
  labelWidth: lWidth.value,
771
849
  size: _ctx.size,
850
+ disabled: _ctx.disabled,
772
851
  onChange: changeHandler,
773
- onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
774
- }, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "disabled", "labelWidth", "size"]);
775
- }), 128))
776
- ]),
777
- createElementVNode("img", {
778
- class: "m-form-schematic",
779
- src: _ctx.config.schematic
780
- }, null, 8, _hoisted_8)
781
- ])) : show.value ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(_ctx.config.items, (item, index) => {
782
- return openBlock(), createBlock(_sfc_main$x, {
783
- key: key(item, index),
784
- model: name.value ? _ctx.model[name.value] : _ctx.model,
785
- lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
786
- "is-compare": _ctx.isCompare,
787
- rules: name.value ? _ctx.rules[name.value] : [],
788
- config: item,
789
- prop: _ctx.prop,
790
- labelWidth: lWidth.value,
791
- size: _ctx.size,
792
- disabled: _ctx.disabled,
793
- onChange: changeHandler,
794
- onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
795
- }, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "labelWidth", "size", "disabled"]);
796
- }), 128)) : createCommentVNode("", true)
797
- ], 4)) : createCommentVNode("", true);
852
+ onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
853
+ }, null, 8, ["model", "lastValues", "is-compare", "rules", "config", "prop", "labelWidth", "size", "disabled"]);
854
+ }),
855
+ 128
856
+ /* KEYED_FRAGMENT */
857
+ )) : createCommentVNode("v-if", true)
858
+ ],
859
+ 4
860
+ /* STYLE */
861
+ )) : createCommentVNode("v-if", true);
798
862
  };
799
863
  }
800
864
  });
@@ -893,10 +957,16 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
893
957
  expand.value ? (openBlock(), createBlock(unref(CaretBottom), { key: 0 })) : (openBlock(), createBlock(unref(CaretRight), { key: 1 }))
894
958
  ]),
895
959
  _: 1
960
+ /* STABLE */
896
961
  }),
897
- createTextVNode(toDisplayString(title.value), 1)
962
+ createTextVNode(
963
+ toDisplayString(title.value),
964
+ 1
965
+ /* TEXT */
966
+ )
898
967
  ]),
899
968
  _: 1
969
+ /* STABLE */
900
970
  }, 8, ["disabled"]),
901
971
  withDirectives(createVNode(unref(TMagicButton), {
902
972
  type: "danger",
@@ -920,38 +990,47 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
920
990
  default: withCtx(() => _cache[6] || (_cache[6] = [
921
991
  createTextVNode("复制")
922
992
  ])),
923
- _: 1
924
- }, 8, ["icon", "disabled"])) : createCommentVNode("", true),
925
- movable.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
926
- withDirectives(createVNode(unref(TMagicButton), {
927
- link: "",
928
- size: "small",
929
- disabled: _ctx.disabled,
930
- icon: unref(CaretTop),
931
- onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
932
- }, {
933
- default: withCtx(() => _cache[7] || (_cache[7] = [
934
- createTextVNode("上移")
935
- ])),
936
- _: 1
937
- }, 8, ["disabled", "icon"]), [
938
- [vShow, _ctx.index !== 0]
939
- ]),
940
- withDirectives(createVNode(unref(TMagicButton), {
941
- link: "",
942
- size: "small",
943
- disabled: _ctx.disabled,
944
- icon: unref(CaretBottom),
945
- onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
946
- }, {
947
- default: withCtx(() => _cache[8] || (_cache[8] = [
948
- createTextVNode("下移")
949
- ])),
950
- _: 1
951
- }, 8, ["disabled", "icon"]), [
952
- [vShow, _ctx.index !== length.value - 1]
953
- ])
954
- ], 64)) : createCommentVNode("", true),
993
+ _: 1,
994
+ __: [6]
995
+ }, 8, ["icon", "disabled"])) : createCommentVNode("v-if", true),
996
+ movable.value ? (openBlock(), createElementBlock(
997
+ Fragment,
998
+ { key: 1 },
999
+ [
1000
+ withDirectives(createVNode(unref(TMagicButton), {
1001
+ link: "",
1002
+ size: "small",
1003
+ disabled: _ctx.disabled,
1004
+ icon: unref(CaretTop),
1005
+ onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
1006
+ }, {
1007
+ default: withCtx(() => _cache[7] || (_cache[7] = [
1008
+ createTextVNode("上移")
1009
+ ])),
1010
+ _: 1,
1011
+ __: [7]
1012
+ }, 8, ["disabled", "icon"]), [
1013
+ [vShow, _ctx.index !== 0]
1014
+ ]),
1015
+ withDirectives(createVNode(unref(TMagicButton), {
1016
+ link: "",
1017
+ size: "small",
1018
+ disabled: _ctx.disabled,
1019
+ icon: unref(CaretBottom),
1020
+ onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
1021
+ }, {
1022
+ default: withCtx(() => _cache[8] || (_cache[8] = [
1023
+ createTextVNode("下移")
1024
+ ])),
1025
+ _: 1,
1026
+ __: [8]
1027
+ }, 8, ["disabled", "icon"]), [
1028
+ [vShow, _ctx.index !== length.value - 1]
1029
+ ])
1030
+ ],
1031
+ 64
1032
+ /* STABLE_FRAGMENT */
1033
+ )) : createCommentVNode("v-if", true),
955
1034
  _ctx.config.moveSpecifyLocation ? (openBlock(), createBlock(unref(TMagicPopover), {
956
1035
  key: 2,
957
1036
  trigger: "click",
@@ -971,7 +1050,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
971
1050
  default: withCtx(() => _cache[9] || (_cache[9] = [
972
1051
  createTextVNode("移动至")
973
1052
  ])),
974
- _: 1
1053
+ _: 1,
1054
+ __: [9]
975
1055
  }, 8, ["icon", "disabled"])
976
1056
  ]),
977
1057
  default: withCtx(() => [
@@ -997,7 +1077,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
997
1077
  default: withCtx(() => _cache[12] || (_cache[12] = [
998
1078
  createTextVNode("取消")
999
1079
  ])),
1000
- _: 1
1080
+ _: 1,
1081
+ __: [12]
1001
1082
  }),
1002
1083
  createVNode(unref(TMagicButton), {
1003
1084
  size: "small",
@@ -1007,18 +1088,20 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1007
1088
  default: withCtx(() => _cache[13] || (_cache[13] = [
1008
1089
  createTextVNode("确认")
1009
1090
  ])),
1010
- _: 1
1091
+ _: 1,
1092
+ __: [13]
1011
1093
  })
1012
1094
  ])
1013
1095
  ])
1014
1096
  ]),
1015
1097
  _: 1
1016
- }, 8, ["visible"])) : createCommentVNode("", true),
1098
+ /* STABLE */
1099
+ }, 8, ["visible"])) : createCommentVNode("v-if", true),
1017
1100
  itemExtra.value ? (openBlock(), createElementBlock("span", {
1018
1101
  key: 3,
1019
1102
  innerHTML: itemExtra.value,
1020
1103
  class: "m-form-tip"
1021
- }, null, 8, _hoisted_3$3)) : createCommentVNode("", true)
1104
+ }, null, 8, _hoisted_3$3)) : createCommentVNode("v-if", true)
1022
1105
  ]),
1023
1106
  expand.value ? (openBlock(), createBlock(_sfc_main$x, {
1024
1107
  key: 0,
@@ -1032,7 +1115,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1032
1115
  disabled: _ctx.disabled,
1033
1116
  onChange: changeHandler,
1034
1117
  onAddDiffCount: _cache[5] || (_cache[5] = ($event) => onAddDiffCount())
1035
- }, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : createCommentVNode("", true)
1118
+ }, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : createCommentVNode("v-if", true)
1036
1119
  ]);
1037
1120
  };
1038
1121
  }
@@ -1139,29 +1222,41 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1139
1222
  key: 0,
1140
1223
  innerHTML: _ctx.config.extra,
1141
1224
  style: { "color": "rgba(0, 0, 0, 0.45)" }
1142
- }, null, 8, _hoisted_2$4)) : createCommentVNode("", true),
1225
+ }, null, 8, _hoisted_2$4)) : createCommentVNode("v-if", true),
1143
1226
  !_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (openBlock(), createElementBlock("div", _hoisted_3$2, _cache[1] || (_cache[1] = [
1144
- createElementVNode("span", { class: "el-table__empty-text" }, "暂无数据", -1)
1145
- ]))) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(_ctx.model[_ctx.name], (item, index) => {
1146
- return openBlock(), createBlock(_sfc_main$v, {
1147
- key: index,
1148
- model: item,
1149
- lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
1150
- "is-compare": _ctx.isCompare,
1151
- config: _ctx.config,
1152
- prop: _ctx.prop,
1153
- index,
1154
- "label-width": _ctx.labelWidth,
1155
- size: _ctx.size,
1156
- disabled: _ctx.disabled,
1157
- "group-model": _ctx.model[_ctx.name],
1158
- onRemoveItem: removeHandler,
1159
- onCopyItem: copyHandler,
1160
- onSwapItem: swapHandler,
1161
- onChange: changeHandler,
1162
- onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
1163
- }, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "index", "label-width", "size", "disabled", "group-model"]);
1164
- }), 128)),
1227
+ createElementVNode(
1228
+ "span",
1229
+ { class: "el-table__empty-text" },
1230
+ "暂无数据",
1231
+ -1
1232
+ /* CACHED */
1233
+ )
1234
+ ]))) : (openBlock(true), createElementBlock(
1235
+ Fragment,
1236
+ { key: 2 },
1237
+ renderList(_ctx.model[_ctx.name], (item, index) => {
1238
+ return openBlock(), createBlock(_sfc_main$v, {
1239
+ key: index,
1240
+ model: item,
1241
+ lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
1242
+ "is-compare": _ctx.isCompare,
1243
+ config: _ctx.config,
1244
+ prop: _ctx.prop,
1245
+ index,
1246
+ "label-width": _ctx.labelWidth,
1247
+ size: _ctx.size,
1248
+ disabled: _ctx.disabled,
1249
+ "group-model": _ctx.model[_ctx.name],
1250
+ onRemoveItem: removeHandler,
1251
+ onCopyItem: copyHandler,
1252
+ onSwapItem: swapHandler,
1253
+ onChange: changeHandler,
1254
+ onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
1255
+ }, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "index", "label-width", "size", "disabled", "group-model"]);
1256
+ }),
1257
+ 128
1258
+ /* KEYED_FRAGMENT */
1259
+ )),
1165
1260
  addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
1166
1261
  key: 3,
1167
1262
  type: "primary",
@@ -1172,8 +1267,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1172
1267
  default: withCtx(() => _cache[2] || (_cache[2] = [
1173
1268
  createTextVNode("新增")
1174
1269
  ])),
1175
- _: 1
1176
- }, 8, ["size", "disabled"])) : createCommentVNode("", true),
1270
+ _: 1,
1271
+ __: [2]
1272
+ }, 8, ["size", "disabled"])) : createCommentVNode("v-if", true),
1177
1273
  _ctx.config.enableToggleMode ? (openBlock(), createBlock(unref(TMagicButton), {
1178
1274
  key: 4,
1179
1275
  icon: unref(Grid),
@@ -1183,8 +1279,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1183
1279
  default: withCtx(() => _cache[3] || (_cache[3] = [
1184
1280
  createTextVNode("切换为表格")
1185
1281
  ])),
1186
- _: 1
1187
- }, 8, ["icon"])) : createCommentVNode("", true)
1282
+ _: 1,
1283
+ __: [3]
1284
+ }, 8, ["icon"])) : createCommentVNode("v-if", true)
1188
1285
  ]);
1189
1286
  };
1190
1287
  }
@@ -1244,9 +1341,13 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1244
1341
  key: 0,
1245
1342
  innerHTML: _ctx.config.extra,
1246
1343
  class: "m-form-tip"
1247
- }, null, 8, _hoisted_2$3)) : createCommentVNode("", true),
1344
+ }, null, 8, _hoisted_2$3)) : createCommentVNode("v-if", true),
1248
1345
  renderSlot(_ctx.$slots, "header", {}, () => [
1249
- createTextVNode(toDisplayString(filter(_ctx.config.title)), 1)
1346
+ createTextVNode(
1347
+ toDisplayString(filter(_ctx.config.title)),
1348
+ 1
1349
+ /* TEXT */
1350
+ )
1250
1351
  ])
1251
1352
  ])
1252
1353
  ]),
@@ -1255,45 +1356,58 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1255
1356
  renderSlot(_ctx.$slots, "default"),
1256
1357
  _ctx.config.schematic ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1257
1358
  createElementVNode("div", _hoisted_4$1, [
1258
- (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
1259
- return openBlock(), createBlock(_sfc_main$x, {
1260
- key: item[unref(mForm)?.keyProp || "__key"] ?? index,
1261
- config: item,
1262
- model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
1263
- lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
1264
- "is-compare": _ctx.isCompare,
1265
- prop: _ctx.prop,
1266
- size: _ctx.size,
1267
- disabled: _ctx.disabled,
1268
- "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1269
- onChange: changeHandler,
1270
- onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
1271
- }, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
1272
- }), 128))
1359
+ (openBlock(true), createElementBlock(
1360
+ Fragment,
1361
+ null,
1362
+ renderList(items.value, (item, index) => {
1363
+ return openBlock(), createBlock(_sfc_main$x, {
1364
+ key: item[unref(mForm)?.keyProp || "__key"] ?? index,
1365
+ config: item,
1366
+ model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
1367
+ lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
1368
+ "is-compare": _ctx.isCompare,
1369
+ prop: _ctx.prop,
1370
+ size: _ctx.size,
1371
+ disabled: _ctx.disabled,
1372
+ "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1373
+ onChange: changeHandler,
1374
+ onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
1375
+ }, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
1376
+ }),
1377
+ 128
1378
+ /* KEYED_FRAGMENT */
1379
+ ))
1273
1380
  ]),
1274
1381
  createElementVNode("img", {
1275
1382
  class: "m-form-schematic",
1276
1383
  src: _ctx.config.schematic
1277
1384
  }, null, 8, _hoisted_5$1)
1278
- ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(items.value, (item, index) => {
1279
- return openBlock(), createBlock(_sfc_main$x, {
1280
- key: item[unref(mForm)?.keyProp || "__key"] ?? index,
1281
- config: item,
1282
- model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
1283
- lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
1284
- "is-compare": _ctx.isCompare,
1285
- prop: _ctx.prop,
1286
- size: _ctx.size,
1287
- disabled: _ctx.disabled,
1288
- "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1289
- onChange: changeHandler,
1290
- onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
1291
- }, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
1292
- }), 128))
1385
+ ])) : (openBlock(true), createElementBlock(
1386
+ Fragment,
1387
+ { key: 1 },
1388
+ renderList(items.value, (item, index) => {
1389
+ return openBlock(), createBlock(_sfc_main$x, {
1390
+ key: item[unref(mForm)?.keyProp || "__key"] ?? index,
1391
+ config: item,
1392
+ model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
1393
+ lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
1394
+ "is-compare": _ctx.isCompare,
1395
+ prop: _ctx.prop,
1396
+ size: _ctx.size,
1397
+ disabled: _ctx.disabled,
1398
+ "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1399
+ onChange: changeHandler,
1400
+ onAddDiffCount: _cache[2] || (_cache[2] = ($event) => onAddDiffCount())
1401
+ }, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"]);
1402
+ }),
1403
+ 128
1404
+ /* KEYED_FRAGMENT */
1405
+ ))
1293
1406
  ])
1294
1407
  ]),
1295
1408
  _: 3
1296
- }, 8, ["body-style"])) : createCommentVNode("", true);
1409
+ /* FORWARDED */
1410
+ }, 8, ["body-style"])) : createCommentVNode("v-if", true);
1297
1411
  };
1298
1412
  }
1299
1413
  });
@@ -1341,6 +1455,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1341
1455
  }, null, 8, ["model", "lastValues", "is-compare", "config", "prop", "label-width", "expand-more", "size", "disabled"])
1342
1456
  ]),
1343
1457
  _: 1
1458
+ /* STABLE */
1344
1459
  }, 8, ["span"])), [
1345
1460
  [vShow, display$1.value && _ctx.config.type !== "hidden"]
1346
1461
  ]);
@@ -1377,25 +1492,32 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1377
1492
  return (_ctx, _cache) => {
1378
1493
  return openBlock(), createBlock(unref(TMagicRow), { gutter: 10 }, {
1379
1494
  default: withCtx(() => [
1380
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (col, index) => {
1381
- return openBlock(), createBlock(_sfc_main$s, {
1382
- key: col[unref(mForm)?.keyProp || "__key"] ?? index,
1383
- span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
1384
- config: col,
1385
- labelWidth: _ctx.config.labelWidth || _ctx.labelWidth,
1386
- expandMore: _ctx.expandMore,
1387
- model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
1388
- lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
1389
- "is-compare": _ctx.isCompare,
1390
- prop: _ctx.prop,
1391
- size: _ctx.size,
1392
- disabled: _ctx.disabled,
1393
- onChange: changeHandler,
1394
- onAddDiffCount
1395
- }, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "lastValues", "is-compare", "prop", "size", "disabled"]);
1396
- }), 128))
1495
+ (openBlock(true), createElementBlock(
1496
+ Fragment,
1497
+ null,
1498
+ renderList(_ctx.config.items, (col, index) => {
1499
+ return openBlock(), createBlock(_sfc_main$s, {
1500
+ key: col[unref(mForm)?.keyProp || "__key"] ?? index,
1501
+ span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
1502
+ config: col,
1503
+ labelWidth: _ctx.config.labelWidth || _ctx.labelWidth,
1504
+ expandMore: _ctx.expandMore,
1505
+ model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
1506
+ lastValues: _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
1507
+ "is-compare": _ctx.isCompare,
1508
+ prop: _ctx.prop,
1509
+ size: _ctx.size,
1510
+ disabled: _ctx.disabled,
1511
+ onChange: changeHandler,
1512
+ onAddDiffCount
1513
+ }, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "lastValues", "is-compare", "prop", "size", "disabled"]);
1514
+ }),
1515
+ 128
1516
+ /* KEYED_FRAGMENT */
1517
+ ))
1397
1518
  ]),
1398
1519
  _: 1
1520
+ /* STABLE */
1399
1521
  });
1400
1522
  };
1401
1523
  }
@@ -1442,40 +1564,71 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1442
1564
  space: _ctx.config.space
1443
1565
  }, {
1444
1566
  default: withCtx(() => [
1445
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (item, index) => {
1446
- return openBlock(), createBlock(unref(TMagicStep), {
1447
- key: item.__key,
1448
- title: item.title,
1449
- active: active.value,
1450
- onClick: ($event) => stepClick(index)
1451
- }, null, 8, ["title", "active", "onClick"]);
1452
- }), 128))
1567
+ (openBlock(true), createElementBlock(
1568
+ Fragment,
1569
+ null,
1570
+ renderList(_ctx.config.items, (item, index) => {
1571
+ return openBlock(), createBlock(unref(TMagicStep), {
1572
+ key: item.__key,
1573
+ title: item.title,
1574
+ active: active.value,
1575
+ onClick: ($event) => stepClick(index)
1576
+ }, null, 8, ["title", "active", "onClick"]);
1577
+ }),
1578
+ 128
1579
+ /* KEYED_FRAGMENT */
1580
+ ))
1453
1581
  ]),
1454
1582
  _: 1
1583
+ /* STABLE */
1455
1584
  }, 8, ["active", "space"]),
1456
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (step, index) => {
1457
- return openBlock(), createElementBlock(Fragment, null, [
1458
- (openBlock(true), createElementBlock(Fragment, null, renderList(step.items, (item) => {
1459
- return openBlock(), createElementBlock(Fragment, null, [
1460
- item ? withDirectives((openBlock(), createBlock(_sfc_main$x, {
1461
- key: item[unref(mForm)?.keyProp || "__key"],
1462
- config: item,
1463
- model: step.name ? _ctx.model[step.name] : _ctx.model,
1464
- lastValues: step.name ? _ctx.lastValues[step.name] : _ctx.lastValues,
1465
- "is-compare": _ctx.isCompare,
1466
- prop: `${step.name}`,
1467
- size: _ctx.size,
1468
- disabled: _ctx.disabled,
1469
- "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1470
- onChange: changeHandler,
1471
- onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
1472
- }, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"])), [
1473
- [vShow, active.value - 1 === index]
1474
- ]) : createCommentVNode("", true)
1475
- ], 64);
1476
- }), 256))
1477
- ], 64);
1478
- }), 256))
1585
+ (openBlock(true), createElementBlock(
1586
+ Fragment,
1587
+ null,
1588
+ renderList(_ctx.config.items, (step, index) => {
1589
+ return openBlock(), createElementBlock(
1590
+ Fragment,
1591
+ null,
1592
+ [
1593
+ (openBlock(true), createElementBlock(
1594
+ Fragment,
1595
+ null,
1596
+ renderList(step.items, (item) => {
1597
+ return openBlock(), createElementBlock(
1598
+ Fragment,
1599
+ null,
1600
+ [
1601
+ item ? withDirectives((openBlock(), createBlock(_sfc_main$x, {
1602
+ key: item[unref(mForm)?.keyProp || "__key"],
1603
+ config: item,
1604
+ model: step.name ? _ctx.model[step.name] : _ctx.model,
1605
+ lastValues: step.name ? _ctx.lastValues[step.name] : _ctx.lastValues,
1606
+ "is-compare": _ctx.isCompare,
1607
+ prop: `${step.name}`,
1608
+ size: _ctx.size,
1609
+ disabled: _ctx.disabled,
1610
+ "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
1611
+ onChange: changeHandler,
1612
+ onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
1613
+ }, null, 8, ["config", "model", "lastValues", "is-compare", "prop", "size", "disabled", "label-width"])), [
1614
+ [vShow, active.value - 1 === index]
1615
+ ]) : createCommentVNode("v-if", true)
1616
+ ],
1617
+ 64
1618
+ /* STABLE_FRAGMENT */
1619
+ );
1620
+ }),
1621
+ 256
1622
+ /* UNKEYED_FRAGMENT */
1623
+ ))
1624
+ ],
1625
+ 64
1626
+ /* STABLE_FRAGMENT */
1627
+ );
1628
+ }),
1629
+ 256
1630
+ /* UNKEYED_FRAGMENT */
1631
+ ))
1479
1632
  ]);
1480
1633
  };
1481
1634
  }
@@ -1872,276 +2025,329 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1872
2025
  to: "body",
1873
2026
  disabled: !isFullscreen.value
1874
2027
  }, [
1875
- createElementVNode("div", {
1876
- ref_key: "mTable",
1877
- ref: mTable,
1878
- class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra": _ctx.config.itemExtra }])
1879
- }, [
1880
- _ctx.config.extra ? (openBlock(), createElementBlock("span", {
1881
- key: 0,
1882
- style: { "color": "rgba(0, 0, 0, 0.45)" },
1883
- innerHTML: _ctx.config.extra
1884
- }, null, 8, _hoisted_2$2)) : createCommentVNode("", true),
1885
- createVNode(unref(TMagicTooltip), {
1886
- content: "拖拽可排序",
1887
- placement: "left-start",
1888
- disabled: _ctx.config.dropSort !== true
1889
- }, {
1890
- default: withCtx(() => [
1891
- _ctx.model[modelName.value] ? (openBlock(), createBlock(unref(TMagicTable), {
1892
- ref_key: "tMagicTable",
1893
- ref: tMagicTable,
1894
- style: { "width": "100%" },
1895
- "row-key": _ctx.config.rowKey || "id",
1896
- data: data.value,
1897
- lastData: lastData.value,
1898
- border: _ctx.config.border,
1899
- "max-height": _ctx.config.maxHeight,
1900
- "default-expand-all": true,
1901
- key: updateKey.value,
1902
- onSelect: selectHandle,
1903
- onSortChange: sortChange
1904
- }, {
1905
- default: withCtx(() => [
1906
- _ctx.config.itemExtra && !_ctx.config.dropSort ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1907
- key: 0,
1908
- fixed: "left",
1909
- width: "30",
1910
- type: "expand"
1911
- }, {
1912
- default: withCtx((scope) => [
1913
- createElementVNode("span", {
1914
- innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
1915
- class: "m-form-tip"
1916
- }, null, 8, _hoisted_3)
1917
- ]),
1918
- _: 1
1919
- })) : createCommentVNode("", true),
1920
- createVNode(unref(TMagicTableColumn), {
1921
- label: "操作",
1922
- width: _ctx.config.operateColWidth || 100,
1923
- align: "center",
1924
- fixed: _ctx.config.fixed === false ? void 0 : "left"
1925
- }, {
1926
- default: withCtx((scope) => [
1927
- renderSlot(_ctx.$slots, "operateCol", { scope }),
1928
- withDirectives(createVNode(unref(TMagicButton), {
1929
- size: "small",
1930
- type: "danger",
1931
- link: "",
1932
- title: "删除",
1933
- icon: unref(Delete),
1934
- onClick: ($event) => removeHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
1935
- }, null, 8, ["icon", "onClick"]), [
1936
- [vShow, showDelete(scope.$index + 1 + pagecontext.value * pagesize.value - 1)]
2028
+ createElementVNode(
2029
+ "div",
2030
+ {
2031
+ ref_key: "mTable",
2032
+ ref: mTable,
2033
+ class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra": _ctx.config.itemExtra }])
2034
+ },
2035
+ [
2036
+ _ctx.config.extra ? (openBlock(), createElementBlock("span", {
2037
+ key: 0,
2038
+ style: { "color": "rgba(0, 0, 0, 0.45)" },
2039
+ innerHTML: _ctx.config.extra
2040
+ }, null, 8, _hoisted_2$2)) : createCommentVNode("v-if", true),
2041
+ createVNode(unref(TMagicTooltip), {
2042
+ content: "拖拽可排序",
2043
+ placement: "left-start",
2044
+ disabled: _ctx.config.dropSort !== true
2045
+ }, {
2046
+ default: withCtx(() => [
2047
+ _ctx.model[modelName.value] ? (openBlock(), createBlock(unref(TMagicTable), {
2048
+ ref_key: "tMagicTable",
2049
+ ref: tMagicTable,
2050
+ style: { "width": "100%" },
2051
+ "row-key": _ctx.config.rowKey || "id",
2052
+ data: data.value,
2053
+ lastData: lastData.value,
2054
+ border: _ctx.config.border,
2055
+ "max-height": _ctx.config.maxHeight,
2056
+ "default-expand-all": true,
2057
+ key: updateKey.value,
2058
+ onSelect: selectHandle,
2059
+ onSortChange: sortChange
2060
+ }, {
2061
+ default: withCtx(() => [
2062
+ _ctx.config.itemExtra && !_ctx.config.dropSort ? (openBlock(), createBlock(unref(TMagicTableColumn), {
2063
+ key: 0,
2064
+ fixed: "left",
2065
+ width: "30",
2066
+ type: "expand"
2067
+ }, {
2068
+ default: withCtx((scope) => [
2069
+ createElementVNode("span", {
2070
+ innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
2071
+ class: "m-form-tip"
2072
+ }, null, 8, _hoisted_3)
1937
2073
  ]),
1938
- copyable(scope.$index + 1 + pagecontext.value * pagesize.value - 1) ? (openBlock(), createBlock(unref(TMagicButton), {
1939
- key: 0,
1940
- link: "",
1941
- size: "small",
1942
- type: "primary",
1943
- title: "复制",
1944
- icon: unref(DocumentCopy),
1945
- disabled: _ctx.disabled,
1946
- onClick: ($event) => copyHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
1947
- }, null, 8, ["icon", "disabled", "onClick"])) : createCommentVNode("", true)
1948
- ]),
1949
- _: 3
1950
- }, 8, ["width", "fixed"]),
1951
- _ctx.sort && _ctx.model[modelName.value] && _ctx.model[modelName.value].length > 1 ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1952
- key: 1,
1953
- label: "排序",
1954
- width: "60"
1955
- }, {
1956
- default: withCtx((scope) => [
1957
- scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== 0 ? (openBlock(), createBlock(unref(TMagicTooltip), {
1958
- key: 0,
1959
- content: "点击上移,双击置顶",
1960
- placement: "top"
1961
- }, {
1962
- default: withCtx(() => [
1963
- createVNode(unref(TMagicButton), {
1964
- plain: "",
1965
- size: "small",
1966
- type: "primary",
1967
- icon: unref(ArrowUp),
1968
- disabled: _ctx.disabled,
1969
- link: "",
1970
- onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
1971
- onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
1972
- }, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
1973
- ]),
1974
- _: 2
1975
- }, 1024)) : createCommentVNode("", true),
1976
- scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== _ctx.model[modelName.value].length - 1 ? (openBlock(), createBlock(unref(TMagicTooltip), {
1977
- key: 1,
1978
- content: "点击下移,双击置底",
1979
- placement: "top"
1980
- }, {
1981
- default: withCtx(() => [
1982
- createVNode(unref(TMagicButton), {
1983
- plain: "",
1984
- size: "small",
1985
- type: "primary",
1986
- icon: unref(ArrowDown),
1987
- disabled: _ctx.disabled,
1988
- link: "",
1989
- onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
1990
- onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
1991
- }, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
2074
+ _: 1
2075
+ /* STABLE */
2076
+ })) : createCommentVNode("v-if", true),
2077
+ createVNode(unref(TMagicTableColumn), {
2078
+ label: "操作",
2079
+ width: _ctx.config.operateColWidth || 100,
2080
+ align: "center",
2081
+ fixed: _ctx.config.fixed === false ? void 0 : "left"
2082
+ }, {
2083
+ default: withCtx((scope) => [
2084
+ renderSlot(_ctx.$slots, "operateCol", { scope }),
2085
+ withDirectives(createVNode(unref(TMagicButton), {
2086
+ size: "small",
2087
+ type: "danger",
2088
+ link: "",
2089
+ title: "删除",
2090
+ icon: unref(Delete),
2091
+ onClick: ($event) => removeHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
2092
+ }, null, 8, ["icon", "onClick"]), [
2093
+ [vShow, showDelete(scope.$index + 1 + pagecontext.value * pagesize.value - 1)]
1992
2094
  ]),
1993
- _: 2
1994
- }, 1024)) : createCommentVNode("", true)
1995
- ]),
1996
- _: 1
1997
- })) : createCommentVNode("", true),
1998
- selection.value ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1999
- key: 2,
2000
- align: "center",
2001
- "header-align": "center",
2002
- type: "selection",
2003
- width: "45"
2004
- })) : createCommentVNode("", true),
2005
- _ctx.showIndex && _ctx.config.showIndex ? (openBlock(), createBlock(unref(TMagicTableColumn), {
2006
- key: 3,
2007
- width: "60",
2008
- label: "序号"
2009
- }, {
2010
- default: withCtx((scope) => [
2011
- createTextVNode(toDisplayString(scope.$index + 1 + pagecontext.value * pagesize.value), 1)
2012
- ]),
2013
- _: 1
2014
- })) : createCommentVNode("", true),
2015
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (column, index) => {
2016
- return openBlock(), createElementBlock(Fragment, null, [
2017
- column.type !== "hidden" && display$1(column.display) ? (openBlock(), createBlock(unref(TMagicTableColumn), {
2018
- prop: column.name,
2019
- width: column.width,
2020
- label: column.label,
2021
- sortable: column.sortable,
2022
- "sort-orders": ["ascending", "descending"],
2023
- key: column[unref(mForm)?.keyProp || "__key"] ?? index,
2024
- "class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
2025
- }, {
2026
- default: withCtx((scope) => [
2027
- scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$x, {
2095
+ copyable(scope.$index + 1 + pagecontext.value * pagesize.value - 1) ? (openBlock(), createBlock(unref(TMagicButton), {
2096
+ key: 0,
2097
+ link: "",
2098
+ size: "small",
2099
+ type: "primary",
2100
+ title: "复制",
2101
+ icon: unref(DocumentCopy),
2102
+ disabled: _ctx.disabled,
2103
+ onClick: ($event) => copyHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
2104
+ }, null, 8, ["icon", "disabled", "onClick"])) : createCommentVNode("v-if", true)
2105
+ ]),
2106
+ _: 3
2107
+ /* FORWARDED */
2108
+ }, 8, ["width", "fixed"]),
2109
+ _ctx.sort && _ctx.model[modelName.value] && _ctx.model[modelName.value].length > 1 ? (openBlock(), createBlock(unref(TMagicTableColumn), {
2110
+ key: 1,
2111
+ label: "排序",
2112
+ width: "60"
2113
+ }, {
2114
+ default: withCtx((scope) => [
2115
+ scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== 0 ? (openBlock(), createBlock(
2116
+ unref(TMagicTooltip),
2117
+ {
2028
2118
  key: 0,
2029
- labelWidth: "0",
2030
- disabled: _ctx.disabled,
2031
- prop: getProp(scope.$index),
2032
- rules: column.rules,
2033
- config: makeConfig(column, scope.row),
2034
- model: scope.row,
2035
- lastValues: lastData.value[scope.$index],
2036
- "is-compare": _ctx.isCompare,
2037
- size: _ctx.size,
2038
- onChange: changeHandler,
2039
- onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
2040
- }, null, 8, ["disabled", "prop", "rules", "config", "model", "lastValues", "is-compare", "size"])) : createCommentVNode("", true)
2041
- ]),
2042
- _: 2
2043
- }, 1032, ["prop", "width", "label", "sortable", "class-name"])) : createCommentVNode("", true)
2044
- ], 64);
2045
- }), 256))
2046
- ]),
2047
- _: 3
2048
- }, 8, ["row-key", "data", "lastData", "border", "max-height"])) : createCommentVNode("", true)
2049
- ]),
2050
- _: 3
2051
- }, 8, ["disabled"]),
2052
- renderSlot(_ctx.$slots, "default"),
2053
- createElementVNode("div", _hoisted_4, [
2054
- addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
2055
- key: 0,
2056
- size: "small",
2057
- type: "primary",
2058
- disabled: _ctx.disabled,
2059
- plain: "",
2060
- onClick: _cache[1] || (_cache[1] = ($event) => newHandler())
2061
- }, {
2062
- default: withCtx(() => _cache[3] || (_cache[3] = [
2063
- createTextVNode("新增一行")
2064
- ])),
2065
- _: 1
2066
- }, 8, ["disabled"])) : createCommentVNode("", true),
2067
- createElementVNode("div", _hoisted_5, [
2068
- _ctx.enableToggleMode && _ctx.config.enableToggleMode !== false && !isFullscreen.value ? (openBlock(), createBlock(unref(TMagicButton), {
2069
- key: 0,
2070
- icon: unref(Grid),
2071
- size: "small",
2072
- type: "primary",
2073
- onClick: toggleMode
2074
- }, {
2075
- default: withCtx(() => _cache[4] || (_cache[4] = [
2076
- createTextVNode("展开配置")
2077
- ])),
2078
- _: 1
2079
- }, 8, ["icon"])) : createCommentVNode("", true),
2080
- _ctx.config.enableFullscreen !== false ? (openBlock(), createBlock(unref(TMagicButton), {
2081
- key: 1,
2082
- icon: unref(FullScreen),
2083
- size: "small",
2084
- type: "primary",
2085
- onClick: toggleFullscreen
2086
- }, {
2087
- default: withCtx(() => [
2088
- createTextVNode(toDisplayString(isFullscreen.value ? "退出全屏" : "全屏编辑"), 1)
2089
- ]),
2090
- _: 1
2091
- }, 8, ["icon"])) : createCommentVNode("", true),
2092
- importable.value ? (openBlock(), createBlock(unref(TMagicUpload), {
2093
- key: 2,
2094
- style: { "display": "inline-block" },
2095
- ref_key: "excelBtn",
2096
- ref: excelBtn,
2097
- action: "/noop",
2098
- disabled: _ctx.disabled,
2099
- "on-change": excelHandler,
2100
- "auto-upload": false
2101
- }, {
2102
- default: withCtx(() => [
2103
- createVNode(unref(TMagicButton), {
2104
- size: "small",
2105
- type: "success",
2106
- disabled: _ctx.disabled,
2107
- plain: ""
2108
- }, {
2109
- default: withCtx(() => _cache[5] || (_cache[5] = [
2110
- createTextVNode("导入EXCEL")
2111
- ])),
2112
- _: 1
2113
- }, 8, ["disabled"])
2114
- ]),
2115
- _: 1
2116
- }, 8, ["disabled"])) : createCommentVNode("", true),
2117
- importable.value ? (openBlock(), createBlock(unref(TMagicButton), {
2118
- key: 3,
2119
+ content: "点击上移,双击置顶",
2120
+ placement: "top"
2121
+ },
2122
+ {
2123
+ default: withCtx(() => [
2124
+ createVNode(unref(TMagicButton), {
2125
+ plain: "",
2126
+ size: "small",
2127
+ type: "primary",
2128
+ icon: unref(ArrowUp),
2129
+ disabled: _ctx.disabled,
2130
+ link: "",
2131
+ onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
2132
+ onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
2133
+ }, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
2134
+ ]),
2135
+ _: 2
2136
+ /* DYNAMIC */
2137
+ },
2138
+ 1024
2139
+ /* DYNAMIC_SLOTS */
2140
+ )) : createCommentVNode("v-if", true),
2141
+ scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== _ctx.model[modelName.value].length - 1 ? (openBlock(), createBlock(
2142
+ unref(TMagicTooltip),
2143
+ {
2144
+ key: 1,
2145
+ content: "点击下移,双击置底",
2146
+ placement: "top"
2147
+ },
2148
+ {
2149
+ default: withCtx(() => [
2150
+ createVNode(unref(TMagicButton), {
2151
+ plain: "",
2152
+ size: "small",
2153
+ type: "primary",
2154
+ icon: unref(ArrowDown),
2155
+ disabled: _ctx.disabled,
2156
+ link: "",
2157
+ onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
2158
+ onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
2159
+ }, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
2160
+ ]),
2161
+ _: 2
2162
+ /* DYNAMIC */
2163
+ },
2164
+ 1024
2165
+ /* DYNAMIC_SLOTS */
2166
+ )) : createCommentVNode("v-if", true)
2167
+ ]),
2168
+ _: 1
2169
+ /* STABLE */
2170
+ })) : createCommentVNode("v-if", true),
2171
+ selection.value ? (openBlock(), createBlock(unref(TMagicTableColumn), {
2172
+ key: 2,
2173
+ align: "center",
2174
+ "header-align": "center",
2175
+ type: "selection",
2176
+ width: "45"
2177
+ })) : createCommentVNode("v-if", true),
2178
+ _ctx.showIndex && _ctx.config.showIndex ? (openBlock(), createBlock(unref(TMagicTableColumn), {
2179
+ key: 3,
2180
+ width: "60",
2181
+ label: "序号"
2182
+ }, {
2183
+ default: withCtx((scope) => [
2184
+ createTextVNode(
2185
+ toDisplayString(scope.$index + 1 + pagecontext.value * pagesize.value),
2186
+ 1
2187
+ /* TEXT */
2188
+ )
2189
+ ]),
2190
+ _: 1
2191
+ /* STABLE */
2192
+ })) : createCommentVNode("v-if", true),
2193
+ (openBlock(true), createElementBlock(
2194
+ Fragment,
2195
+ null,
2196
+ renderList(_ctx.config.items, (column, index) => {
2197
+ return openBlock(), createElementBlock(
2198
+ Fragment,
2199
+ null,
2200
+ [
2201
+ column.type !== "hidden" && display$1(column.display) ? (openBlock(), createBlock(unref(TMagicTableColumn), {
2202
+ prop: column.name,
2203
+ width: column.width,
2204
+ label: column.label,
2205
+ sortable: column.sortable,
2206
+ "sort-orders": ["ascending", "descending"],
2207
+ key: column[unref(mForm)?.keyProp || "__key"] ?? index,
2208
+ "class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
2209
+ }, {
2210
+ default: withCtx((scope) => [
2211
+ scope.$index > -1 ? (openBlock(), createBlock(_sfc_main$x, {
2212
+ key: 0,
2213
+ labelWidth: "0",
2214
+ disabled: _ctx.disabled,
2215
+ prop: getProp(scope.$index),
2216
+ rules: column.rules,
2217
+ config: makeConfig(column, scope.row),
2218
+ model: scope.row,
2219
+ lastValues: lastData.value[scope.$index],
2220
+ "is-compare": _ctx.isCompare,
2221
+ size: _ctx.size,
2222
+ onChange: changeHandler,
2223
+ onAddDiffCount: _cache[0] || (_cache[0] = ($event) => onAddDiffCount())
2224
+ }, null, 8, ["disabled", "prop", "rules", "config", "model", "lastValues", "is-compare", "size"])) : createCommentVNode("v-if", true)
2225
+ ]),
2226
+ _: 2
2227
+ /* DYNAMIC */
2228
+ }, 1032, ["prop", "width", "label", "sortable", "class-name"])) : createCommentVNode("v-if", true)
2229
+ ],
2230
+ 64
2231
+ /* STABLE_FRAGMENT */
2232
+ );
2233
+ }),
2234
+ 256
2235
+ /* UNKEYED_FRAGMENT */
2236
+ ))
2237
+ ]),
2238
+ _: 3
2239
+ /* FORWARDED */
2240
+ }, 8, ["row-key", "data", "lastData", "border", "max-height"])) : createCommentVNode("v-if", true)
2241
+ ]),
2242
+ _: 3
2243
+ /* FORWARDED */
2244
+ }, 8, ["disabled"]),
2245
+ renderSlot(_ctx.$slots, "default"),
2246
+ createElementVNode("div", _hoisted_4, [
2247
+ addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
2248
+ key: 0,
2119
2249
  size: "small",
2120
- type: "warning",
2250
+ type: "primary",
2121
2251
  disabled: _ctx.disabled,
2122
2252
  plain: "",
2123
- onClick: _cache[2] || (_cache[2] = ($event) => clearHandler())
2253
+ onClick: _cache[1] || (_cache[1] = ($event) => newHandler())
2124
2254
  }, {
2125
- default: withCtx(() => _cache[6] || (_cache[6] = [
2126
- createTextVNode("清空")
2255
+ default: withCtx(() => _cache[3] || (_cache[3] = [
2256
+ createTextVNode("新增一行")
2127
2257
  ])),
2128
- _: 1
2129
- }, 8, ["disabled"])) : createCommentVNode("", true)
2130
- ])
2131
- ]),
2132
- _ctx.config.pagination ? (openBlock(), createElementBlock("div", _hoisted_6, [
2133
- createVNode(unref(TMagicPagination), {
2134
- layout: "total, sizes, prev, pager, next, jumper",
2135
- "hide-on-single-page": _ctx.model[modelName.value].length < pagesize.value,
2136
- "current-page": pagecontext.value + 1,
2137
- "page-sizes": [pagesize.value, 60, 120, 300],
2138
- "page-size": pagesize.value,
2139
- total: _ctx.model[modelName.value].length,
2140
- onSizeChange: handleSizeChange,
2141
- onCurrentChange: handleCurrentChange
2142
- }, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total"])
2143
- ])) : createCommentVNode("", true)
2144
- ], 2)
2258
+ _: 1,
2259
+ __: [3]
2260
+ }, 8, ["disabled"])) : createCommentVNode("v-if", true),
2261
+ createElementVNode("div", _hoisted_5, [
2262
+ _ctx.enableToggleMode && _ctx.config.enableToggleMode !== false && !isFullscreen.value ? (openBlock(), createBlock(unref(TMagicButton), {
2263
+ key: 0,
2264
+ icon: unref(Grid),
2265
+ size: "small",
2266
+ type: "primary",
2267
+ onClick: toggleMode
2268
+ }, {
2269
+ default: withCtx(() => _cache[4] || (_cache[4] = [
2270
+ createTextVNode("展开配置")
2271
+ ])),
2272
+ _: 1,
2273
+ __: [4]
2274
+ }, 8, ["icon"])) : createCommentVNode("v-if", true),
2275
+ _ctx.config.enableFullscreen !== false ? (openBlock(), createBlock(unref(TMagicButton), {
2276
+ key: 1,
2277
+ icon: unref(FullScreen),
2278
+ size: "small",
2279
+ type: "primary",
2280
+ onClick: toggleFullscreen
2281
+ }, {
2282
+ default: withCtx(() => [
2283
+ createTextVNode(
2284
+ toDisplayString(isFullscreen.value ? "退出全屏" : "全屏编辑"),
2285
+ 1
2286
+ /* TEXT */
2287
+ )
2288
+ ]),
2289
+ _: 1
2290
+ /* STABLE */
2291
+ }, 8, ["icon"])) : createCommentVNode("v-if", true),
2292
+ importable.value ? (openBlock(), createBlock(unref(TMagicUpload), {
2293
+ key: 2,
2294
+ style: { "display": "inline-block" },
2295
+ ref_key: "excelBtn",
2296
+ ref: excelBtn,
2297
+ action: "/noop",
2298
+ disabled: _ctx.disabled,
2299
+ "on-change": excelHandler,
2300
+ "auto-upload": false
2301
+ }, {
2302
+ default: withCtx(() => [
2303
+ createVNode(unref(TMagicButton), {
2304
+ size: "small",
2305
+ type: "success",
2306
+ disabled: _ctx.disabled,
2307
+ plain: ""
2308
+ }, {
2309
+ default: withCtx(() => _cache[5] || (_cache[5] = [
2310
+ createTextVNode("导入EXCEL")
2311
+ ])),
2312
+ _: 1,
2313
+ __: [5]
2314
+ }, 8, ["disabled"])
2315
+ ]),
2316
+ _: 1
2317
+ /* STABLE */
2318
+ }, 8, ["disabled"])) : createCommentVNode("v-if", true),
2319
+ importable.value ? (openBlock(), createBlock(unref(TMagicButton), {
2320
+ key: 3,
2321
+ size: "small",
2322
+ type: "warning",
2323
+ disabled: _ctx.disabled,
2324
+ plain: "",
2325
+ onClick: _cache[2] || (_cache[2] = ($event) => clearHandler())
2326
+ }, {
2327
+ default: withCtx(() => _cache[6] || (_cache[6] = [
2328
+ createTextVNode("清空")
2329
+ ])),
2330
+ _: 1,
2331
+ __: [6]
2332
+ }, 8, ["disabled"])) : createCommentVNode("v-if", true)
2333
+ ])
2334
+ ]),
2335
+ _ctx.config.pagination ? (openBlock(), createElementBlock("div", _hoisted_6, [
2336
+ createVNode(unref(TMagicPagination), {
2337
+ layout: "total, sizes, prev, pager, next, jumper",
2338
+ "hide-on-single-page": _ctx.model[modelName.value].length < pagesize.value,
2339
+ "current-page": pagecontext.value + 1,
2340
+ "page-sizes": [pagesize.value, 60, 120, 300],
2341
+ "page-size": pagesize.value,
2342
+ total: _ctx.model[modelName.value].length,
2343
+ onSizeChange: handleSizeChange,
2344
+ onCurrentChange: handleCurrentChange
2345
+ }, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total"])
2346
+ ])) : createCommentVNode("v-if", true)
2347
+ ],
2348
+ 2
2349
+ /* CLASS */
2350
+ )
2145
2351
  ], 8, ["disabled"]))
2146
2352
  ]);
2147
2353
  };
@@ -2286,47 +2492,71 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2286
2492
  }
2287
2493
  ), {
2288
2494
  default: withCtx(() => [
2289
- (openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab, tabIndex) => {
2290
- return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent)?.component || "el-tab-pane"), mergeProps(
2291
- {
2292
- key: tab[unref(mForm)?.keyProp || "__key"] ?? tabIndex,
2293
- ref_for: true
2294
- },
2295
- unref(tabPaneComponent)?.props({ name: filter(tab.status) || tabIndex.toString(), lazy: tab.lazy || false }) || {}
2296
- ), {
2297
- label: withCtx(() => [
2298
- createElementVNode("span", null, [
2299
- createTextVNode(toDisplayString(filter(tab.title)), 1),
2300
- createVNode(unref(TMagicBadge), {
2301
- hidden: !diffCount.value[tabIndex],
2302
- value: diffCount.value[tabIndex],
2303
- class: "diff-count-badge"
2304
- }, null, 8, ["hidden", "value"])
2305
- ])
2306
- ]),
2307
- default: withCtx(() => [
2308
- (openBlock(true), createElementBlock(Fragment, null, renderList(tabItems(tab), (item) => {
2309
- return openBlock(), createBlock(_sfc_main$x, {
2310
- key: item[unref(mForm)?.keyProp || "__key"],
2311
- config: item,
2312
- disabled: _ctx.disabled,
2313
- 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,
2314
- "last-values": unref(isEmpty)(_ctx.lastValues) ? {} : _ctx.config.dynamic ? (_ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues)[tabIndex] : tab.name ? (_ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues)[tab.name] : _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
2315
- "is-compare": _ctx.isCompare,
2316
- prop: _ctx.config.dynamic ? `${_ctx.prop}${_ctx.prop ? "." : ""}${String(tabIndex)}` : _ctx.prop,
2317
- size: _ctx.size,
2318
- "label-width": tab.labelWidth || _ctx.labelWidth,
2319
- "expand-more": _ctx.expandMore,
2320
- onChange: changeHandler,
2321
- onAddDiffCount: ($event) => onAddDiffCount(tabIndex)
2322
- }, null, 8, ["config", "disabled", "model", "last-values", "is-compare", "prop", "size", "label-width", "expand-more", "onAddDiffCount"]);
2323
- }), 128))
2324
- ]),
2325
- _: 2
2326
- }, 1040);
2327
- }), 128))
2495
+ (openBlock(true), createElementBlock(
2496
+ Fragment,
2497
+ null,
2498
+ renderList(tabs.value, (tab, tabIndex) => {
2499
+ return openBlock(), createBlock(
2500
+ resolveDynamicComponent(unref(tabPaneComponent)?.component || "el-tab-pane"),
2501
+ mergeProps(
2502
+ {
2503
+ key: tab[unref(mForm)?.keyProp || "__key"] ?? tabIndex
2504
+ },
2505
+ { ref_for: true },
2506
+ unref(tabPaneComponent)?.props({ name: filter(tab.status) || tabIndex.toString(), lazy: tab.lazy || false }) || {}
2507
+ ),
2508
+ {
2509
+ label: withCtx(() => [
2510
+ createElementVNode("span", null, [
2511
+ createTextVNode(
2512
+ toDisplayString(filter(tab.title)),
2513
+ 1
2514
+ /* TEXT */
2515
+ ),
2516
+ createVNode(unref(TMagicBadge), {
2517
+ hidden: !diffCount.value[tabIndex],
2518
+ value: diffCount.value[tabIndex],
2519
+ class: "diff-count-badge"
2520
+ }, null, 8, ["hidden", "value"])
2521
+ ])
2522
+ ]),
2523
+ default: withCtx(() => [
2524
+ (openBlock(true), createElementBlock(
2525
+ Fragment,
2526
+ null,
2527
+ renderList(tabItems(tab), (item) => {
2528
+ return openBlock(), createBlock(_sfc_main$x, {
2529
+ key: item[unref(mForm)?.keyProp || "__key"],
2530
+ config: item,
2531
+ disabled: _ctx.disabled,
2532
+ 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,
2533
+ "last-values": unref(isEmpty)(_ctx.lastValues) ? {} : _ctx.config.dynamic ? (_ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues)[tabIndex] : tab.name ? (_ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues)[tab.name] : _ctx.name ? _ctx.lastValues[_ctx.name] : _ctx.lastValues,
2534
+ "is-compare": _ctx.isCompare,
2535
+ prop: _ctx.config.dynamic ? `${_ctx.prop}${_ctx.prop ? "." : ""}${String(tabIndex)}` : _ctx.prop,
2536
+ size: _ctx.size,
2537
+ "label-width": tab.labelWidth || _ctx.labelWidth,
2538
+ "expand-more": _ctx.expandMore,
2539
+ onChange: changeHandler,
2540
+ onAddDiffCount: ($event) => onAddDiffCount(tabIndex)
2541
+ }, null, 8, ["config", "disabled", "model", "last-values", "is-compare", "prop", "size", "label-width", "expand-more", "onAddDiffCount"]);
2542
+ }),
2543
+ 128
2544
+ /* KEYED_FRAGMENT */
2545
+ ))
2546
+ ]),
2547
+ _: 2
2548
+ /* DYNAMIC */
2549
+ },
2550
+ 1040
2551
+ /* FULL_PROPS, DYNAMIC_SLOTS */
2552
+ );
2553
+ }),
2554
+ 128
2555
+ /* KEYED_FRAGMENT */
2556
+ ))
2328
2557
  ]),
2329
2558
  _: 1
2559
+ /* STABLE */
2330
2560
  }, 16, ["modelValue", "class"]);
2331
2561
  };
2332
2562
  }
@@ -2533,9 +2763,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2533
2763
  onChange: changeHandler
2534
2764
  }, {
2535
2765
  default: withCtx(() => [
2536
- createTextVNode(toDisplayString(_ctx.config.text), 1)
2766
+ createTextVNode(
2767
+ toDisplayString(_ctx.config.text),
2768
+ 1
2769
+ /* TEXT */
2770
+ )
2537
2771
  ]),
2538
2772
  _: 1
2773
+ /* STABLE */
2539
2774
  }, 8, ["modelValue", "size", "trueValue", "falseValue", "disabled"]);
2540
2775
  };
2541
2776
  }
@@ -2584,20 +2819,32 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2584
2819
  onChange: changeHandler
2585
2820
  }, {
2586
2821
  default: withCtx(() => [
2587
- (openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (option) => {
2588
- return openBlock(), createBlock(unref(TMagicCheckbox), {
2589
- value: option.value,
2590
- key: option.value,
2591
- disabled: option.disabled
2592
- }, {
2593
- default: withCtx(() => [
2594
- createTextVNode(toDisplayString(option.text), 1)
2595
- ]),
2596
- _: 2
2597
- }, 1032, ["value", "disabled"]);
2598
- }), 128))
2822
+ (openBlock(true), createElementBlock(
2823
+ Fragment,
2824
+ null,
2825
+ renderList(options.value, (option) => {
2826
+ return openBlock(), createBlock(unref(TMagicCheckbox), {
2827
+ value: option.value,
2828
+ key: option.value,
2829
+ disabled: option.disabled
2830
+ }, {
2831
+ default: withCtx(() => [
2832
+ createTextVNode(
2833
+ toDisplayString(option.text),
2834
+ 1
2835
+ /* TEXT */
2836
+ )
2837
+ ]),
2838
+ _: 2
2839
+ /* DYNAMIC */
2840
+ }, 1032, ["value", "disabled"]);
2841
+ }),
2842
+ 128
2843
+ /* KEYED_FRAGMENT */
2844
+ ))
2599
2845
  ]),
2600
2846
  _: 1
2847
+ /* STABLE */
2601
2848
  }, 8, ["modelValue", "size", "disabled"]);
2602
2849
  };
2603
2850
  }
@@ -2857,7 +3104,13 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2857
3104
  }
2858
3105
  useAddField(props.prop);
2859
3106
  return (_ctx, _cache) => {
2860
- return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$8, toDisplayString(_ctx.model[_ctx.name]), 1)) : createCommentVNode("", true);
3107
+ return _ctx.model ? (openBlock(), createElementBlock(
3108
+ "span",
3109
+ _hoisted_1$8,
3110
+ toDisplayString(_ctx.model[_ctx.name]),
3111
+ 1
3112
+ /* TEXT */
3113
+ )) : createCommentVNode("v-if", true);
2861
3114
  };
2862
3115
  }
2863
3116
  });
@@ -2932,24 +3185,32 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2932
3185
  return openBlock(), createElementBlock("div", _hoisted_1$7, [
2933
3186
  createVNode(unref(TMagicForm), { size: "small" }, {
2934
3187
  default: withCtx(() => [
2935
- (openBlock(true), createElementBlock(Fragment, null, renderList(Object.keys(fieldMap.value), (key) => {
2936
- return openBlock(), createBlock(unref(TMagicFormItem), {
2937
- key,
2938
- label: fieldLabelMap.value[key]
2939
- }, {
2940
- default: withCtx(() => [
2941
- createVNode(unref(TMagicInput), {
2942
- modelValue: fieldMap.value[key],
2943
- "onUpdate:modelValue": ($event) => fieldMap.value[key] = $event,
2944
- placeholder: fieldLabelMap.value[key],
2945
- onChange: ($event) => inputChangeHandler(key)
2946
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange"])
2947
- ]),
2948
- _: 2
2949
- }, 1032, ["label"]);
2950
- }), 128))
3188
+ (openBlock(true), createElementBlock(
3189
+ Fragment,
3190
+ null,
3191
+ renderList(Object.keys(fieldMap.value), (key) => {
3192
+ return openBlock(), createBlock(unref(TMagicFormItem), {
3193
+ key,
3194
+ label: fieldLabelMap.value[key]
3195
+ }, {
3196
+ default: withCtx(() => [
3197
+ createVNode(unref(TMagicInput), {
3198
+ modelValue: fieldMap.value[key],
3199
+ "onUpdate:modelValue": ($event) => fieldMap.value[key] = $event,
3200
+ placeholder: fieldLabelMap.value[key],
3201
+ onChange: ($event) => inputChangeHandler(key)
3202
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange"])
3203
+ ]),
3204
+ _: 2
3205
+ /* DYNAMIC */
3206
+ }, 1032, ["label"]);
3207
+ }),
3208
+ 128
3209
+ /* KEYED_FRAGMENT */
3210
+ ))
2951
3211
  ]),
2952
3212
  _: 1
3213
+ /* STABLE */
2953
3214
  })
2954
3215
  ]);
2955
3216
  };
@@ -2976,13 +3237,19 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2976
3237
  const props = __props;
2977
3238
  useAddField(props.prop);
2978
3239
  return (_ctx, _cache) => {
2979
- return _ctx.model ? withDirectives((openBlock(), createElementBlock("input", {
2980
- key: 0,
2981
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
2982
- type: "hidden"
2983
- }, null, 512)), [
3240
+ return _ctx.model ? withDirectives((openBlock(), createElementBlock(
3241
+ "input",
3242
+ {
3243
+ key: 0,
3244
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3245
+ type: "hidden"
3246
+ },
3247
+ null,
3248
+ 512
3249
+ /* NEED_PATCH */
3250
+ )), [
2984
3251
  [vModelText, _ctx.model[_ctx.name]]
2985
- ]) : createCommentVNode("", true);
3252
+ ]) : createCommentVNode("v-if", true);
2986
3253
  };
2987
3254
  }
2988
3255
  });
@@ -3142,22 +3409,29 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3142
3409
  onSubmit: submitHandler
3143
3410
  }, {
3144
3411
  default: withCtx(() => [
3145
- initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.config, (item, index) => {
3146
- return openBlock(), createBlock(_sfc_main$x, {
3147
- disabled: _ctx.disabled,
3148
- key: item[_ctx.keyProp] ?? index,
3149
- config: item,
3150
- model: values.value,
3151
- "last-values": lastValuesProcessed.value,
3152
- "is-compare": _ctx.isCompare,
3153
- "label-width": item.labelWidth || _ctx.labelWidth,
3154
- "step-active": _ctx.stepActive,
3155
- size: _ctx.size,
3156
- onChange: changeHandler
3157
- }, null, 8, ["disabled", "config", "model", "last-values", "is-compare", "label-width", "step-active", "size"]);
3158
- }), 128)) : createCommentVNode("", true)
3412
+ initialized.value && Array.isArray(_ctx.config) ? (openBlock(true), createElementBlock(
3413
+ Fragment,
3414
+ { key: 0 },
3415
+ renderList(_ctx.config, (item, index) => {
3416
+ return openBlock(), createBlock(_sfc_main$x, {
3417
+ disabled: _ctx.disabled,
3418
+ key: item[_ctx.keyProp] ?? index,
3419
+ config: item,
3420
+ model: values.value,
3421
+ "last-values": lastValuesProcessed.value,
3422
+ "is-compare": _ctx.isCompare,
3423
+ "label-width": item.labelWidth || _ctx.labelWidth,
3424
+ "step-active": _ctx.stepActive,
3425
+ size: _ctx.size,
3426
+ onChange: changeHandler
3427
+ }, null, 8, ["disabled", "config", "model", "last-values", "is-compare", "label-width", "step-active", "size"]);
3428
+ }),
3429
+ 128
3430
+ /* KEYED_FRAGMENT */
3431
+ )) : createCommentVNode("v-if", true)
3159
3432
  ]),
3160
3433
  _: 1
3434
+ /* STABLE */
3161
3435
  }, 8, ["model", "label-width", "style", "inline", "label-position"]);
3162
3436
  };
3163
3437
  }
@@ -3278,6 +3552,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3278
3552
  ])
3279
3553
  ]),
3280
3554
  _: 3
3555
+ /* FORWARDED */
3281
3556
  }),
3282
3557
  createVNode(unref(TMagicCol), { span: 12 }, {
3283
3558
  default: withCtx(() => [
@@ -3289,7 +3564,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3289
3564
  default: withCtx(() => _cache[2] || (_cache[2] = [
3290
3565
  createTextVNode("取 消")
3291
3566
  ])),
3292
- _: 1
3567
+ _: 1,
3568
+ __: [2]
3293
3569
  }),
3294
3570
  hasStep.value && stepActive.value > 1 ? (openBlock(), createBlock(unref(TMagicButton), {
3295
3571
  key: 0,
@@ -3300,8 +3576,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3300
3576
  default: withCtx(() => _cache[3] || (_cache[3] = [
3301
3577
  createTextVNode("上一步")
3302
3578
  ])),
3303
- _: 1
3304
- })) : createCommentVNode("", true),
3579
+ _: 1,
3580
+ __: [3]
3581
+ })) : createCommentVNode("v-if", true),
3305
3582
  hasStep.value && stepCount.value > stepActive.value ? (openBlock(), createBlock(unref(TMagicButton), {
3306
3583
  key: 1,
3307
3584
  type: "info",
@@ -3311,7 +3588,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3311
3588
  default: withCtx(() => _cache[4] || (_cache[4] = [
3312
3589
  createTextVNode("下一步")
3313
3590
  ])),
3314
- _: 1
3591
+ _: 1,
3592
+ __: [4]
3315
3593
  })) : (openBlock(), createBlock(unref(TMagicButton), {
3316
3594
  key: 2,
3317
3595
  type: "primary",
@@ -3321,44 +3599,58 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3321
3599
  onClick: save
3322
3600
  }, {
3323
3601
  default: withCtx(() => [
3324
- createTextVNode(toDisplayString(_ctx.confirmText), 1)
3602
+ createTextVNode(
3603
+ toDisplayString(_ctx.confirmText),
3604
+ 1
3605
+ /* TEXT */
3606
+ )
3325
3607
  ]),
3326
3608
  _: 1
3609
+ /* STABLE */
3327
3610
  }, 8, ["disabled", "loading"]))
3328
3611
  ])
3329
3612
  ]),
3330
3613
  _: 3
3614
+ /* FORWARDED */
3331
3615
  })
3332
3616
  ]),
3333
3617
  _: 3
3618
+ /* FORWARDED */
3334
3619
  })
3335
3620
  ]),
3336
3621
  default: withCtx(() => [
3337
- dialogVisible.value ? (openBlock(), createElementBlock("div", {
3338
- key: 0,
3339
- class: "m-dialog-body",
3340
- style: normalizeStyle(`max-height: ${bodyHeight.value}; overflow-y: auto; overflow-x: hidden;`)
3341
- }, [
3342
- createVNode(_sfc_main$d, {
3343
- modelValue: stepActive.value,
3344
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
3345
- ref_key: "form",
3346
- ref: form,
3347
- size: _ctx.size,
3348
- disabled: _ctx.disabled,
3349
- config: _ctx.config,
3350
- "init-values": _ctx.values,
3351
- "parent-values": _ctx.parentValues,
3352
- "label-width": _ctx.labelWidth,
3353
- "label-position": _ctx.labelPosition,
3354
- inline: _ctx.inline,
3355
- "prevent-submit-default": _ctx.preventSubmitDefault,
3356
- onChange: changeHandler
3357
- }, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
3358
- renderSlot(_ctx.$slots, "default")
3359
- ], 4)) : createCommentVNode("", true)
3622
+ dialogVisible.value ? (openBlock(), createElementBlock(
3623
+ "div",
3624
+ {
3625
+ key: 0,
3626
+ class: "m-dialog-body",
3627
+ style: normalizeStyle(`max-height: ${bodyHeight.value}; overflow-y: auto; overflow-x: hidden;`)
3628
+ },
3629
+ [
3630
+ createVNode(_sfc_main$d, {
3631
+ modelValue: stepActive.value,
3632
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
3633
+ ref_key: "form",
3634
+ ref: form,
3635
+ size: _ctx.size,
3636
+ disabled: _ctx.disabled,
3637
+ config: _ctx.config,
3638
+ "init-values": _ctx.values,
3639
+ "parent-values": _ctx.parentValues,
3640
+ "label-width": _ctx.labelWidth,
3641
+ "label-position": _ctx.labelPosition,
3642
+ inline: _ctx.inline,
3643
+ "prevent-submit-default": _ctx.preventSubmitDefault,
3644
+ onChange: changeHandler
3645
+ }, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
3646
+ renderSlot(_ctx.$slots, "default")
3647
+ ],
3648
+ 4
3649
+ /* STYLE */
3650
+ )) : createCommentVNode("v-if", true)
3360
3651
  ]),
3361
3652
  _: 3
3653
+ /* FORWARDED */
3362
3654
  }, 8, ["modelValue", "title", "width", "zIndex", "fullscreen"]);
3363
3655
  };
3364
3656
  }
@@ -3438,10 +3730,16 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3438
3730
  target: "_blank",
3439
3731
  href: href.value,
3440
3732
  style: normalizeStyle(_ctx.config.css || {})
3441
- }, toDisplayString(displayText.value), 13, _hoisted_1$5)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock("span", {
3442
- key: 1,
3443
- style: normalizeStyle(_ctx.config.disabledCss || {})
3444
- }, toDisplayString(displayText.value), 5)) : (openBlock(), createElementBlock("div", _hoisted_2$1, [
3733
+ }, toDisplayString(displayText.value), 13, _hoisted_1$5)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock(
3734
+ "span",
3735
+ {
3736
+ key: 1,
3737
+ style: normalizeStyle(_ctx.config.disabledCss || {})
3738
+ },
3739
+ toDisplayString(displayText.value),
3740
+ 5
3741
+ /* TEXT, STYLE */
3742
+ )) : (openBlock(), createElementBlock("div", _hoisted_2$1, [
3445
3743
  createVNode(unref(TMagicButton), {
3446
3744
  link: "",
3447
3745
  type: "primary",
@@ -3450,7 +3748,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3450
3748
  default: withCtx(() => _cache[0] || (_cache[0] = [
3451
3749
  createTextVNode("点击编辑")
3452
3750
  ])),
3453
- _: 1
3751
+ _: 1,
3752
+ __: [0]
3454
3753
  }),
3455
3754
  createVNode(_sfc_main$c, {
3456
3755
  ref_key: "editor",
@@ -3512,7 +3811,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3512
3811
  disabled: _ctx.disabled,
3513
3812
  onChange: changeHandler,
3514
3813
  onInput: inputHandler
3515
- }, null, 8, ["modelValue", "size", "max", "min", "step", "placeholder", "disabled"])) : createCommentVNode("", true);
3814
+ }, null, 8, ["modelValue", "size", "max", "min", "step", "placeholder", "disabled"])) : createCommentVNode("v-if", true);
3516
3815
  };
3517
3816
  }
3518
3817
  });
@@ -3558,7 +3857,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3558
3857
  disabled: _ctx.disabled,
3559
3858
  onChange: minChangeHandler
3560
3859
  }, null, 8, ["modelValue", "size", "disabled"]),
3561
- _cache[2] || (_cache[2] = createElementVNode("span", { class: "split-tag" }, "-", -1)),
3860
+ _cache[2] || (_cache[2] = createElementVNode(
3861
+ "span",
3862
+ { class: "split-tag" },
3863
+ "-",
3864
+ -1
3865
+ /* CACHED */
3866
+ )),
3562
3867
  createVNode(unref(TMagicInput), {
3563
3868
  modelValue: _ctx.model[_ctx.name][1],
3564
3869
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model[_ctx.name][1] = $event),
@@ -3611,52 +3916,87 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3611
3916
  disabled: _ctx.disabled
3612
3917
  }, {
3613
3918
  default: withCtx(() => [
3614
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.options, (option) => {
3615
- return openBlock(), createBlock(resolveDynamicComponent(itemComponent.value), {
3616
- value: option.value,
3617
- key: `${option.value}`,
3618
- onClick: withModifiers(($event) => clickHandler(option.value), ["prevent"])
3619
- }, {
3620
- default: withCtx(() => [
3621
- option.tooltip ? (openBlock(), createBlock(unref(TMagicTooltip), {
3622
- key: 0,
3623
- placement: "top-start",
3624
- content: option.tooltip
3625
- }, {
3626
- default: withCtx(() => [
3627
- createElementVNode("div", null, [
3628
- option.icon ? (openBlock(), createBlock(unref(TMagicIcon), {
3919
+ (openBlock(true), createElementBlock(
3920
+ Fragment,
3921
+ null,
3922
+ renderList(_ctx.config.options, (option) => {
3923
+ return openBlock(), createBlock(resolveDynamicComponent(itemComponent.value), {
3924
+ value: option.value,
3925
+ key: `${option.value}`,
3926
+ onClick: withModifiers(($event) => clickHandler(option.value), ["prevent"])
3927
+ }, {
3928
+ default: withCtx(() => [
3929
+ option.tooltip ? (openBlock(), createBlock(unref(TMagicTooltip), {
3930
+ key: 0,
3931
+ placement: "top-start",
3932
+ content: option.tooltip
3933
+ }, {
3934
+ default: withCtx(() => [
3935
+ createElementVNode("div", null, [
3936
+ option.icon ? (openBlock(), createBlock(
3937
+ unref(TMagicIcon),
3938
+ {
3939
+ key: 0,
3940
+ size: "16"
3941
+ },
3942
+ {
3943
+ default: withCtx(() => [
3944
+ (openBlock(), createBlock(resolveDynamicComponent(option.icon)))
3945
+ ]),
3946
+ _: 2
3947
+ /* DYNAMIC */
3948
+ },
3949
+ 1024
3950
+ /* DYNAMIC_SLOTS */
3951
+ )) : createCommentVNode("v-if", true),
3952
+ createElementVNode(
3953
+ "span",
3954
+ null,
3955
+ toDisplayString(option.text),
3956
+ 1
3957
+ /* TEXT */
3958
+ )
3959
+ ])
3960
+ ]),
3961
+ _: 2
3962
+ /* DYNAMIC */
3963
+ }, 1032, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_1$3, [
3964
+ option.icon ? (openBlock(), createBlock(
3965
+ unref(TMagicIcon),
3966
+ {
3629
3967
  key: 0,
3630
3968
  size: "16"
3631
- }, {
3969
+ },
3970
+ {
3632
3971
  default: withCtx(() => [
3633
3972
  (openBlock(), createBlock(resolveDynamicComponent(option.icon)))
3634
3973
  ]),
3635
3974
  _: 2
3636
- }, 1024)) : createCommentVNode("", true),
3637
- createElementVNode("span", null, toDisplayString(option.text), 1)
3638
- ])
3639
- ]),
3640
- _: 2
3641
- }, 1032, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_1$3, [
3642
- option.icon ? (openBlock(), createBlock(unref(TMagicIcon), {
3643
- key: 0,
3644
- size: "16"
3645
- }, {
3646
- default: withCtx(() => [
3647
- (openBlock(), createBlock(resolveDynamicComponent(option.icon)))
3648
- ]),
3649
- _: 2
3650
- }, 1024)) : createCommentVNode("", true),
3651
- createElementVNode("span", null, toDisplayString(option.text), 1)
3652
- ]))
3653
- ]),
3654
- _: 2
3655
- }, 1032, ["value", "onClick"]);
3656
- }), 128))
3975
+ /* DYNAMIC */
3976
+ },
3977
+ 1024
3978
+ /* DYNAMIC_SLOTS */
3979
+ )) : createCommentVNode("v-if", true),
3980
+ createElementVNode(
3981
+ "span",
3982
+ null,
3983
+ toDisplayString(option.text),
3984
+ 1
3985
+ /* TEXT */
3986
+ )
3987
+ ]))
3988
+ ]),
3989
+ _: 2
3990
+ /* DYNAMIC */
3991
+ }, 1032, ["value", "onClick"]);
3992
+ }),
3993
+ 128
3994
+ /* KEYED_FRAGMENT */
3995
+ ))
3657
3996
  ]),
3658
3997
  _: 1
3659
- }, 8, ["modelValue", "size", "disabled"])) : createCommentVNode("", true);
3998
+ /* STABLE */
3999
+ }, 8, ["modelValue", "size", "disabled"])) : createCommentVNode("v-if", true);
3660
4000
  };
3661
4001
  }
3662
4002
  });
@@ -4009,67 +4349,107 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4009
4349
  onVisibleChange: visibleHandler
4010
4350
  }, {
4011
4351
  default: withCtx(() => [
4012
- _ctx.config.group ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(options.value, (group, index) => {
4013
- return openBlock(), createBlock(resolveDynamicComponent(unref(optionGroupComponent)?.component || "el-option-group"), mergeProps(
4014
- {
4015
- key: index,
4016
- ref_for: true
4017
- },
4018
- unref(optionGroupComponent)?.props({
4019
- label: group.label,
4020
- disabled: group.disabled
4021
- }) || {
4022
- label: group.label,
4023
- disabled: group.disabled
4024
- }
4025
- ), {
4026
- default: withCtx(() => [
4027
- (openBlock(true), createElementBlock(Fragment, null, renderList(group.options, (item, index2) => {
4028
- return openBlock(), createBlock(resolveDynamicComponent(unref(optionComponent)?.component || "el-option"), mergeProps(
4029
- {
4030
- key: index2,
4031
- ref_for: true
4032
- },
4033
- unref(optionComponent)?.props({
4034
- label: item.label || item.text,
4035
- value: item.value,
4036
- disabled: item.disabled
4037
- }) || {
4038
- label: item.label || item.text,
4039
- value: item.value,
4040
- disabled: item.disabled
4041
- }
4042
- ), null, 16);
4043
- }), 128))
4044
- ]),
4045
- _: 2
4046
- }, 1040);
4047
- }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(options.value, (option) => {
4048
- return openBlock(), createBlock(resolveDynamicComponent(unref(optionComponent)?.component || "el-option"), mergeProps(
4049
- {
4050
- class: "tmagic-design-option",
4051
- key: _ctx.config.valueKey ? option.value[_ctx.config.valueKey] : option.value,
4052
- ref_for: true
4053
- },
4054
- unref(optionComponent)?.props({
4055
- label: option.text,
4056
- value: option.value,
4057
- disabled: option.disabled
4058
- }) || {
4059
- label: option.text,
4060
- value: option.value,
4061
- disabled: option.disabled
4062
- }
4063
- ), null, 16);
4064
- }), 128)),
4065
- moreLoadingVisible.value ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$2, null, 512)), [
4352
+ _ctx.config.group ? (openBlock(true), createElementBlock(
4353
+ Fragment,
4354
+ { key: 0 },
4355
+ renderList(options.value, (group, index) => {
4356
+ return openBlock(), createBlock(
4357
+ resolveDynamicComponent(unref(optionGroupComponent)?.component || "el-option-group"),
4358
+ mergeProps(
4359
+ { key: index },
4360
+ { ref_for: true },
4361
+ unref(optionGroupComponent)?.props({
4362
+ label: group.label,
4363
+ disabled: group.disabled
4364
+ }) || {
4365
+ label: group.label,
4366
+ disabled: group.disabled
4367
+ }
4368
+ ),
4369
+ {
4370
+ default: withCtx(() => [
4371
+ (openBlock(true), createElementBlock(
4372
+ Fragment,
4373
+ null,
4374
+ renderList(group.options, (item, index2) => {
4375
+ return openBlock(), createBlock(
4376
+ resolveDynamicComponent(unref(optionComponent)?.component || "el-option"),
4377
+ mergeProps(
4378
+ { key: index2 },
4379
+ { ref_for: true },
4380
+ unref(optionComponent)?.props({
4381
+ label: item.label || item.text,
4382
+ value: item.value,
4383
+ disabled: item.disabled
4384
+ }) || {
4385
+ label: item.label || item.text,
4386
+ value: item.value,
4387
+ disabled: item.disabled
4388
+ }
4389
+ ),
4390
+ null,
4391
+ 16
4392
+ /* FULL_PROPS */
4393
+ );
4394
+ }),
4395
+ 128
4396
+ /* KEYED_FRAGMENT */
4397
+ ))
4398
+ ]),
4399
+ _: 2
4400
+ /* DYNAMIC */
4401
+ },
4402
+ 1040
4403
+ /* FULL_PROPS, DYNAMIC_SLOTS */
4404
+ );
4405
+ }),
4406
+ 128
4407
+ /* KEYED_FRAGMENT */
4408
+ )) : (openBlock(true), createElementBlock(
4409
+ Fragment,
4410
+ { key: 1 },
4411
+ renderList(options.value, (option) => {
4412
+ return openBlock(), createBlock(
4413
+ resolveDynamicComponent(unref(optionComponent)?.component || "el-option"),
4414
+ mergeProps(
4415
+ {
4416
+ class: "tmagic-design-option",
4417
+ key: _ctx.config.valueKey ? option.value[_ctx.config.valueKey] : option.value
4418
+ },
4419
+ { ref_for: true },
4420
+ unref(optionComponent)?.props({
4421
+ label: option.text,
4422
+ value: option.value,
4423
+ disabled: option.disabled
4424
+ }) || {
4425
+ label: option.text,
4426
+ value: option.value,
4427
+ disabled: option.disabled
4428
+ }
4429
+ ),
4430
+ null,
4431
+ 16
4432
+ /* FULL_PROPS */
4433
+ );
4434
+ }),
4435
+ 128
4436
+ /* KEYED_FRAGMENT */
4437
+ )),
4438
+ moreLoadingVisible.value ? withDirectives((openBlock(), createElementBlock(
4439
+ "div",
4440
+ _hoisted_1$2,
4441
+ null,
4442
+ 512
4443
+ /* NEED_PATCH */
4444
+ )), [
4066
4445
  [_directive_loading, true]
4067
- ]) : createCommentVNode("", true)
4446
+ ]) : createCommentVNode("v-if", true)
4068
4447
  ]),
4069
4448
  _: 1
4449
+ /* STABLE */
4070
4450
  }, 8, ["modelValue", "clearable", "filterable", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method"])), [
4071
4451
  [_directive_loading, loading.value]
4072
- ]) : createCommentVNode("", true);
4452
+ ]) : createCommentVNode("v-if", true);
4073
4453
  };
4074
4454
  }
4075
4455
  });
@@ -4286,7 +4666,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4286
4666
  onChange: changeHandler,
4287
4667
  onInput: inputHandler,
4288
4668
  onKeyup: _cache[1] || (_cache[1] = ($event) => keyUpHandler($event))
4289
- }, createSlots({ _: 2 }, [
4669
+ }, createSlots({
4670
+ _: 2
4671
+ /* DYNAMIC */
4672
+ }, [
4290
4673
  appendConfig.value ? {
4291
4674
  name: "append",
4292
4675
  fn: withCtx(() => [
@@ -4297,49 +4680,74 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4297
4680
  onClick: withModifiers(buttonClickHandler, ["prevent"])
4298
4681
  }, {
4299
4682
  default: withCtx(() => [
4300
- createTextVNode(toDisplayString(appendConfig.value.text), 1)
4683
+ createTextVNode(
4684
+ toDisplayString(appendConfig.value.text),
4685
+ 1
4686
+ /* TEXT */
4687
+ )
4301
4688
  ]),
4302
4689
  _: 1
4303
- }, 8, ["size"])) : createCommentVNode("", true)
4690
+ /* STABLE */
4691
+ }, 8, ["size"])) : createCommentVNode("v-if", true)
4304
4692
  ]),
4305
4693
  key: "0"
4306
4694
  } : void 0
4307
4695
  ]), 1032, ["modelValue", "size", "placeholder", "disabled"]),
4308
4696
  (openBlock(), createBlock(Teleport, { to: "body" }, [
4309
- popoverVisible.value ? (openBlock(), createElementBlock("div", {
4310
- key: 0,
4311
- class: "tmagic-form-text-popper m-form-item__content",
4312
- ref_key: "popoverEl",
4313
- ref: popoverEl
4314
- }, [
4315
- _cache[5] || (_cache[5] = createElementVNode("div", { class: "m-form-validate__warning" }, "输入内容前后有空格,是否移除空格?", -1)),
4316
- createElementVNode("div", _hoisted_2, [
4317
- createVNode(unref(TMagicButton), {
4318
- link: "",
4319
- size: "small",
4320
- onClick: _cache[2] || (_cache[2] = ($event) => popoverVisible.value = false)
4321
- }, {
4322
- default: withCtx(() => _cache[3] || (_cache[3] = [
4323
- createTextVNode("保持原样")
4324
- ])),
4325
- _: 1
4326
- }),
4327
- createVNode(unref(TMagicButton), {
4328
- type: "primary",
4329
- size: "small",
4330
- onClick: confirmTrimHandler
4331
- }, {
4332
- default: withCtx(() => _cache[4] || (_cache[4] = [
4333
- createTextVNode("移除空格")
4334
- ])),
4335
- _: 1
4336
- })
4337
- ]),
4338
- _cache[6] || (_cache[6] = createElementVNode("span", {
4339
- class: "tmagic-form-text-popper-arrow",
4340
- "data-popper-arrow": ""
4341
- }, null, -1))
4342
- ], 512)) : createCommentVNode("", true)
4697
+ popoverVisible.value ? (openBlock(), createElementBlock(
4698
+ "div",
4699
+ {
4700
+ key: 0,
4701
+ class: "tmagic-form-text-popper m-form-item__content",
4702
+ ref_key: "popoverEl",
4703
+ ref: popoverEl
4704
+ },
4705
+ [
4706
+ _cache[5] || (_cache[5] = createElementVNode(
4707
+ "div",
4708
+ { class: "m-form-validate__warning" },
4709
+ "输入内容前后有空格,是否移除空格?",
4710
+ -1
4711
+ /* CACHED */
4712
+ )),
4713
+ createElementVNode("div", _hoisted_2, [
4714
+ createVNode(unref(TMagicButton), {
4715
+ link: "",
4716
+ size: "small",
4717
+ onClick: _cache[2] || (_cache[2] = ($event) => popoverVisible.value = false)
4718
+ }, {
4719
+ default: withCtx(() => _cache[3] || (_cache[3] = [
4720
+ createTextVNode("保持原样")
4721
+ ])),
4722
+ _: 1,
4723
+ __: [3]
4724
+ }),
4725
+ createVNode(unref(TMagicButton), {
4726
+ type: "primary",
4727
+ size: "small",
4728
+ onClick: confirmTrimHandler
4729
+ }, {
4730
+ default: withCtx(() => _cache[4] || (_cache[4] = [
4731
+ createTextVNode("移除空格")
4732
+ ])),
4733
+ _: 1,
4734
+ __: [4]
4735
+ })
4736
+ ]),
4737
+ _cache[6] || (_cache[6] = createElementVNode(
4738
+ "span",
4739
+ {
4740
+ class: "tmagic-form-text-popper-arrow",
4741
+ "data-popper-arrow": ""
4742
+ },
4743
+ null,
4744
+ -1
4745
+ /* CACHED */
4746
+ ))
4747
+ ],
4748
+ 512
4749
+ /* NEED_PATCH */
4750
+ )) : createCommentVNode("v-if", true)
4343
4751
  ]))
4344
4752
  ]);
4345
4753
  };
@@ -4616,6 +5024,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4616
5024
  ])
4617
5025
  ]),
4618
5026
  _: 3
5027
+ /* FORWARDED */
4619
5028
  }),
4620
5029
  createVNode(unref(TMagicCol), { span: 12 }, {
4621
5030
  default: withCtx(() => [
@@ -4624,7 +5033,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4624
5033
  default: withCtx(() => _cache[1] || (_cache[1] = [
4625
5034
  createTextVNode("关闭")
4626
5035
  ])),
4627
- _: 1
5036
+ _: 1,
5037
+ __: [1]
4628
5038
  }),
4629
5039
  createVNode(unref(TMagicButton), {
4630
5040
  type: "primary",
@@ -4633,43 +5043,57 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4633
5043
  onClick: submitHandler
4634
5044
  }, {
4635
5045
  default: withCtx(() => [
4636
- createTextVNode(toDisplayString(_ctx.confirmText), 1)
5046
+ createTextVNode(
5047
+ toDisplayString(_ctx.confirmText),
5048
+ 1
5049
+ /* TEXT */
5050
+ )
4637
5051
  ]),
4638
5052
  _: 1
5053
+ /* STABLE */
4639
5054
  }, 8, ["disabled", "loading"])
4640
5055
  ])
4641
5056
  ]),
4642
5057
  _: 3
5058
+ /* FORWARDED */
4643
5059
  })
4644
5060
  ]),
4645
5061
  _: 3
5062
+ /* FORWARDED */
4646
5063
  })
4647
5064
  ]),
4648
5065
  default: withCtx(() => [
4649
- visible.value ? (openBlock(), createElementBlock("div", {
4650
- key: 0,
4651
- ref_key: "drawerBody",
4652
- ref: drawerBody,
4653
- class: "m-drawer-body"
4654
- }, [
4655
- createVNode(_sfc_main$d, {
4656
- ref_key: "form",
4657
- ref: form,
4658
- size: _ctx.size,
4659
- disabled: _ctx.disabled,
4660
- config: _ctx.config,
4661
- "init-values": _ctx.values,
4662
- "parent-values": _ctx.parentValues,
4663
- "label-width": _ctx.labelWidth,
4664
- "label-position": _ctx.labelPosition,
4665
- inline: _ctx.inline,
4666
- "prevent-submit-default": _ctx.preventSubmitDefault,
4667
- onChange: changeHandler
4668
- }, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
4669
- renderSlot(_ctx.$slots, "default")
4670
- ], 512)) : createCommentVNode("", true)
5066
+ visible.value ? (openBlock(), createElementBlock(
5067
+ "div",
5068
+ {
5069
+ key: 0,
5070
+ ref_key: "drawerBody",
5071
+ ref: drawerBody,
5072
+ class: "m-drawer-body"
5073
+ },
5074
+ [
5075
+ createVNode(_sfc_main$d, {
5076
+ ref_key: "form",
5077
+ ref: form,
5078
+ size: _ctx.size,
5079
+ disabled: _ctx.disabled,
5080
+ config: _ctx.config,
5081
+ "init-values": _ctx.values,
5082
+ "parent-values": _ctx.parentValues,
5083
+ "label-width": _ctx.labelWidth,
5084
+ "label-position": _ctx.labelPosition,
5085
+ inline: _ctx.inline,
5086
+ "prevent-submit-default": _ctx.preventSubmitDefault,
5087
+ onChange: changeHandler
5088
+ }, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
5089
+ renderSlot(_ctx.$slots, "default")
5090
+ ],
5091
+ 512
5092
+ /* NEED_PATCH */
5093
+ )) : createCommentVNode("v-if", true)
4671
5094
  ]),
4672
5095
  _: 3
5096
+ /* FORWARDED */
4673
5097
  }, 8, ["modelValue", "title", "close-on-press-escape", "size", "zIndex", "before-close"]);
4674
5098
  };
4675
5099
  }
@@ -4740,60 +5164,84 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4740
5164
  hide
4741
5165
  });
4742
5166
  return (_ctx, _cache) => {
4743
- return openBlock(), createElementBlock("div", {
4744
- class: "m-form-box",
4745
- style: normalizeStyle(style.value)
4746
- }, [
4747
- createElementVNode("div", {
4748
- class: "m-box-body",
4749
- style: normalizeStyle(bodyHeight.value ? { height: `${bodyHeight.value}px` } : {})
4750
- }, [
4751
- createVNode(unref(TMagicScrollbar), null, {
4752
- default: withCtx(() => [
4753
- createVNode(_sfc_main$d, {
4754
- ref_key: "form",
4755
- ref: form,
4756
- size: _ctx.size,
4757
- disabled: _ctx.disabled,
4758
- config: _ctx.config,
4759
- "init-values": _ctx.values,
4760
- "parent-values": _ctx.parentValues,
4761
- "label-width": _ctx.labelWidth,
4762
- "label-position": _ctx.labelPosition,
4763
- inline: _ctx.inline,
4764
- "prevent-submit-default": _ctx.preventSubmitDefault,
4765
- onChange: changeHandler
4766
- }, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
4767
- renderSlot(_ctx.$slots, "default")
4768
- ]),
4769
- _: 3
4770
- })
4771
- ], 4),
4772
- createElementVNode("div", {
4773
- class: "dialog-footer",
4774
- style: normalizeStyle(`height: ${footerHeight}px`)
4775
- }, [
4776
- createElementVNode("div", null, [
4777
- renderSlot(_ctx.$slots, "left")
4778
- ]),
4779
- createElementVNode("div", null, [
4780
- renderSlot(_ctx.$slots, "footer", {}, () => [
4781
- createVNode(unref(TMagicButton), {
4782
- type: "primary",
4783
- size: _ctx.size,
4784
- disabled: _ctx.disabled,
4785
- loading: saveFetch.value,
4786
- onClick: submitHandler
4787
- }, {
5167
+ return openBlock(), createElementBlock(
5168
+ "div",
5169
+ {
5170
+ class: "m-form-box",
5171
+ style: normalizeStyle(style.value)
5172
+ },
5173
+ [
5174
+ createElementVNode(
5175
+ "div",
5176
+ {
5177
+ class: "m-box-body",
5178
+ style: normalizeStyle(bodyHeight.value ? { height: `${bodyHeight.value}px` } : {})
5179
+ },
5180
+ [
5181
+ createVNode(unref(TMagicScrollbar), null, {
4788
5182
  default: withCtx(() => [
4789
- createTextVNode(toDisplayString(_ctx.confirmText), 1)
5183
+ createVNode(_sfc_main$d, {
5184
+ ref_key: "form",
5185
+ ref: form,
5186
+ size: _ctx.size,
5187
+ disabled: _ctx.disabled,
5188
+ config: _ctx.config,
5189
+ "init-values": _ctx.values,
5190
+ "parent-values": _ctx.parentValues,
5191
+ "label-width": _ctx.labelWidth,
5192
+ "label-position": _ctx.labelPosition,
5193
+ inline: _ctx.inline,
5194
+ "prevent-submit-default": _ctx.preventSubmitDefault,
5195
+ onChange: changeHandler
5196
+ }, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline", "prevent-submit-default"]),
5197
+ renderSlot(_ctx.$slots, "default")
4790
5198
  ]),
4791
- _: 1
4792
- }, 8, ["size", "disabled", "loading"])
4793
- ])
4794
- ])
4795
- ], 4)
4796
- ], 4);
5199
+ _: 3
5200
+ /* FORWARDED */
5201
+ })
5202
+ ],
5203
+ 4
5204
+ /* STYLE */
5205
+ ),
5206
+ createElementVNode(
5207
+ "div",
5208
+ {
5209
+ class: "dialog-footer",
5210
+ style: normalizeStyle(`height: ${footerHeight}px`)
5211
+ },
5212
+ [
5213
+ createElementVNode("div", null, [
5214
+ renderSlot(_ctx.$slots, "left")
5215
+ ]),
5216
+ createElementVNode("div", null, [
5217
+ renderSlot(_ctx.$slots, "footer", {}, () => [
5218
+ createVNode(unref(TMagicButton), {
5219
+ type: "primary",
5220
+ size: _ctx.size,
5221
+ disabled: _ctx.disabled,
5222
+ loading: saveFetch.value,
5223
+ onClick: submitHandler
5224
+ }, {
5225
+ default: withCtx(() => [
5226
+ createTextVNode(
5227
+ toDisplayString(_ctx.confirmText),
5228
+ 1
5229
+ /* TEXT */
5230
+ )
5231
+ ]),
5232
+ _: 1
5233
+ /* STABLE */
5234
+ }, 8, ["size", "disabled", "loading"])
5235
+ ])
5236
+ ])
5237
+ ],
5238
+ 4
5239
+ /* STYLE */
5240
+ )
5241
+ ],
5242
+ 4
5243
+ /* STYLE */
5244
+ );
4797
5245
  };
4798
5246
  }
4799
5247
  });