vxe-table 4.13.39 → 4.13.41

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 (222) hide show
  1. package/README.en.md +2 -0
  2. package/README.ja-JP.md +2 -0
  3. package/README.md +3 -0
  4. package/README.zh-TW.md +3 -1
  5. package/es/grid/src/grid.js +21 -6
  6. package/es/{iconfont.1749800539928.ttf → iconfont.1750153812846.ttf} +0 -0
  7. package/es/iconfont.1750153812846.woff +0 -0
  8. package/es/iconfont.1750153812846.woff2 +0 -0
  9. package/es/index.css +1 -1
  10. package/es/index.min.css +1 -1
  11. package/es/locale/lang/ar-EG.js +6 -0
  12. package/es/locale/lang/de-DE.js +6 -0
  13. package/es/locale/lang/en-US.js +6 -0
  14. package/es/locale/lang/es-ES.js +6 -0
  15. package/es/locale/lang/fr-FR.js +6 -0
  16. package/es/locale/lang/hu-HU.js +6 -0
  17. package/es/locale/lang/hy-AM.js +6 -0
  18. package/es/locale/lang/id-ID.js +6 -0
  19. package/es/locale/lang/it-IT.js +6 -0
  20. package/es/locale/lang/ja-JP.js +6 -0
  21. package/es/locale/lang/ko-KR.js +6 -0
  22. package/es/locale/lang/ms-MY.js +6 -0
  23. package/es/locale/lang/nb-NO.js +6 -0
  24. package/es/locale/lang/pt-BR.js +6 -0
  25. package/es/locale/lang/ru-RU.js +6 -0
  26. package/es/locale/lang/th-TH.js +6 -0
  27. package/es/locale/lang/ug-CN.js +6 -0
  28. package/es/locale/lang/uk-UA.js +6 -0
  29. package/es/locale/lang/uz-UZ.js +6 -0
  30. package/es/locale/lang/vi-VN.js +6 -0
  31. package/es/locale/lang/zh-CHT.js +6 -0
  32. package/es/locale/lang/zh-CN.js +6 -0
  33. package/es/style.css +1 -1
  34. package/es/style.min.css +1 -1
  35. package/es/table/module/custom/hook.js +29 -4
  36. package/es/table/module/custom/panel.js +105 -93
  37. package/es/table/module/export/export-panel.js +3 -2
  38. package/es/table/module/export/import-panel.js +3 -2
  39. package/es/table/module/filter/panel.js +3 -2
  40. package/es/table/module/menu/panel.js +3 -2
  41. package/es/table/src/body.js +7 -5
  42. package/es/table/src/cell.js +14 -14
  43. package/es/table/src/column.js +3 -2
  44. package/es/table/src/footer.js +3 -2
  45. package/es/table/src/group.js +3 -2
  46. package/es/table/src/header.js +3 -2
  47. package/es/table/src/props.js +28 -7
  48. package/es/table/src/table.js +64 -47
  49. package/es/table/style.css +22 -3
  50. package/es/table/style.min.css +1 -1
  51. package/es/toolbar/src/toolbar.js +155 -61
  52. package/es/ui/index.js +12 -1
  53. package/es/ui/src/comp.js +2 -0
  54. package/es/ui/src/log.js +1 -1
  55. package/es/vxe-table/style.css +22 -3
  56. package/es/vxe-table/style.min.css +1 -1
  57. package/lib/grid/src/grid.js +20 -5
  58. package/lib/grid/src/grid.min.js +1 -1
  59. package/lib/{iconfont.1749800539928.ttf → iconfont.1750153812846.ttf} +0 -0
  60. package/lib/iconfont.1750153812846.woff +0 -0
  61. package/lib/iconfont.1750153812846.woff2 +0 -0
  62. package/lib/index.css +1 -1
  63. package/lib/index.min.css +1 -1
  64. package/lib/index.umd.js +350 -150
  65. package/lib/index.umd.min.js +1 -1
  66. package/lib/locale/lang/ar-EG.js +6 -0
  67. package/lib/locale/lang/ar-EG.min.js +1 -1
  68. package/lib/locale/lang/ar-EG.umd.js +6 -0
  69. package/lib/locale/lang/de-DE.js +6 -0
  70. package/lib/locale/lang/de-DE.min.js +1 -1
  71. package/lib/locale/lang/de-DE.umd.js +6 -0
  72. package/lib/locale/lang/en-US.js +6 -0
  73. package/lib/locale/lang/en-US.min.js +1 -1
  74. package/lib/locale/lang/en-US.umd.js +6 -0
  75. package/lib/locale/lang/es-ES.js +6 -0
  76. package/lib/locale/lang/es-ES.min.js +1 -1
  77. package/lib/locale/lang/es-ES.umd.js +6 -0
  78. package/lib/locale/lang/fr-FR.js +6 -0
  79. package/lib/locale/lang/fr-FR.min.js +1 -1
  80. package/lib/locale/lang/fr-FR.umd.js +6 -0
  81. package/lib/locale/lang/hu-HU.js +6 -0
  82. package/lib/locale/lang/hu-HU.min.js +1 -1
  83. package/lib/locale/lang/hu-HU.umd.js +6 -0
  84. package/lib/locale/lang/hy-AM.js +6 -0
  85. package/lib/locale/lang/hy-AM.min.js +1 -1
  86. package/lib/locale/lang/hy-AM.umd.js +6 -0
  87. package/lib/locale/lang/id-ID.js +6 -0
  88. package/lib/locale/lang/id-ID.min.js +1 -1
  89. package/lib/locale/lang/id-ID.umd.js +6 -0
  90. package/lib/locale/lang/it-IT.js +6 -0
  91. package/lib/locale/lang/it-IT.min.js +1 -1
  92. package/lib/locale/lang/it-IT.umd.js +6 -0
  93. package/lib/locale/lang/ja-JP.js +6 -0
  94. package/lib/locale/lang/ja-JP.min.js +1 -1
  95. package/lib/locale/lang/ja-JP.umd.js +6 -0
  96. package/lib/locale/lang/ko-KR.js +6 -0
  97. package/lib/locale/lang/ko-KR.min.js +1 -1
  98. package/lib/locale/lang/ko-KR.umd.js +6 -0
  99. package/lib/locale/lang/ms-MY.js +6 -0
  100. package/lib/locale/lang/ms-MY.min.js +1 -1
  101. package/lib/locale/lang/ms-MY.umd.js +6 -0
  102. package/lib/locale/lang/nb-NO.js +6 -0
  103. package/lib/locale/lang/nb-NO.min.js +1 -1
  104. package/lib/locale/lang/nb-NO.umd.js +6 -0
  105. package/lib/locale/lang/pt-BR.js +6 -0
  106. package/lib/locale/lang/pt-BR.min.js +1 -1
  107. package/lib/locale/lang/pt-BR.umd.js +6 -0
  108. package/lib/locale/lang/ru-RU.js +6 -0
  109. package/lib/locale/lang/ru-RU.min.js +1 -1
  110. package/lib/locale/lang/ru-RU.umd.js +6 -0
  111. package/lib/locale/lang/th-TH.js +6 -0
  112. package/lib/locale/lang/th-TH.min.js +1 -1
  113. package/lib/locale/lang/th-TH.umd.js +6 -0
  114. package/lib/locale/lang/ug-CN.js +6 -0
  115. package/lib/locale/lang/ug-CN.min.js +1 -1
  116. package/lib/locale/lang/ug-CN.umd.js +6 -0
  117. package/lib/locale/lang/uk-UA.js +6 -0
  118. package/lib/locale/lang/uk-UA.min.js +1 -1
  119. package/lib/locale/lang/uk-UA.umd.js +6 -0
  120. package/lib/locale/lang/uz-UZ.js +6 -0
  121. package/lib/locale/lang/uz-UZ.min.js +1 -1
  122. package/lib/locale/lang/uz-UZ.umd.js +6 -0
  123. package/lib/locale/lang/vi-VN.js +6 -0
  124. package/lib/locale/lang/vi-VN.min.js +1 -1
  125. package/lib/locale/lang/vi-VN.umd.js +6 -0
  126. package/lib/locale/lang/zh-CHT.js +6 -0
  127. package/lib/locale/lang/zh-CHT.min.js +1 -1
  128. package/lib/locale/lang/zh-CHT.umd.js +6 -0
  129. package/lib/locale/lang/zh-CN.js +6 -0
  130. package/lib/locale/lang/zh-CN.min.js +1 -1
  131. package/lib/locale/lang/zh-CN.umd.js +6 -0
  132. package/lib/style.css +1 -1
  133. package/lib/style.min.css +1 -1
  134. package/lib/table/module/custom/hook.js +32 -4
  135. package/lib/table/module/custom/hook.min.js +1 -1
  136. package/lib/table/module/custom/panel.js +14 -3
  137. package/lib/table/module/custom/panel.min.js +1 -1
  138. package/lib/table/module/export/export-panel.js +2 -1
  139. package/lib/table/module/export/export-panel.min.js +1 -1
  140. package/lib/table/module/export/import-panel.js +2 -1
  141. package/lib/table/module/export/import-panel.min.js +1 -1
  142. package/lib/table/module/filter/panel.js +2 -1
  143. package/lib/table/module/filter/panel.min.js +1 -1
  144. package/lib/table/module/menu/panel.js +2 -1
  145. package/lib/table/module/menu/panel.min.js +1 -1
  146. package/lib/table/src/body.js +9 -9
  147. package/lib/table/src/body.min.js +1 -1
  148. package/lib/table/src/cell.js +16 -16
  149. package/lib/table/src/cell.min.js +1 -1
  150. package/lib/table/src/column.js +2 -1
  151. package/lib/table/src/column.min.js +1 -1
  152. package/lib/table/src/footer.js +2 -1
  153. package/lib/table/src/footer.min.js +1 -1
  154. package/lib/table/src/group.js +2 -1
  155. package/lib/table/src/group.min.js +1 -1
  156. package/lib/table/src/header.js +2 -1
  157. package/lib/table/src/header.min.js +1 -1
  158. package/lib/table/src/props.js +28 -7
  159. package/lib/table/src/table.js +13 -11
  160. package/lib/table/src/table.min.js +1 -1
  161. package/lib/table/style/style.css +22 -3
  162. package/lib/table/style/style.min.css +1 -1
  163. package/lib/toolbar/src/toolbar.js +180 -85
  164. package/lib/toolbar/src/toolbar.min.js +1 -1
  165. package/lib/ui/index.js +12 -1
  166. package/lib/ui/index.min.js +1 -1
  167. package/lib/ui/src/comp.js +8 -0
  168. package/lib/ui/src/comp.min.js +1 -0
  169. package/lib/ui/src/log.js +1 -1
  170. package/lib/ui/src/log.min.js +1 -1
  171. package/lib/vxe-table/style/style.css +22 -3
  172. package/lib/vxe-table/style/style.min.css +1 -1
  173. package/package.json +1 -1
  174. package/packages/grid/src/grid.ts +29 -7
  175. package/packages/locale/lang/ar-EG.ts +6 -0
  176. package/packages/locale/lang/de-DE.ts +6 -0
  177. package/packages/locale/lang/en-US.ts +6 -0
  178. package/packages/locale/lang/es-ES.ts +6 -0
  179. package/packages/locale/lang/fr-FR.ts +6 -0
  180. package/packages/locale/lang/hu-HU.ts +6 -0
  181. package/packages/locale/lang/hy-AM.ts +6 -0
  182. package/packages/locale/lang/id-ID.ts +6 -0
  183. package/packages/locale/lang/it-IT.ts +6 -0
  184. package/packages/locale/lang/ja-JP.ts +6 -0
  185. package/packages/locale/lang/ko-KR.ts +6 -0
  186. package/packages/locale/lang/ms-MY.ts +6 -0
  187. package/packages/locale/lang/nb-NO.ts +6 -0
  188. package/packages/locale/lang/pt-BR.ts +6 -0
  189. package/packages/locale/lang/ru-RU.ts +6 -0
  190. package/packages/locale/lang/th-TH.ts +6 -0
  191. package/packages/locale/lang/ug-CN.ts +6 -0
  192. package/packages/locale/lang/uk-UA.ts +6 -0
  193. package/packages/locale/lang/uz-UZ.ts +6 -0
  194. package/packages/locale/lang/vi-VN.ts +6 -0
  195. package/packages/locale/lang/zh-CHT.ts +6 -0
  196. package/packages/locale/lang/zh-CN.ts +6 -0
  197. package/packages/table/module/custom/hook.ts +27 -4
  198. package/packages/table/module/custom/panel.ts +114 -102
  199. package/packages/table/module/export/export-panel.ts +3 -2
  200. package/packages/table/module/export/import-panel.ts +3 -2
  201. package/packages/table/module/filter/panel.ts +3 -2
  202. package/packages/table/module/menu/panel.ts +3 -2
  203. package/packages/table/src/body.ts +10 -8
  204. package/packages/table/src/cell.ts +14 -14
  205. package/packages/table/src/column.ts +3 -2
  206. package/packages/table/src/footer.ts +3 -2
  207. package/packages/table/src/group.ts +3 -2
  208. package/packages/table/src/header.ts +3 -2
  209. package/packages/table/src/props.ts +28 -7
  210. package/packages/table/src/table.ts +66 -46
  211. package/packages/toolbar/src/toolbar.ts +157 -58
  212. package/packages/ui/index.ts +11 -0
  213. package/packages/ui/src/comp.ts +3 -0
  214. package/styles/components/icon.scss +13 -1
  215. package/styles/components/table-module/custom.scss +9 -2
  216. package/styles/icon/iconfont.ttf +0 -0
  217. package/styles/icon/iconfont.woff +0 -0
  218. package/styles/icon/iconfont.woff2 +0 -0
  219. package/es/iconfont.1749800539928.woff +0 -0
  220. package/es/iconfont.1749800539928.woff2 +0 -0
  221. package/lib/iconfont.1749800539928.woff +0 -0
  222. package/lib/iconfont.1749800539928.woff2 +0 -0
@@ -5,7 +5,7 @@ const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'saveCustom', 'cance
5
5
  VxeUI.hooks.add('tableCustomModule', {
6
6
  setupTable($xeTable) {
7
7
  const { reactData, internalData } = $xeTable;
8
- const { computeCustomOpts } = $xeTable.getComputeMaps();
8
+ const { computeCustomOpts, computeRowGroupFields } = $xeTable.getComputeMaps();
9
9
  const { refElem } = $xeTable.getRefMaps();
10
10
  const $xeGrid = $xeTable.xeGrid;
11
11
  const calcMaxHeight = () => {
@@ -61,7 +61,7 @@ VxeUI.hooks.add('tableCustomModule', {
61
61
  return nextTick();
62
62
  };
63
63
  const saveCustom = () => {
64
- const { customColumnList } = reactData;
64
+ const { customColumnList, aggHandleFields, rowGroupList } = reactData;
65
65
  const customOpts = computeCustomOpts.value;
66
66
  const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts;
67
67
  XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
@@ -95,7 +95,19 @@ VxeUI.hooks.add('tableCustomModule', {
95
95
  setTimeout(() => {
96
96
  reactData.isDragColMove = false;
97
97
  }, 1000);
98
- return $xeTable.saveCustomStore('confirm');
98
+ return $xeTable.saveCustomStore('confirm').then(() => {
99
+ if ($xeTable.handlePivotTableAggregateData) {
100
+ if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
101
+ // 改动聚合分组
102
+ if (aggHandleFields.length) {
103
+ $xeTable.setRowGroups(aggHandleFields);
104
+ }
105
+ else {
106
+ $xeTable.clearRowGroups();
107
+ }
108
+ }
109
+ }
110
+ });
99
111
  };
100
112
  const cancelCustom = () => {
101
113
  const { customColumnList, customStore } = reactData;
@@ -168,6 +180,7 @@ VxeUI.hooks.add('tableCustomModule', {
168
180
  saveCustom,
169
181
  cancelCustom,
170
182
  resetCustom(options) {
183
+ const { rowGroupList } = reactData;
171
184
  const { collectColumn } = internalData;
172
185
  const customOpts = computeCustomOpts.value;
173
186
  const { checkMethod } = customOpts;
@@ -194,7 +207,19 @@ VxeUI.hooks.add('tableCustomModule', {
194
207
  });
195
208
  reactData.isCustomStatus = false;
196
209
  $xeTable.saveCustomStore('reset');
197
- return $xeTable.handleCustom();
210
+ return $xeTable.handleCustom().then(() => {
211
+ if ($xeTable.handlePivotTableAggregateData) {
212
+ const rowGroupFields = computeRowGroupFields.value;
213
+ if (rowGroupFields ? rowGroupFields.length : rowGroupList.length) {
214
+ if (rowGroupFields && rowGroupFields.length) {
215
+ $xeTable.setRowGroups(rowGroupFields);
216
+ }
217
+ else {
218
+ $xeTable.clearRowGroups();
219
+ }
220
+ }
221
+ }
222
+ });
198
223
  },
199
224
  toggleCustomAllCheckbox() {
200
225
  const { customStore } = reactData;
@@ -1,11 +1,12 @@
1
- import { defineComponent, h, inject, ref, nextTick, TransitionGroup, createCommentVNode } from 'vue';
1
+ import { h, inject, ref, nextTick, TransitionGroup, createCommentVNode } from 'vue';
2
+ import { defineVxeComponent } from '../../../ui/src/comp';
2
3
  import { VxeUI } from '../../../ui';
3
4
  import { formatText } from '../../../ui/src/utils';
4
5
  import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
5
6
  import { errLog } from '../../../ui/src/log';
6
7
  import XEUtils from 'xe-utils';
7
8
  const { getI18n, getIcon, renderEmptyElement } = VxeUI;
8
- export default defineComponent({
9
+ export default defineVxeComponent({
9
10
  name: 'TableCustomPanel',
10
11
  props: {
11
12
  customStore: {
@@ -470,7 +471,9 @@ export default defineComponent({
470
471
  };
471
472
  const renderSimplePanel = () => {
472
473
  const $xeGrid = $xeTable.xeGrid;
474
+ const tableProps = $xeTable.props;
473
475
  const { customStore } = props;
476
+ const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
474
477
  const { isCustomStatus, customColumnList } = reactData;
475
478
  const customOpts = computeCustomOpts.value;
476
479
  const { immediate } = customOpts;
@@ -619,107 +622,116 @@ export default defineComponent({
619
622
  : {}
620
623
  }, customStore.visible
621
624
  ? [
625
+ !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
626
+ ? h($xeTable.getPivotTableAggregateSimplePanel(), {
627
+ customStore
628
+ })
629
+ : renderEmptyElement($xeTable),
622
630
  h('div', {
623
- class: 'vxe-table-custom--header'
624
- }, headerSlot
625
- ? $xeTable.callSlot(headerSlot, params)
626
- : [
627
- h('ul', {
628
- class: 'vxe-table-custom--panel-list'
629
- }, [
630
- h('li', {
631
- class: 'vxe-table-custom--option'
631
+ class: 'vxe-table-custom--handle-wrapper'
632
+ }, [
633
+ h('div', {
634
+ class: 'vxe-table-custom--header'
635
+ }, headerSlot
636
+ ? $xeTable.callSlot(headerSlot, params)
637
+ : [
638
+ h('ul', {
639
+ class: 'vxe-table-custom--panel-list'
632
640
  }, [
633
- allowVisible
634
- ? h('div', {
635
- class: ['vxe-table-custom--checkbox-option', {
636
- 'is--checked': isAllChecked,
637
- 'is--indeterminate': isAllIndeterminate
638
- }],
639
- title: getI18n('vxe.table.allTitle'),
640
- onClick: allOptionEvent
641
- }, [
642
- h('span', {
643
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
644
- }),
645
- h('span', {
641
+ h('li', {
642
+ class: 'vxe-table-custom--option'
643
+ }, [
644
+ allowVisible
645
+ ? h('div', {
646
+ class: ['vxe-table-custom--checkbox-option', {
647
+ 'is--checked': isAllChecked,
648
+ 'is--indeterminate': isAllIndeterminate
649
+ }],
650
+ title: getI18n('vxe.table.allTitle'),
651
+ onClick: allOptionEvent
652
+ }, [
653
+ h('span', {
654
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
655
+ }),
656
+ h('span', {
657
+ class: 'vxe-checkbox--label'
658
+ }, getI18n('vxe.toolbar.customAll'))
659
+ ])
660
+ : h('span', {
646
661
  class: 'vxe-checkbox--label'
647
- }, getI18n('vxe.toolbar.customAll'))
648
- ])
649
- : h('span', {
650
- class: 'vxe-checkbox--label'
651
- }, getI18n('vxe.table.customTitle'))
662
+ }, getI18n('vxe.table.customTitle'))
663
+ ])
652
664
  ])
653
- ])
665
+ ]),
666
+ h('div', {
667
+ ref: bodyElemRef,
668
+ class: 'vxe-table-custom--body'
669
+ }, [
670
+ topSlot
671
+ ? h('div', {
672
+ class: 'vxe-table-custom--panel-top'
673
+ }, $xeTable.callSlot(topSlot, params))
674
+ : renderEmptyElement($xeTable),
675
+ defaultSlot
676
+ ? h('div', {
677
+ class: 'vxe-table-custom--panel-body'
678
+ }, $xeTable.callSlot(defaultSlot, params))
679
+ : h(TransitionGroup, Object.assign({ class: 'vxe-table-custom--panel-list', name: 'vxe-table-custom--list', tag: 'ul' }, customWrapperOns), {
680
+ default: () => colVNs
681
+ }),
682
+ bottomSlot
683
+ ? h('div', {
684
+ class: 'vxe-table-custom--panel-bottom'
685
+ }, $xeTable.callSlot(bottomSlot, params))
686
+ : renderEmptyElement($xeTable),
687
+ renderDragTip()
654
688
  ]),
655
- h('div', {
656
- ref: bodyElemRef,
657
- class: 'vxe-table-custom--body'
658
- }, [
659
- topSlot
660
- ? h('div', {
661
- class: 'vxe-table-custom--panel-top'
662
- }, $xeTable.callSlot(topSlot, params))
663
- : renderEmptyElement($xeTable),
664
- defaultSlot
665
- ? h('div', {
666
- class: 'vxe-table-custom--panel-body'
667
- }, $xeTable.callSlot(defaultSlot, params))
668
- : h(TransitionGroup, Object.assign({ class: 'vxe-table-custom--panel-list', name: 'vxe-table-custom--list', tag: 'ul' }, customWrapperOns), {
669
- default: () => colVNs
670
- }),
671
- bottomSlot
689
+ customOpts.showFooter
672
690
  ? h('div', {
673
- class: 'vxe-table-custom--panel-bottom'
674
- }, $xeTable.callSlot(bottomSlot, params))
675
- : renderEmptyElement($xeTable),
676
- renderDragTip()
677
- ]),
678
- customOpts.showFooter
679
- ? h('div', {
680
- class: 'vxe-table-custom--footer'
681
- }, footerSlot
682
- ? $xeTable.callSlot(footerSlot, params)
683
- : [
684
- h('div', {
685
- class: 'vxe-table-custom--footer-buttons'
686
- }, [
687
- VxeUIButtonComponent
688
- ? h(VxeUIButtonComponent, {
689
- mode: 'text',
690
- content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
691
- disabled: !isCustomStatus,
692
- onClick: resetCustomEvent
693
- })
694
- : createCommentVNode(),
695
- immediate
696
- ? (VxeUIButtonComponent
697
- ? h(VxeUIButtonComponent, {
698
- mode: 'text',
699
- content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
700
- onClick: cancelCloseEvent
701
- })
702
- : createCommentVNode())
703
- : (VxeUIButtonComponent
691
+ class: 'vxe-table-custom--footer'
692
+ }, footerSlot
693
+ ? $xeTable.callSlot(footerSlot, params)
694
+ : [
695
+ h('div', {
696
+ class: 'vxe-table-custom--footer-buttons'
697
+ }, [
698
+ VxeUIButtonComponent
704
699
  ? h(VxeUIButtonComponent, {
705
700
  mode: 'text',
706
- content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
707
- onClick: cancelCustomEvent
701
+ content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
702
+ disabled: !isCustomStatus,
703
+ onClick: resetCustomEvent
708
704
  })
709
- : createCommentVNode()),
710
- immediate
711
- ? createCommentVNode()
712
- : (VxeUIButtonComponent
713
- ? h(VxeUIButtonComponent, {
714
- mode: 'text',
715
- status: 'primary',
716
- content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
717
- onClick: confirmCustomEvent
718
- })
719
- : createCommentVNode())
705
+ : createCommentVNode(),
706
+ immediate
707
+ ? (VxeUIButtonComponent
708
+ ? h(VxeUIButtonComponent, {
709
+ mode: 'text',
710
+ content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
711
+ onClick: cancelCloseEvent
712
+ })
713
+ : createCommentVNode())
714
+ : (VxeUIButtonComponent
715
+ ? h(VxeUIButtonComponent, {
716
+ mode: 'text',
717
+ content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
718
+ onClick: cancelCustomEvent
719
+ })
720
+ : createCommentVNode()),
721
+ immediate
722
+ ? createCommentVNode()
723
+ : (VxeUIButtonComponent
724
+ ? h(VxeUIButtonComponent, {
725
+ mode: 'text',
726
+ status: 'primary',
727
+ content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
728
+ onClick: confirmCustomEvent
729
+ })
730
+ : createCommentVNode())
731
+ ])
720
732
  ])
721
- ])
722
- : null
733
+ : null
734
+ ])
723
735
  ]
724
736
  : []);
725
737
  };
@@ -1,10 +1,11 @@
1
- import { defineComponent, h, createCommentVNode, ref, computed, reactive, inject, nextTick } from 'vue';
1
+ import { h, createCommentVNode, ref, computed, reactive, inject, nextTick } from 'vue';
2
+ import { defineVxeComponent } from '../../../ui/src/comp';
2
3
  import { VxeUI } from '../../../ui';
3
4
  import XEUtils from 'xe-utils';
4
5
  import { formatText } from '../../../ui/src/utils';
5
6
  import { errLog } from '../../../ui/src/log';
6
7
  const { getI18n, getIcon } = VxeUI;
7
- export default defineComponent({
8
+ export default defineVxeComponent({
8
9
  name: 'VxeTableExportPanel',
9
10
  props: {
10
11
  defaultOptions: Object,
@@ -1,10 +1,11 @@
1
- import { defineComponent, h, ref, computed, inject, reactive, nextTick, createCommentVNode } from 'vue';
1
+ import { h, ref, computed, inject, reactive, nextTick, createCommentVNode } from 'vue';
2
+ import { defineVxeComponent } from '../../../ui/src/comp';
2
3
  import { VxeUI } from '../../../ui';
3
4
  import XEUtils from 'xe-utils';
4
5
  import { parseFile } from '../../../ui/src/utils';
5
6
  import { errLog } from '../../../ui/src/log';
6
7
  const { getI18n, getIcon } = VxeUI;
7
- export default defineComponent({
8
+ export default defineVxeComponent({
8
9
  name: 'VxeTableImportPanel',
9
10
  props: {
10
11
  defaultOptions: Object,
@@ -1,11 +1,12 @@
1
- import { defineComponent, h, ref, computed, inject, Teleport } from 'vue';
1
+ import { h, ref, computed, inject, Teleport } from 'vue';
2
+ import { defineVxeComponent } from '../../../ui/src/comp';
2
3
  import { VxeUI } from '../../../ui';
3
4
  import { formatText, isEnableConf } from '../../../ui/src/utils';
4
5
  import { getPropClass } from '../../../ui/src/dom';
5
6
  import { getSlotVNs } from '../../../ui/src/vn';
6
7
  import XEUtils from 'xe-utils';
7
8
  const { getI18n, getIcon, renderer } = VxeUI;
8
- export default defineComponent({
9
+ export default defineVxeComponent({
9
10
  name: 'VxeTableFilterPanel',
10
11
  props: {
11
12
  filterStore: Object
@@ -1,9 +1,10 @@
1
- import { defineComponent, h, Teleport, inject, ref, createCommentVNode } from 'vue';
1
+ import { h, Teleport, inject, ref, createCommentVNode } from 'vue';
2
+ import { defineVxeComponent } from '../../../ui/src/comp';
2
3
  import { VxeUI } from '../../../ui';
3
4
  import { getFuncText } from '../../../ui/src/utils';
4
5
  import XEUtils from 'xe-utils';
5
6
  const { getIcon } = VxeUI;
6
- export default defineComponent({
7
+ export default defineVxeComponent({
7
8
  name: 'VxeTableMenuPanel',
8
9
  setup(props, context) {
9
10
  const xID = XEUtils.uniqueId();
@@ -1,4 +1,5 @@
1
- import { defineComponent, TransitionGroup, h, ref, inject, nextTick, onMounted, onUnmounted } from 'vue';
1
+ import { TransitionGroup, h, ref, inject, nextTick, onMounted, onUnmounted } from 'vue';
2
+ import { defineVxeComponent } from '../../ui/src/comp';
2
3
  import XEUtils from 'xe-utils';
3
4
  import { VxeUI } from '../../ui';
4
5
  import { getOffsetSize, calcTreeLine, getRowid, createHandleGetRowId, getCellRestHeight } from './util';
@@ -7,7 +8,7 @@ import { isEnableConf } from '../../ui/src/utils';
7
8
  import { getSlotVNs } from '../../ui/src/vn';
8
9
  const { getI18n, renderer, renderEmptyElement } = VxeUI;
9
10
  const renderType = 'body';
10
- export default defineComponent({
11
+ export default defineVxeComponent({
11
12
  name: 'VxeTableBody',
12
13
  props: {
13
14
  tableData: Array,
@@ -541,7 +542,7 @@ export default defineComponent({
541
542
  const { showOverflow } = expandColumn || {};
542
543
  const colid = expandColumn.id;
543
544
  const colRest = fullColumnIdData[colid] || {};
544
- const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? isAllOverflow : showOverflow;
545
+ const hasEllipsis = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow;
545
546
  let columnIndex = -1;
546
547
  let $columnIndex = -1;
547
548
  let _columnIndex = -1;
@@ -714,14 +715,15 @@ export default defineComponent({
714
715
  }
715
716
  let emptyContent;
716
717
  const emptySlot = slots ? slots.empty : null;
718
+ const emptyParams = { $table: $xeTable, $grid: $xeGrid };
717
719
  if (emptySlot) {
718
- emptyContent = $xeTable.callSlot(emptySlot, { $table: $xeTable, $grid: $xeGrid });
720
+ emptyContent = $xeTable.callSlot(emptySlot, emptyParams);
719
721
  }
720
722
  else {
721
723
  const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null;
722
724
  const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null;
723
725
  if (rtEmptyView) {
724
- emptyContent = getSlotVNs(rtEmptyView(emptyOpts, { $table: $xeTable }));
726
+ emptyContent = getSlotVNs(rtEmptyView(emptyOpts, emptyParams));
725
727
  }
726
728
  else {
727
729
  emptyContent = tableProps.emptyText || getI18n('vxe.table.emptyText');
@@ -367,20 +367,6 @@ export const Cell = {
367
367
  const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column;
368
368
  const renderOpts = editRender || cellRender;
369
369
  const defaultSlot = slots ? slots.default : null;
370
- if (defaultSlot) {
371
- return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
372
- }
373
- if (renderOpts) {
374
- const compConf = renderer.get(renderOpts.name);
375
- if (compConf) {
376
- const rtCell = compConf.renderTableCell || compConf.renderCell;
377
- const rtDefault = compConf.renderTableDefault || compConf.renderDefault;
378
- const renderFn = editRender ? rtCell : rtDefault;
379
- if (renderFn) {
380
- return renderCellBaseVNs(params, getSlotVNs(renderFn(renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))));
381
- }
382
- }
383
- }
384
370
  let cellValue = '';
385
371
  if (isRowGroupStatus && field && row.isAggregate) {
386
372
  const aggRow = row;
@@ -429,6 +415,20 @@ export const Cell = {
429
415
  }
430
416
  }
431
417
  else {
418
+ if (defaultSlot) {
419
+ return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
420
+ }
421
+ if (renderOpts) {
422
+ const compConf = renderer.get(renderOpts.name);
423
+ if (compConf) {
424
+ const rtCell = compConf.renderTableCell || compConf.renderCell;
425
+ const rtDefault = compConf.renderTableDefault || compConf.renderDefault;
426
+ const renderFn = editRender ? rtCell : rtDefault;
427
+ if (renderFn) {
428
+ return renderCellBaseVNs(params, getSlotVNs(renderFn(renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))));
429
+ }
430
+ }
431
+ }
432
432
  cellValue = $table.getCellLabel(row, column);
433
433
  }
434
434
  const cellPlaceholder = editRender ? editRender.placeholder : '';
@@ -1,4 +1,5 @@
1
- import { defineComponent, h, onUnmounted, inject, ref, provide, onMounted, createCommentVNode } from 'vue';
1
+ import { h, onUnmounted, inject, ref, provide, onMounted, createCommentVNode } from 'vue';
2
+ import { defineVxeComponent } from '../../ui/src/comp';
2
3
  import { watchColumn, assembleColumn, destroyColumn } from './util';
3
4
  import Cell from './cell';
4
5
  export const columnProps = {
@@ -126,7 +127,7 @@ export const columnProps = {
126
127
  // 额外的参数
127
128
  params: Object
128
129
  };
129
- export default defineComponent({
130
+ export default defineVxeComponent({
130
131
  name: 'VxeColumn',
131
132
  props: columnProps,
132
133
  setup(props, { slots }) {
@@ -1,11 +1,12 @@
1
- import { defineComponent, TransitionGroup, h, ref, inject, nextTick, onMounted, onUnmounted } from 'vue';
1
+ import { TransitionGroup, h, ref, inject, nextTick, onMounted, onUnmounted } from 'vue';
2
+ import { defineVxeComponent } from '../../ui/src/comp';
2
3
  import XEUtils from 'xe-utils';
3
4
  import { VxeUI } from '../../ui';
4
5
  import { updateCellTitle, getPropClass } from '../../ui/src/dom';
5
6
  import { getCellHeight } from './util';
6
7
  const { renderer, renderEmptyElement } = VxeUI;
7
8
  const renderType = 'footer';
8
- export default defineComponent({
9
+ export default defineVxeComponent({
9
10
  name: 'VxeTableFooter',
10
11
  props: {
11
12
  footerTableData: {
@@ -1,8 +1,9 @@
1
- import { defineComponent, h, onUnmounted, provide, inject, ref, onMounted, createCommentVNode } from 'vue';
1
+ import { h, onUnmounted, provide, inject, ref, onMounted, createCommentVNode } from 'vue';
2
+ import { defineVxeComponent } from '../../ui/src/comp';
2
3
  import { columnProps } from './column';
3
4
  import { watchColumn, assembleColumn, destroyColumn } from './util';
4
5
  import Cell from './cell';
5
- export default defineComponent({
6
+ export default defineVxeComponent({
6
7
  name: 'VxeColgroup',
7
8
  props: columnProps,
8
9
  setup(props, { slots }) {
@@ -1,10 +1,11 @@
1
- import { defineComponent, TransitionGroup, h, ref, inject, nextTick, watch, onMounted, onUnmounted } from 'vue';
1
+ import { TransitionGroup, h, ref, inject, nextTick, watch, onMounted, onUnmounted } from 'vue';
2
+ import { defineVxeComponent } from '../../ui/src/comp';
2
3
  import XEUtils from 'xe-utils';
3
4
  import { VxeUI } from '../../ui';
4
5
  import { getCellHeight, convertHeaderColumnToRows } from './util';
5
6
  const { renderer, renderEmptyElement } = VxeUI;
6
7
  const renderType = 'header';
7
- export default defineComponent({
8
+ export default defineVxeComponent({
8
9
  name: 'VxeTableHeader',
9
10
  props: {
10
11
  tableData: Array,
@@ -153,11 +153,20 @@ export default {
153
153
  default: () => getConfig().table.showFooterOverflow
154
154
  },
155
155
  /** 高级属性 */
156
- // (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
156
+ /**
157
+ * (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
158
+ * @deprecated
159
+ */
157
160
  columnKey: Boolean,
158
- // (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
161
+ /**
162
+ * (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
163
+ * @deprecated
164
+ */
159
165
  rowKey: Boolean,
160
- // (即将废弃)rowId 已废弃,被 row-config.keyField 替换
166
+ /**
167
+ * (即将废弃)rowId 已废弃,被 row-config.keyField 替换
168
+ * @deprecated
169
+ */
161
170
  rowId: {
162
171
  type: String,
163
172
  default: () => getConfig().table.rowId
@@ -194,11 +203,17 @@ export default {
194
203
  rowConfig: Object,
195
204
  // 数据聚合配置项
196
205
  aggregateConfig: Object,
197
- // 已废弃,被 aggregateConfig 替换
206
+ /**
207
+ * 已废弃,被 aggregateConfig 替换
208
+ * @deprecated
209
+ */
198
210
  rowGroupConfig: Object,
199
211
  // 当前行配置项
200
212
  currentRowConfig: Object,
201
- // 已废弃,被 rowDragConfig 替换
213
+ /**
214
+ * 已废弃,被 rowDragConfig 替换
215
+ * @deprecated
216
+ */
202
217
  dragConfig: Object,
203
218
  // 行拖拽排序配置项
204
219
  rowDragConfig: Object,
@@ -252,9 +267,15 @@ export default {
252
267
  emptyRender: Object,
253
268
  // 自定义列配置项
254
269
  customConfig: Object,
255
- // (即将废弃)横向虚拟滚动配置项
270
+ /**
271
+ * (即将废弃)横向虚拟滚动配置项
272
+ * @deprecated
273
+ */
256
274
  scrollX: Object,
257
- // (即将废弃)纵向虚拟滚动配置项
275
+ /**
276
+ * (即将废弃)纵向虚拟滚动配置项
277
+ * @deprecated
278
+ */
258
279
  scrollY: Object,
259
280
  // 横向虚拟滚动配置项
260
281
  virtualXConfig: Object,