vxe-table 4.23.8 → 4.23.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/all.esm.js +5715 -3783
  2. package/es/components.d.ts +1 -0
  3. package/es/components.js +2 -7
  4. package/es/grid/src/emits.js +1 -15
  5. package/es/grid/src/grid.js +397 -120
  6. package/es/index.esm.js +1 -0
  7. package/es/index.js +1 -0
  8. package/es/table/module/custom/hook.js +49 -42
  9. package/es/table/module/custom/panel.js +777 -527
  10. package/es/table/module/edit/hook.js +140 -62
  11. package/es/table/module/export/export-panel.js +399 -316
  12. package/es/table/module/export/hook.js +395 -337
  13. package/es/table/module/export/import-panel.js +152 -123
  14. package/es/table/module/filter/hook.js +16 -2
  15. package/es/table/module/filter/panel.js +146 -84
  16. package/es/table/module/keyboard/hook.js +8 -4
  17. package/es/table/module/menu/panel.js +197 -126
  18. package/es/table/render/index.js +151 -98
  19. package/es/table/src/body.js +355 -233
  20. package/es/table/src/cell.js +426 -269
  21. package/es/table/src/columnInfo.js +1 -0
  22. package/es/table/src/footer.js +144 -99
  23. package/es/table/src/group.js +7 -3
  24. package/es/table/src/header.js +229 -172
  25. package/es/table/src/table.js +1503 -1030
  26. package/es/table/src/util.js +15 -19
  27. package/es/toolbar/src/toolbar.js +132 -75
  28. package/es/ui/index.js +1 -1
  29. package/es/ui/src/dom.js +9 -6
  30. package/es/ui/src/log.js +1 -1
  31. package/es/ui/src/utils.d.ts +1 -1
  32. package/lib/components.js +2 -7
  33. package/lib/grid/src/emits.js +1 -15
  34. package/lib/grid/src/grid.js +397 -120
  35. package/lib/index.common.js +1 -0
  36. package/lib/index.js +1 -0
  37. package/lib/index.umd.js +5732 -3800
  38. package/lib/index.umd.min.js +3 -3
  39. package/lib/table/module/custom/hook.js +49 -42
  40. package/lib/table/module/custom/panel.js +777 -527
  41. package/lib/table/module/edit/hook.js +140 -62
  42. package/lib/table/module/export/export-panel.js +399 -316
  43. package/lib/table/module/export/hook.js +395 -337
  44. package/lib/table/module/export/import-panel.js +152 -123
  45. package/lib/table/module/filter/hook.js +16 -2
  46. package/lib/table/module/filter/panel.js +146 -84
  47. package/lib/table/module/keyboard/hook.js +8 -4
  48. package/lib/table/module/menu/panel.js +197 -126
  49. package/lib/table/render/index.js +151 -98
  50. package/lib/table/src/body.js +355 -233
  51. package/lib/table/src/cell.js +426 -269
  52. package/lib/table/src/columnInfo.js +1 -0
  53. package/lib/table/src/footer.js +144 -99
  54. package/lib/table/src/group.js +7 -3
  55. package/lib/table/src/header.js +229 -172
  56. package/lib/table/src/table.js +1471 -1029
  57. package/lib/table/src/util.js +15 -19
  58. package/lib/toolbar/src/toolbar.js +132 -75
  59. package/lib/ui/index.js +1 -1
  60. package/lib/ui/src/dom.js +9 -6
  61. package/lib/ui/src/log.js +1 -1
  62. package/package.json +2 -2
  63. package/packages/colgroup/index.ts +22 -22
  64. package/packages/column/index.ts +22 -22
  65. package/packages/components.ts +41 -44
  66. package/packages/grid/index.ts +18 -18
  67. package/packages/grid/src/emits.ts +5 -19
  68. package/packages/grid/src/grid.ts +2229 -1925
  69. package/packages/grid/src/props.ts +22 -23
  70. package/packages/index.ts +11 -11
  71. package/packages/locale/lang/fr-FR.ts +15 -15
  72. package/packages/locale/lang/it-IT.ts +4 -4
  73. package/packages/locale/lang/uk-UA.ts +1 -1
  74. package/packages/locale/lang/uz-UZ.ts +13 -13
  75. package/packages/locale/lang/zh-CN.ts +907 -907
  76. package/packages/table/index.ts +26 -26
  77. package/packages/table/module/custom/hook.ts +510 -503
  78. package/packages/table/module/custom/panel.ts +2002 -1743
  79. package/packages/table/module/edit/hook.ts +1224 -1131
  80. package/packages/table/module/export/export-panel.ts +697 -611
  81. package/packages/table/module/export/hook.ts +2160 -2059
  82. package/packages/table/module/export/import-panel.ts +319 -279
  83. package/packages/table/module/export/util.ts +25 -24
  84. package/packages/table/module/filter/hook.ts +519 -501
  85. package/packages/table/module/filter/panel.ts +368 -304
  86. package/packages/table/module/keyboard/hook.ts +498 -494
  87. package/packages/table/module/menu/hook.ts +330 -330
  88. package/packages/table/module/menu/panel.ts +272 -201
  89. package/packages/table/module/validator/hook.ts +653 -635
  90. package/packages/table/render/index.ts +1819 -1744
  91. package/packages/table/src/body.ts +1078 -955
  92. package/packages/table/src/cell.ts +1524 -1359
  93. package/packages/table/src/column.ts +192 -192
  94. package/packages/table/src/columnInfo.ts +232 -232
  95. package/packages/table/src/emits.ts +134 -134
  96. package/packages/table/src/footer.ts +425 -380
  97. package/packages/table/src/group.ts +67 -63
  98. package/packages/table/src/header.ts +642 -581
  99. package/packages/table/src/props.ts +336 -336
  100. package/packages/table/src/store.ts +14 -14
  101. package/packages/table/src/table.ts +16011 -15454
  102. package/packages/table/src/use/cell-view.ts +41 -44
  103. package/packages/table/src/use/index.ts +1 -1
  104. package/packages/table/src/util.ts +1206 -1216
  105. package/packages/toolbar/index.ts +18 -18
  106. package/packages/toolbar/src/toolbar.ts +768 -706
  107. package/packages/ui/index.ts +519 -520
  108. package/packages/ui/src/anime.ts +51 -52
  109. package/packages/ui/src/comp.ts +3 -3
  110. package/packages/ui/src/dom.ts +466 -463
  111. package/packages/ui/src/log.ts +19 -19
  112. package/packages/ui/src/utils.ts +66 -66
  113. package/packages/ui/src/vn.ts +55 -55
  114. package/packages/v-x-e-table/index.d.ts +3 -3
  115. package/packages/v-x-e-table/index.ts +3 -3
  116. package/types/all.d.ts +76 -76
  117. package/types/index.d.ts +4 -4
  118. /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  119. /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  120. /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
  121. /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  122. /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  123. /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
  124. /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  125. /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  126. /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
@@ -414,7 +414,7 @@ var panel_default = defineVxeComponent({
414
414
  } else {
415
415
  }
416
416
  const oldewMatchRest = XEUtils.findTree(collectColumn, (item) => item.id === dragColumn.id);
417
- if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
417
+ if (isSelfToChildStatus && isCrossDrag && isSelfToChildDrag) {
418
418
  if (oldewMatchRest) {
419
419
  const { items: oCols, index: oIndex } = oldewMatchRest;
420
420
  const childList = dragColumn.children || [];
@@ -601,41 +601,60 @@ var panel_default = defineVxeComponent({
601
601
  return h("div", {}, [
602
602
  h("div", {
603
603
  ref: refDragLineElem,
604
- class: ["vxe-table-custom-popup--drag-line", {
605
- "is--guides": columnDragOpts.showGuidesStatus
606
- }]
604
+ class: [
605
+ "vxe-table-custom-popup--drag-line",
606
+ {
607
+ "is--guides": columnDragOpts.showGuidesStatus
608
+ }
609
+ ]
607
610
  }),
608
- h("div", {
609
- ref: refDragTipElem,
610
- class: "vxe-table-custom-popup--drag-tip"
611
- }, [
612
- h("div", {
613
- class: "vxe-table-custom-popup--drag-tip-wrapper"
614
- }, [
615
- h("div", {
616
- class: "vxe-table-custom-popup--drag-tip-status"
617
- }, [
618
- h("span", {
619
- class: ["vxe-table-custom-popup--drag-tip-normal-status", getIcon().TABLE_DRAG_STATUS_ROW]
620
- }),
621
- h("span", {
622
- class: ["vxe-table-custom-popup--drag-tip-sub-status", getIcon().TABLE_DRAG_STATUS_SUB_ROW]
623
- }),
624
- h("span", {
625
- class: ["vxe-table-custom-popup--drag-tip-group-status", getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
626
- }),
627
- h("span", {
628
- class: ["vxe-table-custom-popup--drag-tip-values-status", getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
629
- }),
630
- h("span", {
631
- class: ["vxe-table-custom-popup--drag-tip-disabled-status", getIcon().TABLE_DRAG_DISABLED]
632
- })
633
- ]),
634
- h("div", {
635
- class: "vxe-table-custom-popup--drag-tip-content"
636
- }, `${dragTipText || ""}`)
637
- ])
638
- ])
611
+ h(
612
+ "div",
613
+ {
614
+ ref: refDragTipElem,
615
+ class: "vxe-table-custom-popup--drag-tip"
616
+ },
617
+ [
618
+ h(
619
+ "div",
620
+ {
621
+ class: "vxe-table-custom-popup--drag-tip-wrapper"
622
+ },
623
+ [
624
+ h(
625
+ "div",
626
+ {
627
+ class: "vxe-table-custom-popup--drag-tip-status"
628
+ },
629
+ [
630
+ h("span", {
631
+ class: ["vxe-table-custom-popup--drag-tip-normal-status", getIcon().TABLE_DRAG_STATUS_ROW]
632
+ }),
633
+ h("span", {
634
+ class: ["vxe-table-custom-popup--drag-tip-sub-status", getIcon().TABLE_DRAG_STATUS_SUB_ROW]
635
+ }),
636
+ h("span", {
637
+ class: ["vxe-table-custom-popup--drag-tip-group-status", getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
638
+ }),
639
+ h("span", {
640
+ class: ["vxe-table-custom-popup--drag-tip-values-status", getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
641
+ }),
642
+ h("span", {
643
+ class: ["vxe-table-custom-popup--drag-tip-disabled-status", getIcon().TABLE_DRAG_DISABLED]
644
+ })
645
+ ]
646
+ ),
647
+ h(
648
+ "div",
649
+ {
650
+ class: "vxe-table-custom-popup--drag-tip-content"
651
+ },
652
+ `${dragTipText || ""}`
653
+ )
654
+ ]
655
+ )
656
+ ]
657
+ )
639
658
  ]);
640
659
  };
641
660
  const renderSimplePanel = () => {
@@ -686,234 +705,347 @@ var panel_default = defineVxeComponent({
686
705
  const isHidden = !isChecked;
687
706
  const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
688
707
  colVNs.push(
689
- h("li", {
690
- key: column.id,
691
- colid: column.id,
692
- class: ["vxe-table-custom--option", `level--${column.level}`, {
693
- "is--hidden": isDisabled || isHidden,
694
- "is--group": isColGroup
695
- }],
696
- onDragstart: sortDragstartEvent,
697
- onDragend: sortDragendEvent,
698
- onDragover: sortDragoverEvent
699
- }, [
700
- allowVisible ? h("div", {
701
- class: ["vxe-table-custom--checkbox-option", {
702
- "is--checked": isChecked,
703
- "is--indeterminate": isIndeterminate,
704
- "is--disabled": isDisabled
705
- }],
706
- title: getI18n("vxe.custom.setting.colVisible"),
707
- onClick: (evnt) => {
708
- if (!isDisabled) {
709
- changeCheckboxOption(column, evnt);
708
+ h(
709
+ "li",
710
+ {
711
+ key: column.id,
712
+ colid: column.id,
713
+ class: [
714
+ "vxe-table-custom--option",
715
+ `level--${column.level}`,
716
+ {
717
+ "is--hidden": isDisabled || isHidden,
718
+ "is--group": isColGroup
710
719
  }
711
- }
712
- }, [
713
- h("span", {
714
- class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
715
- })
716
- ]) : renderEmptyElement($xeTable),
717
- h("div", {
718
- class: "vxe-table-custom--name-option"
719
- }, [
720
- allowSort && showSortDragButton || (allowGroup || allowValues) ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? h("div", {
721
- class: "vxe-table-custom--sort-option"
722
- }, [
723
- h("span", {
724
- class: ["vxe-table-custom--sort-btn", {
725
- "is--disabled": isHidden
726
- }],
727
- title: getI18n("vxe.custom.setting.sortHelpTip"),
728
- ...isHidden ? {} : {
729
- onMousedown: sortMousedownEvent,
730
- onMouseup: sortMouseupEvent
720
+ ],
721
+ onDragstart: sortDragstartEvent,
722
+ onDragend: sortDragendEvent,
723
+ onDragover: sortDragoverEvent
724
+ },
725
+ [
726
+ allowVisible ? h(
727
+ "div",
728
+ {
729
+ class: [
730
+ "vxe-table-custom--checkbox-option",
731
+ {
732
+ "is--checked": isChecked,
733
+ "is--indeterminate": isIndeterminate,
734
+ "is--disabled": isDisabled
735
+ }
736
+ ],
737
+ title: getI18n("vxe.custom.setting.colVisible"),
738
+ onClick: (evnt) => {
739
+ if (!isDisabled) {
740
+ changeCheckboxOption(column, evnt);
741
+ }
731
742
  }
732
- }, [
733
- h("i", {
734
- class: getIcon().TABLE_CUSTOM_SORT
743
+ },
744
+ [
745
+ h("span", {
746
+ class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
735
747
  })
736
- ])
737
- ]) : renderEmptyElement($xeTable) : renderEmptyElement($xeTable),
738
- column.type === "html" ? h("div", {
739
- key: "1",
740
- class: "vxe-table-custom--checkbox-label",
741
- innerHTML: colTitle
742
- }) : h("div", {
743
- key: "0",
744
- class: "vxe-table-custom--checkbox-label"
745
- }, colTitle)
746
- ]),
747
- showSortBtn && (showSortMoveButton || showSortPutButton) ? h("div", {
748
- class: "vxe-table-custom--move-btn-option"
749
- }, VxeUIButtonComponent ? [
750
- showSortMoveButton ? h(VxeUIButtonComponent, {
751
- mode: "text",
752
- icon: "vxe-icon-arrows-up",
753
- title: getI18n("vxe.custom.setting.moveUpTitle"),
754
- disabled: index <= 0,
755
- onClick(evntParame) {
756
- sortMoveUpEvent(evntParame, column);
757
- }
758
- }) : renderEmptyElement($xeTable),
759
- showSortMoveButton ? h(VxeUIButtonComponent, {
760
- mode: "text",
761
- icon: "vxe-icon-arrows-down",
762
- title: getI18n("vxe.custom.setting.moveDnTitle"),
763
- disabled: index >= items.length - 1,
764
- onClick(evntParame) {
765
- sortMoveDnEvent(evntParame, column);
766
- }
767
- }) : renderEmptyElement($xeTable),
768
- showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
769
- mode: "text",
770
- icon: "vxe-icon-top",
771
- title: getI18n("vxe.custom.setting.putTopTitle"),
772
- disabled: index <= 0,
773
- onClick(evntParame) {
774
- sortMoveTopEvent(evntParame, column);
775
- }
776
- }) : renderEmptyElement($xeTable),
777
- showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
778
- mode: "text",
779
- icon: "vxe-icon-bottom",
780
- title: getI18n("vxe.custom.setting.putBottomTitle"),
781
- disabled: index >= items.length - 1,
782
- onClick(evntParame) {
783
- sortMoveBottomEvent(evntParame, column);
784
- }
785
- }) : renderEmptyElement($xeTable)
786
- ] : []) : renderEmptyElement($xeTable),
787
- !parentItem && allowFixed ? h("div", {
788
- class: "vxe-table-custom--fixed-option"
789
- }, VxeUIButtonComponent ? [
790
- h(VxeUIButtonComponent, {
791
- mode: "text",
792
- icon: column.renderFixed === "left" ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
793
- status: column.renderFixed === "left" ? "primary" : "",
794
- disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
795
- title: getI18n(column.renderFixed === "left" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedLeft"),
796
- onClick: ({ $event }) => {
797
- changeFixedOption(column, "left", $event);
798
- }
799
- }),
800
- h(VxeUIButtonComponent, {
801
- mode: "text",
802
- icon: column.renderFixed === "right" ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
803
- status: column.renderFixed === "right" ? "primary" : "",
804
- disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
805
- title: getI18n(column.renderFixed === "right" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedRight"),
806
- onClick: ({ $event }) => {
807
- changeFixedOption(column, "right", $event);
808
- }
809
- })
810
- ] : []) : renderEmptyElement($xeTable)
811
- ])
748
+ ]
749
+ ) : renderEmptyElement($xeTable),
750
+ h(
751
+ "div",
752
+ {
753
+ class: "vxe-table-custom--name-option"
754
+ },
755
+ [
756
+ allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? h(
757
+ "div",
758
+ {
759
+ class: "vxe-table-custom--sort-option"
760
+ },
761
+ [
762
+ h(
763
+ "span",
764
+ {
765
+ class: [
766
+ "vxe-table-custom--sort-btn",
767
+ {
768
+ "is--disabled": isHidden
769
+ }
770
+ ],
771
+ title: getI18n("vxe.custom.setting.sortHelpTip"),
772
+ ...isHidden ? {} : {
773
+ onMousedown: sortMousedownEvent,
774
+ onMouseup: sortMouseupEvent
775
+ }
776
+ },
777
+ [
778
+ h("i", {
779
+ class: getIcon().TABLE_CUSTOM_SORT
780
+ })
781
+ ]
782
+ )
783
+ ]
784
+ ) : renderEmptyElement($xeTable) : renderEmptyElement($xeTable),
785
+ column.type === "html" ? h("div", {
786
+ key: "1",
787
+ class: "vxe-table-custom--checkbox-label",
788
+ innerHTML: colTitle
789
+ }) : h(
790
+ "div",
791
+ {
792
+ key: "0",
793
+ class: "vxe-table-custom--checkbox-label"
794
+ },
795
+ colTitle
796
+ )
797
+ ]
798
+ ),
799
+ showSortBtn && (showSortMoveButton || showSortPutButton) ? h(
800
+ "div",
801
+ {
802
+ class: "vxe-table-custom--move-btn-option"
803
+ },
804
+ VxeUIButtonComponent ? [
805
+ showSortMoveButton ? h(VxeUIButtonComponent, {
806
+ mode: "text",
807
+ icon: "vxe-icon-arrows-up",
808
+ title: getI18n("vxe.custom.setting.moveUpTitle"),
809
+ disabled: index <= 0,
810
+ onClick(evntParame) {
811
+ sortMoveUpEvent(evntParame, column);
812
+ }
813
+ }) : renderEmptyElement($xeTable),
814
+ showSortMoveButton ? h(VxeUIButtonComponent, {
815
+ mode: "text",
816
+ icon: "vxe-icon-arrows-down",
817
+ title: getI18n("vxe.custom.setting.moveDnTitle"),
818
+ disabled: index >= items.length - 1,
819
+ onClick(evntParame) {
820
+ sortMoveDnEvent(evntParame, column);
821
+ }
822
+ }) : renderEmptyElement($xeTable),
823
+ showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
824
+ mode: "text",
825
+ icon: "vxe-icon-top",
826
+ title: getI18n("vxe.custom.setting.putTopTitle"),
827
+ disabled: index <= 0,
828
+ onClick(evntParame) {
829
+ sortMoveTopEvent(evntParame, column);
830
+ }
831
+ }) : renderEmptyElement($xeTable),
832
+ showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
833
+ mode: "text",
834
+ icon: "vxe-icon-bottom",
835
+ title: getI18n("vxe.custom.setting.putBottomTitle"),
836
+ disabled: index >= items.length - 1,
837
+ onClick(evntParame) {
838
+ sortMoveBottomEvent(evntParame, column);
839
+ }
840
+ }) : renderEmptyElement($xeTable)
841
+ ] : []
842
+ ) : renderEmptyElement($xeTable),
843
+ !parentItem && allowFixed ? h(
844
+ "div",
845
+ {
846
+ class: "vxe-table-custom--fixed-option"
847
+ },
848
+ VxeUIButtonComponent ? [
849
+ h(VxeUIButtonComponent, {
850
+ mode: "text",
851
+ icon: column.renderFixed === "left" ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
852
+ status: column.renderFixed === "left" ? "primary" : "",
853
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
854
+ title: getI18n(column.renderFixed === "left" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedLeft"),
855
+ onClick: ({ $event }) => {
856
+ changeFixedOption(column, "left", $event);
857
+ }
858
+ }),
859
+ h(VxeUIButtonComponent, {
860
+ mode: "text",
861
+ icon: column.renderFixed === "right" ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
862
+ status: column.renderFixed === "right" ? "primary" : "",
863
+ disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
864
+ title: getI18n(column.renderFixed === "right" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedRight"),
865
+ onClick: ({ $event }) => {
866
+ changeFixedOption(column, "right", $event);
867
+ }
868
+ })
869
+ ] : []
870
+ ) : renderEmptyElement($xeTable)
871
+ ]
872
+ )
812
873
  );
813
874
  }
814
875
  });
815
- return h("div", {
816
- ref: refElem,
817
- key: "simple",
818
- class: ["vxe-table-custom-wrapper", `placement--${placement}`, {
819
- [`size--${vSize}`]: vSize,
820
- "is--active": customStore.visible
821
- }],
822
- style: defPopupStyle
823
- }, customStore.visible ? [
824
- h("div", {
825
- ref: refBodyWrapperElem,
826
- class: "vxe-table-custom-simple--body-wrapper"
827
- }, [
828
- !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? h($xeTable.getPivotTableAggregateSimplePanel(), {
829
- customStore
830
- }) : renderEmptyElement($xeTable),
831
- h("div", {
832
- ref: refCustomBodyElem,
833
- class: "vxe-table-custom--handle-wrapper"
834
- }, [
835
- h("div", {
836
- class: "vxe-table-custom--header"
837
- }, headerSlot ? $xeTable.callSlot(headerSlot, params) : [
838
- h("ul", {
839
- class: "vxe-table-custom--panel-list"
840
- }, [
841
- h("li", {
842
- class: "vxe-table-custom--option"
843
- }, [
844
- allowVisible ? h("div", {
845
- class: ["vxe-table-custom--checkbox-option", {
846
- "is--checked": isAllChecked,
847
- "is--indeterminate": isAllIndeterminate
848
- }],
849
- title: getI18n("vxe.table.allTitle"),
850
- onClick: allOptionEvent
851
- }, [
852
- h("span", {
853
- class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
854
- }),
855
- h("span", {
856
- class: "vxe-checkbox--label"
857
- }, getI18n("vxe.toolbar.customAll"))
858
- ]) : h("span", {
859
- class: "vxe-checkbox--label"
860
- }, getI18n("vxe.table.customTitle"))
861
- ])
862
- ])
863
- ]),
864
- h("div", {
865
- class: "vxe-table-custom--body"
866
- }, [
867
- topSlot ? h("div", {
868
- class: "vxe-table-custom--panel-top"
869
- }, $xeTable.callSlot(topSlot, params)) : renderEmptyElement($xeTable),
870
- defaultSlot ? h("div", {
871
- class: "vxe-table-custom--panel-body"
872
- }, $xeTable.callSlot(defaultSlot, params)) : h(TransitionGroup, {
873
- class: "vxe-table-custom--panel-list",
874
- name: isCustomDragStatus ? "vxe-table-custom--list" : "",
875
- tag: "ul",
876
- ...customWrapperOns
877
- }, {
878
- default: () => colVNs
879
- }),
880
- bottomSlot ? h("div", {
881
- class: "vxe-table-custom--panel-bottom"
882
- }, $xeTable.callSlot(bottomSlot, params)) : renderEmptyElement($xeTable)
883
- ]),
884
- customOpts.showFooter ? h("div", {
885
- class: "vxe-table-custom--footer"
886
- }, footerSlot ? $xeTable.callSlot(footerSlot, params) : [
887
- h("div", {
888
- class: "vxe-table-custom--footer-buttons"
889
- }, [
890
- VxeUIButtonComponent ? h(VxeUIButtonComponent, {
891
- mode: "text",
892
- content: customOpts.resetButtonText || getI18n("vxe.table.customRestore"),
893
- disabled: !isCustomStatus,
894
- onClick: resetCustomEvent
895
- }) : renderEmptyElement($xeTable),
896
- immediate ? VxeUIButtonComponent ? h(VxeUIButtonComponent, {
897
- mode: "text",
898
- content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
899
- onClick: cancelCloseEvent
900
- }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? h(VxeUIButtonComponent, {
901
- mode: "text",
902
- content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
903
- onClick: cancelCustomEvent
904
- }) : renderEmptyElement($xeTable),
905
- immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? h(VxeUIButtonComponent, {
906
- mode: "text",
907
- status: "primary",
908
- content: customOpts.confirmButtonText || getI18n("vxe.table.customConfirm"),
909
- onClick: confirmCustomEvent
910
- }) : renderEmptyElement($xeTable)
911
- ])
912
- ]) : null
913
- ]),
914
- renderDragTip()
915
- ])
916
- ] : []);
876
+ return h(
877
+ "div",
878
+ {
879
+ ref: refElem,
880
+ key: "simple",
881
+ class: [
882
+ "vxe-table-custom-wrapper",
883
+ `placement--${placement}`,
884
+ {
885
+ [`size--${vSize}`]: vSize,
886
+ "is--active": customStore.visible
887
+ }
888
+ ],
889
+ style: defPopupStyle
890
+ },
891
+ customStore.visible ? [
892
+ h(
893
+ "div",
894
+ {
895
+ ref: refBodyWrapperElem,
896
+ class: "vxe-table-custom-simple--body-wrapper"
897
+ },
898
+ [
899
+ !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? h($xeTable.getPivotTableAggregateSimplePanel(), {
900
+ customStore
901
+ }) : renderEmptyElement($xeTable),
902
+ h(
903
+ "div",
904
+ {
905
+ ref: refCustomBodyElem,
906
+ class: "vxe-table-custom--handle-wrapper"
907
+ },
908
+ [
909
+ h(
910
+ "div",
911
+ {
912
+ class: "vxe-table-custom--header"
913
+ },
914
+ headerSlot ? $xeTable.callSlot(headerSlot, params) : [
915
+ h(
916
+ "ul",
917
+ {
918
+ class: "vxe-table-custom--panel-list"
919
+ },
920
+ [
921
+ h(
922
+ "li",
923
+ {
924
+ class: "vxe-table-custom--option"
925
+ },
926
+ [
927
+ allowVisible ? h(
928
+ "div",
929
+ {
930
+ class: [
931
+ "vxe-table-custom--checkbox-option",
932
+ {
933
+ "is--checked": isAllChecked,
934
+ "is--indeterminate": isAllIndeterminate
935
+ }
936
+ ],
937
+ title: getI18n("vxe.table.allTitle"),
938
+ onClick: allOptionEvent
939
+ },
940
+ [
941
+ h("span", {
942
+ class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
943
+ }),
944
+ h(
945
+ "span",
946
+ {
947
+ class: "vxe-checkbox--label"
948
+ },
949
+ getI18n("vxe.toolbar.customAll")
950
+ )
951
+ ]
952
+ ) : h(
953
+ "span",
954
+ {
955
+ class: "vxe-checkbox--label"
956
+ },
957
+ getI18n("vxe.table.customTitle")
958
+ )
959
+ ]
960
+ )
961
+ ]
962
+ )
963
+ ]
964
+ ),
965
+ h(
966
+ "div",
967
+ {
968
+ class: "vxe-table-custom--body"
969
+ },
970
+ [
971
+ topSlot ? h(
972
+ "div",
973
+ {
974
+ class: "vxe-table-custom--panel-top"
975
+ },
976
+ $xeTable.callSlot(topSlot, params)
977
+ ) : renderEmptyElement($xeTable),
978
+ defaultSlot ? h(
979
+ "div",
980
+ {
981
+ class: "vxe-table-custom--panel-body"
982
+ },
983
+ $xeTable.callSlot(defaultSlot, params)
984
+ ) : h(
985
+ TransitionGroup,
986
+ {
987
+ class: "vxe-table-custom--panel-list",
988
+ name: isCustomDragStatus ? "vxe-table-custom--list" : "",
989
+ tag: "ul",
990
+ ...customWrapperOns
991
+ },
992
+ {
993
+ default: () => colVNs
994
+ }
995
+ ),
996
+ bottomSlot ? h(
997
+ "div",
998
+ {
999
+ class: "vxe-table-custom--panel-bottom"
1000
+ },
1001
+ $xeTable.callSlot(bottomSlot, params)
1002
+ ) : renderEmptyElement($xeTable)
1003
+ ]
1004
+ ),
1005
+ customOpts.showFooter ? h(
1006
+ "div",
1007
+ {
1008
+ class: "vxe-table-custom--footer"
1009
+ },
1010
+ footerSlot ? $xeTable.callSlot(footerSlot, params) : [
1011
+ h(
1012
+ "div",
1013
+ {
1014
+ class: "vxe-table-custom--footer-buttons"
1015
+ },
1016
+ [
1017
+ VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1018
+ mode: "text",
1019
+ content: customOpts.resetButtonText || getI18n("vxe.table.customRestore"),
1020
+ disabled: !isCustomStatus,
1021
+ onClick: resetCustomEvent
1022
+ }) : renderEmptyElement($xeTable),
1023
+ immediate ? VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1024
+ mode: "text",
1025
+ content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
1026
+ onClick: cancelCloseEvent
1027
+ }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1028
+ mode: "text",
1029
+ content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
1030
+ onClick: cancelCustomEvent
1031
+ }) : renderEmptyElement($xeTable),
1032
+ immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1033
+ mode: "text",
1034
+ status: "primary",
1035
+ content: customOpts.confirmButtonText || getI18n("vxe.table.customConfirm"),
1036
+ onClick: confirmCustomEvent
1037
+ }) : renderEmptyElement($xeTable)
1038
+ ]
1039
+ )
1040
+ ]
1041
+ ) : null
1042
+ ]
1043
+ ),
1044
+ renderDragTip()
1045
+ ]
1046
+ )
1047
+ ] : []
1048
+ );
917
1049
  };
918
1050
  const renderPopupBodys = () => {
919
1051
  const { resizable: allResizable } = tableProps;
@@ -965,128 +1097,166 @@ var panel_default = defineVxeComponent({
965
1097
  const tdVNs = [];
966
1098
  if (allowVisible) {
967
1099
  tdVNs.push(
968
- h("td", {
969
- key: "av",
970
- class: "vxe-table-custom-popup--column-td col--visible"
971
- }, [
972
- h("div", {
973
- class: ["vxe-table-custom--checkbox-option", {
974
- "is--checked": isChecked,
975
- "is--indeterminate": isIndeterminate,
976
- "is--disabled": isDisabled
977
- }],
978
- title: getI18n("vxe.custom.setting.colVisible"),
979
- onClick: (evnt) => {
980
- if (!isDisabled) {
981
- changeCheckboxOption(column, evnt);
982
- }
983
- }
984
- }, [
985
- h("span", {
986
- class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
987
- })
988
- ])
989
- ])
1100
+ h(
1101
+ "td",
1102
+ {
1103
+ key: "av",
1104
+ class: "vxe-table-custom-popup--column-td col--visible"
1105
+ },
1106
+ [
1107
+ h(
1108
+ "div",
1109
+ {
1110
+ class: [
1111
+ "vxe-table-custom--checkbox-option",
1112
+ {
1113
+ "is--checked": isChecked,
1114
+ "is--indeterminate": isIndeterminate,
1115
+ "is--disabled": isDisabled
1116
+ }
1117
+ ],
1118
+ title: getI18n("vxe.custom.setting.colVisible"),
1119
+ onClick: (evnt) => {
1120
+ if (!isDisabled) {
1121
+ changeCheckboxOption(column, evnt);
1122
+ }
1123
+ }
1124
+ },
1125
+ [
1126
+ h("span", {
1127
+ class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1128
+ })
1129
+ ]
1130
+ )
1131
+ ]
1132
+ )
990
1133
  );
991
1134
  }
992
1135
  tdVNs.push(
993
- h("td", {
994
- key: "at",
995
- class: "vxe-table-custom-popup--column-td col--name"
996
- }, [
997
- h("div", {
998
- class: "vxe-table-custom-popup--name"
999
- }, [
1000
- allowSort && showSortDragButton || (allowGroup || allowValues) ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? h("div", {
1001
- class: ["vxe-table-custom-popup--column-sort-btn", {
1002
- "is--disabled": isHidden
1003
- }],
1004
- title: getI18n("vxe.custom.setting.sortHelpTip"),
1005
- ...isHidden ? {} : {
1006
- onMousedown: sortMousedownEvent,
1007
- onMouseup: sortMouseupEvent
1008
- }
1009
- }, [
1010
- h("i", {
1011
- class: getIcon().TABLE_CUSTOM_SORT
1012
- })
1013
- ]) : h("div", {
1014
- class: "vxe-table-custom-popup--column-sort-placeholder"
1015
- }) : renderEmptyElement($xeTable),
1016
- column.type === "html" ? h("div", {
1017
- key: "1",
1018
- class: "vxe-table-custom-popup--title",
1019
- innerHTML: colTitle
1020
- }) : h("div", {
1021
- key: "0",
1022
- class: "vxe-table-custom-popup--title",
1023
- title: colTitle
1024
- }, colTitle),
1025
- showSortBtn && (showSortMoveButton || showSortPutButton) ? h("div", {
1026
- class: "vxe-table-custom-popup--move-btn"
1027
- }, VxeUIButtonComponent ? [
1028
- showSortMoveButton ? h(VxeUIButtonComponent, {
1029
- mode: "text",
1030
- icon: "vxe-icon-arrows-up",
1031
- title: getI18n("vxe.custom.setting.moveUpTitle"),
1032
- disabled: index <= 0,
1033
- onClick(evntParame) {
1034
- sortMoveUpEvent(evntParame, column);
1035
- }
1036
- }) : renderEmptyElement($xeTable),
1037
- showSortMoveButton ? h(VxeUIButtonComponent, {
1038
- mode: "text",
1039
- icon: "vxe-icon-arrows-down",
1040
- title: getI18n("vxe.custom.setting.moveDnTitle"),
1041
- disabled: index >= items.length - 1,
1042
- onClick(evntParame) {
1043
- sortMoveDnEvent(evntParame, column);
1044
- }
1045
- }) : renderEmptyElement($xeTable),
1046
- showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
1047
- mode: "text",
1048
- icon: "vxe-icon-top",
1049
- title: getI18n("vxe.custom.setting.putTopTitle"),
1050
- disabled: index <= 0,
1051
- onClick(evntParame) {
1052
- sortMoveTopEvent(evntParame, column);
1053
- }
1054
- }) : renderEmptyElement($xeTable),
1055
- showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
1056
- mode: "text",
1057
- icon: "vxe-icon-bottom",
1058
- title: getI18n("vxe.custom.setting.putBottomTitle"),
1059
- disabled: index >= items.length - 1,
1060
- onClick(evntParame) {
1061
- sortMoveBottomEvent(evntParame, column);
1062
- }
1063
- }) : renderEmptyElement($xeTable)
1064
- ] : []) : renderEmptyElement($xeTable)
1065
- ])
1066
- ])
1136
+ h(
1137
+ "td",
1138
+ {
1139
+ key: "at",
1140
+ class: "vxe-table-custom-popup--column-td col--name"
1141
+ },
1142
+ [
1143
+ h(
1144
+ "div",
1145
+ {
1146
+ class: "vxe-table-custom-popup--name"
1147
+ },
1148
+ [
1149
+ allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? h(
1150
+ "div",
1151
+ {
1152
+ class: [
1153
+ "vxe-table-custom-popup--column-sort-btn",
1154
+ {
1155
+ "is--disabled": isHidden
1156
+ }
1157
+ ],
1158
+ title: getI18n("vxe.custom.setting.sortHelpTip"),
1159
+ ...isHidden ? {} : {
1160
+ onMousedown: sortMousedownEvent,
1161
+ onMouseup: sortMouseupEvent
1162
+ }
1163
+ },
1164
+ [
1165
+ h("i", {
1166
+ class: getIcon().TABLE_CUSTOM_SORT
1167
+ })
1168
+ ]
1169
+ ) : h("div", {
1170
+ class: "vxe-table-custom-popup--column-sort-placeholder"
1171
+ }) : renderEmptyElement($xeTable),
1172
+ column.type === "html" ? h("div", {
1173
+ key: "1",
1174
+ class: "vxe-table-custom-popup--title",
1175
+ innerHTML: colTitle
1176
+ }) : h(
1177
+ "div",
1178
+ {
1179
+ key: "0",
1180
+ class: "vxe-table-custom-popup--title",
1181
+ title: colTitle
1182
+ },
1183
+ colTitle
1184
+ ),
1185
+ showSortBtn && (showSortMoveButton || showSortPutButton) ? h(
1186
+ "div",
1187
+ {
1188
+ class: "vxe-table-custom-popup--move-btn"
1189
+ },
1190
+ VxeUIButtonComponent ? [
1191
+ showSortMoveButton ? h(VxeUIButtonComponent, {
1192
+ mode: "text",
1193
+ icon: "vxe-icon-arrows-up",
1194
+ title: getI18n("vxe.custom.setting.moveUpTitle"),
1195
+ disabled: index <= 0,
1196
+ onClick(evntParame) {
1197
+ sortMoveUpEvent(evntParame, column);
1198
+ }
1199
+ }) : renderEmptyElement($xeTable),
1200
+ showSortMoveButton ? h(VxeUIButtonComponent, {
1201
+ mode: "text",
1202
+ icon: "vxe-icon-arrows-down",
1203
+ title: getI18n("vxe.custom.setting.moveDnTitle"),
1204
+ disabled: index >= items.length - 1,
1205
+ onClick(evntParame) {
1206
+ sortMoveDnEvent(evntParame, column);
1207
+ }
1208
+ }) : renderEmptyElement($xeTable),
1209
+ showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
1210
+ mode: "text",
1211
+ icon: "vxe-icon-top",
1212
+ title: getI18n("vxe.custom.setting.putTopTitle"),
1213
+ disabled: index <= 0,
1214
+ onClick(evntParame) {
1215
+ sortMoveTopEvent(evntParame, column);
1216
+ }
1217
+ }) : renderEmptyElement($xeTable),
1218
+ showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
1219
+ mode: "text",
1220
+ icon: "vxe-icon-bottom",
1221
+ title: getI18n("vxe.custom.setting.putBottomTitle"),
1222
+ disabled: index >= items.length - 1,
1223
+ onClick(evntParame) {
1224
+ sortMoveBottomEvent(evntParame, column);
1225
+ }
1226
+ }) : renderEmptyElement($xeTable)
1227
+ ] : []
1228
+ ) : renderEmptyElement($xeTable)
1229
+ ]
1230
+ )
1231
+ ]
1232
+ )
1067
1233
  );
1068
1234
  if (allowResizable) {
1069
1235
  tdVNs.push(
1070
- h("td", {
1071
- key: "aw",
1072
- class: "vxe-table-custom-popup--column-td col--resizable"
1073
- }, [
1074
- column.children && column.children.length || !(XEUtils.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? h("span", "-") : VxeUINumberInputComponent ? h(VxeUINumberInputComponent, {
1075
- type: "integer",
1076
- immediate: false,
1077
- disabled: isHidden,
1078
- modelValue: column.renderResizeWidth,
1079
- min: customMinWidth || 0,
1080
- max: customMaxWidth || 9999,
1081
- "onUpdate:modelValue"(value) {
1082
- const width = Math.max(0, Number(value));
1083
- column.renderResizeWidth = width;
1084
- },
1085
- onChange() {
1086
- changeColumnWidth(column);
1087
- }
1088
- }) : renderEmptyElement($xeTable)
1089
- ])
1236
+ h(
1237
+ "td",
1238
+ {
1239
+ key: "aw",
1240
+ class: "vxe-table-custom-popup--column-td col--resizable"
1241
+ },
1242
+ [
1243
+ column.children && column.children.length || !(XEUtils.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? h("span", "-") : VxeUINumberInputComponent ? h(VxeUINumberInputComponent, {
1244
+ type: "integer",
1245
+ immediate: false,
1246
+ disabled: isHidden,
1247
+ modelValue: column.renderResizeWidth,
1248
+ min: customMinWidth || 0,
1249
+ max: customMaxWidth || 9999,
1250
+ "onUpdate:modelValue"(value) {
1251
+ const width = Math.max(0, Number(value));
1252
+ column.renderResizeWidth = width;
1253
+ },
1254
+ onChange() {
1255
+ changeColumnWidth(column);
1256
+ }
1257
+ }) : renderEmptyElement($xeTable)
1258
+ ]
1259
+ )
1090
1260
  );
1091
1261
  }
1092
1262
  if (allowFixed) {
@@ -1190,16 +1360,23 @@ var panel_default = defineVxeComponent({
1190
1360
  );
1191
1361
  }
1192
1362
  trVNs.push(
1193
- h("tr", {
1194
- key: column.id,
1195
- colid: column.id,
1196
- class: [`vxe-table-custom-popup--row level--${column.level}`, {
1197
- "is--group": isColGroup
1198
- }],
1199
- onDragstart: sortDragstartEvent,
1200
- onDragend: sortDragendEvent,
1201
- onDragover: sortDragoverEvent
1202
- }, tdVNs)
1363
+ h(
1364
+ "tr",
1365
+ {
1366
+ key: column.id,
1367
+ colid: column.id,
1368
+ class: [
1369
+ `vxe-table-custom-popup--row level--${column.level}`,
1370
+ {
1371
+ "is--group": isColGroup
1372
+ }
1373
+ ],
1374
+ onDragstart: sortDragstartEvent,
1375
+ onDragend: sortDragendEvent,
1376
+ onDragover: sortDragoverEvent
1377
+ },
1378
+ tdVNs
1379
+ )
1203
1380
  );
1204
1381
  }
1205
1382
  });
@@ -1249,26 +1426,37 @@ var panel_default = defineVxeComponent({
1249
1426
  })
1250
1427
  );
1251
1428
  headVNs.push(
1252
- h("th", {
1253
- key: "av",
1254
- class: "vxe-table-custom-popup--column-th col--checkbox"
1255
- }, [
1256
- h("div", {
1257
- class: ["vxe-table-custom--checkbox-option", {
1258
- "is--checked": isAllChecked,
1259
- "is--indeterminate": isAllIndeterminate
1260
- }],
1261
- title: getI18n("vxe.table.allTitle"),
1262
- onClick: allOptionEvent
1263
- }, [
1264
- h("span", {
1265
- class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1266
- })
1267
- // h('span', {
1268
- // class: 'vxe-checkbox--label'
1269
- // }, getI18n('vxe.toolbar.customAll'))
1270
- ])
1271
- ])
1429
+ h(
1430
+ "th",
1431
+ {
1432
+ key: "av",
1433
+ class: "vxe-table-custom-popup--column-th col--checkbox"
1434
+ },
1435
+ [
1436
+ h(
1437
+ "div",
1438
+ {
1439
+ class: [
1440
+ "vxe-table-custom--checkbox-option",
1441
+ {
1442
+ "is--checked": isAllChecked,
1443
+ "is--indeterminate": isAllIndeterminate
1444
+ }
1445
+ ],
1446
+ title: getI18n("vxe.table.allTitle"),
1447
+ onClick: allOptionEvent
1448
+ },
1449
+ [
1450
+ h("span", {
1451
+ class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
1452
+ })
1453
+ // h('span', {
1454
+ // class: 'vxe-checkbox--label'
1455
+ // }, getI18n('vxe.toolbar.customAll'))
1456
+ ]
1457
+ )
1458
+ ]
1459
+ )
1272
1460
  );
1273
1461
  }
1274
1462
  colVNs.push(
@@ -1278,10 +1466,14 @@ var panel_default = defineVxeComponent({
1278
1466
  })
1279
1467
  );
1280
1468
  headVNs.push(
1281
- h("th", {
1282
- key: "at",
1283
- class: "vxe-table-custom-popup--column-th col--title"
1284
- }, getI18n("vxe.custom.setting.colTitle"))
1469
+ h(
1470
+ "th",
1471
+ {
1472
+ key: "at",
1473
+ class: "vxe-table-custom-popup--column-th col--title"
1474
+ },
1475
+ getI18n("vxe.custom.setting.colTitle")
1476
+ )
1285
1477
  );
1286
1478
  if (allowResizable) {
1287
1479
  colVNs.push(
@@ -1291,10 +1483,14 @@ var panel_default = defineVxeComponent({
1291
1483
  })
1292
1484
  );
1293
1485
  headVNs.push(
1294
- h("th", {
1295
- key: "aw",
1296
- class: "vxe-table-custom-popup--column-th col--width"
1297
- }, getI18n("vxe.custom.setting.colResizable"))
1486
+ h(
1487
+ "th",
1488
+ {
1489
+ key: "aw",
1490
+ class: "vxe-table-custom-popup--column-th col--width"
1491
+ },
1492
+ getI18n("vxe.custom.setting.colResizable")
1493
+ )
1298
1494
  );
1299
1495
  }
1300
1496
  if (allowFixed) {
@@ -1305,10 +1501,14 @@ var panel_default = defineVxeComponent({
1305
1501
  })
1306
1502
  );
1307
1503
  headVNs.push(
1308
- h("th", {
1309
- key: "af",
1310
- class: "vxe-table-custom-popup--column-th col--fixed"
1311
- }, getI18n(`vxe.custom.setting.${maxFixedSize ? "colFixedMax" : "colFixed"}`, [maxFixedSize]))
1504
+ h(
1505
+ "th",
1506
+ {
1507
+ key: "af",
1508
+ class: "vxe-table-custom-popup--column-th col--fixed"
1509
+ },
1510
+ getI18n(`vxe.custom.setting.${maxFixedSize ? "colFixedMax" : "colFixed"}`, [maxFixedSize])
1511
+ )
1312
1512
  );
1313
1513
  }
1314
1514
  if (allowAlign) {
@@ -1319,10 +1519,14 @@ var panel_default = defineVxeComponent({
1319
1519
  })
1320
1520
  );
1321
1521
  headVNs.push(
1322
- h("th", {
1323
- key: "aa",
1324
- class: "vxe-table-custom-popup--column-th col--align"
1325
- }, getI18n("vxe.custom.setting.colAlign"))
1522
+ h(
1523
+ "th",
1524
+ {
1525
+ key: "aa",
1526
+ class: "vxe-table-custom-popup--column-th col--align"
1527
+ },
1528
+ getI18n("vxe.custom.setting.colAlign")
1529
+ )
1326
1530
  );
1327
1531
  }
1328
1532
  if (allowHeaderAlign) {
@@ -1333,10 +1537,14 @@ var panel_default = defineVxeComponent({
1333
1537
  })
1334
1538
  );
1335
1539
  headVNs.push(
1336
- h("th", {
1337
- key: "aha",
1338
- class: "vxe-table-custom-popup--column-th col--header-align"
1339
- }, getI18n("vxe.custom.setting.colHeadAlign"))
1540
+ h(
1541
+ "th",
1542
+ {
1543
+ key: "aha",
1544
+ class: "vxe-table-custom-popup--column-th col--header-align"
1545
+ },
1546
+ getI18n("vxe.custom.setting.colHeadAlign")
1547
+ )
1340
1548
  );
1341
1549
  }
1342
1550
  if (allowFooterAlign) {
@@ -1347,131 +1555,173 @@ var panel_default = defineVxeComponent({
1347
1555
  })
1348
1556
  );
1349
1557
  headVNs.push(
1350
- h("th", {
1351
- key: "afa",
1352
- class: "vxe-table-custom-popup--column-th col--footer-align"
1353
- }, getI18n("vxe.custom.setting.colFootAlign"))
1558
+ h(
1559
+ "th",
1560
+ {
1561
+ key: "afa",
1562
+ class: "vxe-table-custom-popup--column-th col--footer-align"
1563
+ },
1564
+ getI18n("vxe.custom.setting.colFootAlign")
1565
+ )
1354
1566
  );
1355
1567
  }
1356
1568
  const scopedSlots = {
1357
1569
  default: () => {
1358
- return h("div", {
1359
- ref: refBodyWrapperElem,
1360
- class: ["vxe-table-custom-popup--body-wrapper", `agg-layout--${aggPlacement}`, {
1361
- [`size--${vSize}`]: vSize
1362
- }],
1363
- style: panePopupStyle
1364
- }, defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
1365
- !isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
1366
- customStore
1367
- }) : renderEmptyElement($xeTable),
1368
- h("div", {
1369
- ref: refCustomBodyElem,
1370
- class: "vxe-table-custom-popup--handle-wrapper"
1371
- }, [
1372
- topSlot ? h("div", {
1373
- class: "vxe-table-custom-popup--table-top"
1374
- }, $xeTable.callSlot(topSlot, params)) : renderEmptyElement($xeTable),
1375
- h("div", {
1376
- class: "vxe-table-custom-popup--table-wrapper"
1377
- }, [
1378
- h("table", {}, [
1379
- h("colgroup", {}, colVNs),
1380
- h("thead", {}, [
1381
- h("tr", {}, headVNs)
1382
- ]),
1383
- h(TransitionGroup, {
1384
- class: "vxe-table-custom--panel-list",
1385
- tag: "tbody",
1386
- name: "vxe-table-custom--list"
1387
- }, {
1388
- default: () => renderPopupBodys()
1389
- })
1390
- ])
1391
- ]),
1392
- bottomSlot ? h("div", {
1393
- class: "vxe-table-custom-popup--table-bottom"
1394
- }, $xeTable.callSlot(bottomSlot, params)) : renderEmptyElement($xeTable),
1395
- renderDragTip()
1396
- ]),
1397
- isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
1398
- customStore
1399
- }) : renderEmptyElement($xeTable)
1400
- ]);
1570
+ return h(
1571
+ "div",
1572
+ {
1573
+ ref: refBodyWrapperElem,
1574
+ class: [
1575
+ "vxe-table-custom-popup--body-wrapper",
1576
+ `agg-layout--${aggPlacement}`,
1577
+ {
1578
+ [`size--${vSize}`]: vSize
1579
+ }
1580
+ ],
1581
+ style: panePopupStyle
1582
+ },
1583
+ defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
1584
+ !isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
1585
+ customStore
1586
+ }) : renderEmptyElement($xeTable),
1587
+ h(
1588
+ "div",
1589
+ {
1590
+ ref: refCustomBodyElem,
1591
+ class: "vxe-table-custom-popup--handle-wrapper"
1592
+ },
1593
+ [
1594
+ topSlot ? h(
1595
+ "div",
1596
+ {
1597
+ class: "vxe-table-custom-popup--table-top"
1598
+ },
1599
+ $xeTable.callSlot(topSlot, params)
1600
+ ) : renderEmptyElement($xeTable),
1601
+ h(
1602
+ "div",
1603
+ {
1604
+ class: "vxe-table-custom-popup--table-wrapper"
1605
+ },
1606
+ [
1607
+ h("table", {}, [
1608
+ h("colgroup", {}, colVNs),
1609
+ h("thead", {}, [h("tr", {}, headVNs)]),
1610
+ h(
1611
+ TransitionGroup,
1612
+ {
1613
+ class: "vxe-table-custom--panel-list",
1614
+ tag: "tbody",
1615
+ name: "vxe-table-custom--list"
1616
+ },
1617
+ {
1618
+ default: () => renderPopupBodys()
1619
+ }
1620
+ )
1621
+ ])
1622
+ ]
1623
+ ),
1624
+ bottomSlot ? h(
1625
+ "div",
1626
+ {
1627
+ class: "vxe-table-custom-popup--table-bottom"
1628
+ },
1629
+ $xeTable.callSlot(bottomSlot, params)
1630
+ ) : renderEmptyElement($xeTable),
1631
+ renderDragTip()
1632
+ ]
1633
+ ),
1634
+ isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
1635
+ customStore
1636
+ }) : renderEmptyElement($xeTable)
1637
+ ]
1638
+ );
1401
1639
  },
1402
1640
  footer: () => {
1403
1641
  if (footerSlot) {
1404
1642
  return $xeTable.callSlot(footerSlot, params);
1405
1643
  }
1406
- return h("div", {
1407
- class: "vxe-table-custom-popup--footer"
1408
- }, [
1409
- VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1410
- content: customOpts.resetButtonText || getI18n("vxe.custom.cstmRestore"),
1411
- disabled: !isCustomStatus,
1412
- onClick: resetCustomEvent
1413
- }) : renderEmptyElement($xeTable),
1414
- immediate ? VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1415
- status: "primary",
1416
- content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
1417
- onClick: cancelCloseEvent
1418
- }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1419
- content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
1420
- onClick: cancelCustomEvent
1421
- }) : renderEmptyElement($xeTable),
1422
- immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1423
- status: "primary",
1424
- content: customOpts.confirmButtonText || getI18n("vxe.custom.cstmConfirm"),
1425
- onClick: confirmCustomEvent
1426
- }) : renderEmptyElement($xeTable)
1427
- ]);
1644
+ return h(
1645
+ "div",
1646
+ {
1647
+ class: "vxe-table-custom-popup--footer"
1648
+ },
1649
+ [
1650
+ VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1651
+ content: customOpts.resetButtonText || getI18n("vxe.custom.cstmRestore"),
1652
+ disabled: !isCustomStatus,
1653
+ onClick: resetCustomEvent
1654
+ }) : renderEmptyElement($xeTable),
1655
+ immediate ? VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1656
+ status: "primary",
1657
+ content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
1658
+ onClick: cancelCloseEvent
1659
+ }) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1660
+ content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
1661
+ onClick: cancelCustomEvent
1662
+ }) : renderEmptyElement($xeTable),
1663
+ immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? h(VxeUIButtonComponent, {
1664
+ status: "primary",
1665
+ content: customOpts.confirmButtonText || getI18n("vxe.custom.cstmConfirm"),
1666
+ onClick: confirmCustomEvent
1667
+ }) : renderEmptyElement($xeTable)
1668
+ ]
1669
+ );
1428
1670
  }
1429
1671
  };
1430
1672
  if (headerSlot) {
1431
1673
  scopedSlots.header = () => $xeTable.callSlot(headerSlot, params);
1432
1674
  }
1433
1675
  if (mode === "drawer") {
1434
- return VxeUIDrawerComponent ? h(VxeUIDrawerComponent, {
1435
- key: "drawer",
1436
- className: ["vxe-table-custom-drawer-wrapper", "vxe-table--ignore-clear", drawerOpts.className || ""].join(" "),
1676
+ return VxeUIDrawerComponent ? h(
1677
+ VxeUIDrawerComponent,
1678
+ {
1679
+ key: "drawer",
1680
+ className: ["vxe-table-custom-drawer-wrapper", "vxe-table--ignore-clear", drawerOpts.className || ""].join(" "),
1681
+ modelValue: customStore.visible,
1682
+ title: drawerOpts.title || getI18n("vxe.custom.cstmTitle"),
1683
+ width: drawerOpts.width || Math.min(880, Math.floor(document.documentElement.clientWidth * 0.6)),
1684
+ position: drawerOpts.position,
1685
+ resize: !!drawerOpts.resize,
1686
+ escClosable: !!drawerOpts.escClosable,
1687
+ maskClosable: !!drawerOpts.maskClosable,
1688
+ destroyOnClose: true,
1689
+ showFooter: true,
1690
+ "onUpdate:modelValue"(value) {
1691
+ customStore.visible = value;
1692
+ }
1693
+ },
1694
+ scopedSlots
1695
+ ) : renderEmptyElement($xeTable);
1696
+ }
1697
+ return VxeUIModalComponent ? h(
1698
+ VxeUIModalComponent,
1699
+ {
1700
+ key: "modal",
1701
+ className: ["vxe-table-custom-modal-wrapper", "vxe-table--ignore-clear", modalOpts.className || ""].join(" "),
1437
1702
  modelValue: customStore.visible,
1438
- title: drawerOpts.title || getI18n("vxe.custom.cstmTitle"),
1439
- width: drawerOpts.width || Math.min(880, Math.floor(document.documentElement.clientWidth * 0.6)),
1440
- position: drawerOpts.position,
1441
- resize: !!drawerOpts.resize,
1442
- escClosable: !!drawerOpts.escClosable,
1443
- maskClosable: !!drawerOpts.maskClosable,
1703
+ title: modalOpts.title || getI18n("vxe.custom.cstmTitle"),
1704
+ width: modalOpts.width || Math.min(1e3, document.documentElement.clientWidth),
1705
+ minWidth: modalOpts.minWidth || 800,
1706
+ height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
1707
+ minHeight: modalOpts.minHeight || 400,
1708
+ showZoom: modalOpts.showZoom,
1709
+ showMaximize: modalOpts.showMaximize,
1710
+ showMinimize: modalOpts.showMinimize,
1711
+ mask: modalOpts.mask,
1712
+ lockView: modalOpts.lockView,
1713
+ resize: modalOpts.resize,
1714
+ transfer: modalOpts.transfer,
1715
+ escClosable: !!modalOpts.escClosable,
1716
+ maskClosable: !!modalOpts.maskClosable,
1444
1717
  destroyOnClose: true,
1445
1718
  showFooter: true,
1446
1719
  "onUpdate:modelValue"(value) {
1447
1720
  customStore.visible = value;
1448
1721
  }
1449
- }, scopedSlots) : renderEmptyElement($xeTable);
1450
- }
1451
- return VxeUIModalComponent ? h(VxeUIModalComponent, {
1452
- key: "modal",
1453
- className: ["vxe-table-custom-modal-wrapper", "vxe-table--ignore-clear", modalOpts.className || ""].join(" "),
1454
- modelValue: customStore.visible,
1455
- title: modalOpts.title || getI18n("vxe.custom.cstmTitle"),
1456
- width: modalOpts.width || Math.min(1e3, document.documentElement.clientWidth),
1457
- minWidth: modalOpts.minWidth || 800,
1458
- height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
1459
- minHeight: modalOpts.minHeight || 400,
1460
- showZoom: modalOpts.showZoom,
1461
- showMaximize: modalOpts.showMaximize,
1462
- showMinimize: modalOpts.showMinimize,
1463
- mask: modalOpts.mask,
1464
- lockView: modalOpts.lockView,
1465
- resize: modalOpts.resize,
1466
- transfer: modalOpts.transfer,
1467
- escClosable: !!modalOpts.escClosable,
1468
- maskClosable: !!modalOpts.maskClosable,
1469
- destroyOnClose: true,
1470
- showFooter: true,
1471
- "onUpdate:modelValue"(value) {
1472
- customStore.visible = value;
1473
- }
1474
- }, scopedSlots) : renderEmptyElement($xeTable);
1722
+ },
1723
+ scopedSlots
1724
+ ) : renderEmptyElement($xeTable);
1475
1725
  };
1476
1726
  const renderVN = () => {
1477
1727
  const customOpts = computeCustomOpts.value;