vxe-table 4.19.22 → 4.19.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.
Files changed (183) hide show
  1. package/dist/all.esm.js +634 -335
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/{iconfont.1782890314097.ttf → iconfont.1783331249334.ttf} +0 -0
  5. package/es/iconfont.1783331249334.woff +0 -0
  6. package/es/iconfont.1783331249334.woff2 +0 -0
  7. package/es/index.css +1 -1
  8. package/es/index.min.css +1 -1
  9. package/es/locale/lang/ar-EG.js +12 -3
  10. package/es/locale/lang/de-DE.js +12 -3
  11. package/es/locale/lang/en-US.js +16 -7
  12. package/es/locale/lang/es-ES.js +12 -3
  13. package/es/locale/lang/fr-FR.js +12 -3
  14. package/es/locale/lang/hu-HU.js +12 -3
  15. package/es/locale/lang/hy-AM.js +12 -3
  16. package/es/locale/lang/id-ID.js +12 -3
  17. package/es/locale/lang/it-IT.js +11 -2
  18. package/es/locale/lang/ja-JP.js +12 -3
  19. package/es/locale/lang/ko-KR.js +12 -3
  20. package/es/locale/lang/ms-MY.js +12 -3
  21. package/es/locale/lang/nb-NO.js +12 -3
  22. package/es/locale/lang/pt-BR.js +12 -3
  23. package/es/locale/lang/ru-RU.js +12 -3
  24. package/es/locale/lang/th-TH.js +12 -3
  25. package/es/locale/lang/ug-CN.js +12 -3
  26. package/es/locale/lang/uk-UA.js +12 -3
  27. package/es/locale/lang/uz-UZ.js +12 -3
  28. package/es/locale/lang/vi-VN.js +11 -2
  29. package/es/locale/lang/zh-CHT.js +14 -5
  30. package/es/locale/lang/zh-CN.js +14 -5
  31. package/es/style.css +1 -1
  32. package/es/style.min.css +1 -1
  33. package/es/table/module/custom/hook.js +83 -12
  34. package/es/table/module/custom/panel.js +398 -257
  35. package/es/table/src/cell.js +2 -2
  36. package/es/table/src/columnInfo.js +14 -8
  37. package/es/table/src/emits.js +3 -0
  38. package/es/table/src/table.js +78 -46
  39. package/es/table/src/util.js +32 -1
  40. package/es/table/style.css +96 -49
  41. package/es/table/style.min.css +1 -1
  42. package/es/ui/index.js +16 -4
  43. package/es/ui/src/log.js +1 -1
  44. package/es/vxe-table/style.css +96 -49
  45. package/es/vxe-table/style.min.css +1 -1
  46. package/lib/{iconfont.1782890314097.ttf → iconfont.1783331249334.ttf} +0 -0
  47. package/lib/iconfont.1783331249334.woff +0 -0
  48. package/lib/iconfont.1783331249334.woff2 +0 -0
  49. package/lib/index.css +1 -1
  50. package/lib/index.min.css +1 -1
  51. package/lib/index.umd.js +521 -181
  52. package/lib/index.umd.min.js +1 -1
  53. package/lib/locale/lang/ar-EG.js +12 -3
  54. package/lib/locale/lang/ar-EG.min.js +1 -1
  55. package/lib/locale/lang/ar-EG.umd.js +12 -3
  56. package/lib/locale/lang/de-DE.js +12 -3
  57. package/lib/locale/lang/de-DE.min.js +1 -1
  58. package/lib/locale/lang/de-DE.umd.js +12 -3
  59. package/lib/locale/lang/en-US.js +16 -7
  60. package/lib/locale/lang/en-US.min.js +1 -1
  61. package/lib/locale/lang/en-US.umd.js +16 -7
  62. package/lib/locale/lang/es-ES.js +12 -3
  63. package/lib/locale/lang/es-ES.min.js +1 -1
  64. package/lib/locale/lang/es-ES.umd.js +12 -3
  65. package/lib/locale/lang/fr-FR.js +12 -3
  66. package/lib/locale/lang/fr-FR.min.js +1 -1
  67. package/lib/locale/lang/fr-FR.umd.js +12 -3
  68. package/lib/locale/lang/hu-HU.js +12 -3
  69. package/lib/locale/lang/hu-HU.min.js +1 -1
  70. package/lib/locale/lang/hu-HU.umd.js +12 -3
  71. package/lib/locale/lang/hy-AM.js +12 -3
  72. package/lib/locale/lang/hy-AM.min.js +1 -1
  73. package/lib/locale/lang/hy-AM.umd.js +12 -3
  74. package/lib/locale/lang/id-ID.js +12 -3
  75. package/lib/locale/lang/id-ID.min.js +1 -1
  76. package/lib/locale/lang/id-ID.umd.js +12 -3
  77. package/lib/locale/lang/it-IT.js +11 -2
  78. package/lib/locale/lang/it-IT.min.js +1 -1
  79. package/lib/locale/lang/it-IT.umd.js +11 -2
  80. package/lib/locale/lang/ja-JP.js +12 -3
  81. package/lib/locale/lang/ja-JP.min.js +1 -1
  82. package/lib/locale/lang/ja-JP.umd.js +12 -3
  83. package/lib/locale/lang/ko-KR.js +12 -3
  84. package/lib/locale/lang/ko-KR.min.js +1 -1
  85. package/lib/locale/lang/ko-KR.umd.js +12 -3
  86. package/lib/locale/lang/ms-MY.js +12 -3
  87. package/lib/locale/lang/ms-MY.min.js +1 -1
  88. package/lib/locale/lang/ms-MY.umd.js +12 -3
  89. package/lib/locale/lang/nb-NO.js +12 -3
  90. package/lib/locale/lang/nb-NO.min.js +1 -1
  91. package/lib/locale/lang/nb-NO.umd.js +12 -3
  92. package/lib/locale/lang/pt-BR.js +12 -3
  93. package/lib/locale/lang/pt-BR.min.js +1 -1
  94. package/lib/locale/lang/pt-BR.umd.js +12 -3
  95. package/lib/locale/lang/ru-RU.js +12 -3
  96. package/lib/locale/lang/ru-RU.min.js +1 -1
  97. package/lib/locale/lang/ru-RU.umd.js +12 -3
  98. package/lib/locale/lang/th-TH.js +12 -3
  99. package/lib/locale/lang/th-TH.min.js +1 -1
  100. package/lib/locale/lang/th-TH.umd.js +12 -3
  101. package/lib/locale/lang/ug-CN.js +12 -3
  102. package/lib/locale/lang/ug-CN.min.js +1 -1
  103. package/lib/locale/lang/ug-CN.umd.js +12 -3
  104. package/lib/locale/lang/uk-UA.js +12 -3
  105. package/lib/locale/lang/uk-UA.min.js +1 -1
  106. package/lib/locale/lang/uk-UA.umd.js +12 -3
  107. package/lib/locale/lang/uz-UZ.js +12 -3
  108. package/lib/locale/lang/uz-UZ.min.js +1 -1
  109. package/lib/locale/lang/uz-UZ.umd.js +12 -3
  110. package/lib/locale/lang/vi-VN.js +11 -2
  111. package/lib/locale/lang/vi-VN.min.js +1 -1
  112. package/lib/locale/lang/vi-VN.umd.js +11 -2
  113. package/lib/locale/lang/zh-CHT.js +14 -5
  114. package/lib/locale/lang/zh-CHT.min.js +1 -1
  115. package/lib/locale/lang/zh-CHT.umd.js +14 -5
  116. package/lib/locale/lang/zh-CN.js +14 -5
  117. package/lib/locale/lang/zh-CN.min.js +1 -1
  118. package/lib/locale/lang/zh-CN.umd.js +14 -5
  119. package/lib/style.css +1 -1
  120. package/lib/style.min.css +1 -1
  121. package/lib/table/module/custom/hook.js +90 -10
  122. package/lib/table/module/custom/hook.min.js +1 -1
  123. package/lib/table/module/custom/panel.js +333 -141
  124. package/lib/table/module/custom/panel.min.js +1 -1
  125. package/lib/table/src/cell.js +2 -1
  126. package/lib/table/src/cell.min.js +1 -1
  127. package/lib/table/src/columnInfo.js +17 -7
  128. package/lib/table/src/columnInfo.min.js +1 -1
  129. package/lib/table/src/emits.js +1 -1
  130. package/lib/table/src/emits.min.js +1 -1
  131. package/lib/table/src/table.js +10 -10
  132. package/lib/table/src/table.min.js +1 -1
  133. package/lib/table/src/util.js +38 -1
  134. package/lib/table/src/util.min.js +1 -1
  135. package/lib/table/style/style.css +96 -49
  136. package/lib/table/style/style.min.css +1 -1
  137. package/lib/ui/index.js +16 -4
  138. package/lib/ui/index.min.js +1 -1
  139. package/lib/ui/src/log.js +1 -1
  140. package/lib/ui/src/log.min.js +1 -1
  141. package/lib/vxe-table/style/style.css +96 -49
  142. package/lib/vxe-table/style/style.min.css +1 -1
  143. package/package.json +2 -2
  144. package/packages/locale/lang/ar-EG.ts +12 -3
  145. package/packages/locale/lang/de-DE.ts +12 -3
  146. package/packages/locale/lang/en-US.ts +16 -7
  147. package/packages/locale/lang/es-ES.ts +12 -3
  148. package/packages/locale/lang/fr-FR.ts +12 -3
  149. package/packages/locale/lang/hu-HU.ts +12 -3
  150. package/packages/locale/lang/hy-AM.ts +12 -3
  151. package/packages/locale/lang/id-ID.ts +12 -3
  152. package/packages/locale/lang/it-IT.ts +11 -2
  153. package/packages/locale/lang/ja-JP.ts +12 -3
  154. package/packages/locale/lang/ko-KR.ts +12 -3
  155. package/packages/locale/lang/ms-MY.ts +12 -3
  156. package/packages/locale/lang/nb-NO.ts +12 -3
  157. package/packages/locale/lang/pt-BR.ts +12 -3
  158. package/packages/locale/lang/ru-RU.ts +12 -3
  159. package/packages/locale/lang/th-TH.ts +12 -3
  160. package/packages/locale/lang/ug-CN.ts +12 -3
  161. package/packages/locale/lang/uk-UA.ts +12 -3
  162. package/packages/locale/lang/uz-UZ.ts +12 -3
  163. package/packages/locale/lang/vi-VN.ts +11 -2
  164. package/packages/locale/lang/zh-CHT.ts +14 -5
  165. package/packages/locale/lang/zh-CN.ts +14 -5
  166. package/packages/table/module/custom/hook.ts +83 -12
  167. package/packages/table/module/custom/panel.ts +481 -286
  168. package/packages/table/src/cell.ts +2 -2
  169. package/packages/table/src/columnInfo.ts +14 -8
  170. package/packages/table/src/emits.ts +3 -0
  171. package/packages/table/src/table.ts +89 -47
  172. package/packages/table/src/util.ts +35 -1
  173. package/packages/ui/index.ts +15 -3
  174. package/styles/components/icon.scss +29 -2
  175. package/styles/components/table-module/custom.scss +88 -67
  176. package/styles/icon/iconfont.ttf +0 -0
  177. package/styles/icon/iconfont.woff +0 -0
  178. package/styles/icon/iconfont.woff2 +0 -0
  179. package/styles/theme/base.scss +11 -0
  180. package/es/iconfont.1782890314097.woff +0 -0
  181. package/es/iconfont.1782890314097.woff2 +0 -0
  182. package/lib/iconfont.1782890314097.woff +0 -0
  183. package/lib/iconfont.1782890314097.woff2 +0 -0
package/dist/all.esm.js CHANGED
@@ -44,7 +44,7 @@ function eqEmptyValue(cellValue) {
44
44
  return cellValue === '' || XEUtils.eqNull(cellValue);
45
45
  }
46
46
 
47
- const version = "4.19.22";
47
+ const version = "4.19.24";
48
48
  VxeUI.version = version;
49
49
  VxeUI.tableVersion = version;
50
50
  VxeUI.setConfig({
@@ -155,6 +155,7 @@ VxeUI.setConfig({
155
155
  allowResizable: true,
156
156
  allowFixed: true,
157
157
  allowSort: true,
158
+ allowAlign: true,
158
159
  showSortDragButton: true,
159
160
  showFooter: true,
160
161
  placement: 'top-right',
@@ -163,9 +164,11 @@ VxeUI.setConfig({
163
164
  visible: true,
164
165
  resizable: true,
165
166
  sort: true,
166
- fixed: true
167
- // rowGroup: false,
168
- // aggFunc: false
167
+ fixed: true,
168
+ align: true,
169
+ headerAlign: true,
170
+ footerAlign: true,
171
+ aggFunc: true
169
172
  },
170
173
  // autoAggGroupValues: false,
171
174
  // checkMethod () {},
@@ -388,6 +391,15 @@ VxeUI.setIcon({
388
391
  TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
389
392
  TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
390
393
  TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
394
+ TABLE_CUSTOM_FIXED_LEFT: iconPrefix + 'fixed-left',
395
+ TABLE_CUSTOM_FIXED_RIGHT: iconPrefix + 'fixed-right',
396
+ TABLE_CUSTOM_ALIGN_LEFT: iconPrefix + 'align-left',
397
+ TABLE_CUSTOM_ALIGN_CENTER: iconPrefix + 'align-center',
398
+ TABLE_CUSTOM_ALIGN_RIGHT: iconPrefix + 'align-right',
399
+ TABLE_CUSTOM_MOVE_UP: iconPrefix + 'arrows-up',
400
+ TABLE_CUSTOM_MOVE_DN: iconPrefix + 'arrows-down',
401
+ TABLE_CUSTOM_PUT_TOP: iconPrefix + 'top',
402
+ TABLE_CUSTOM_PUT_BOTTOM: iconPrefix + 'bottom',
391
403
  TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
392
404
  TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
393
405
  TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
@@ -743,7 +755,7 @@ function wheelScrollTopTo(diffNum, cb) {
743
755
  }
744
756
 
745
757
  const { log } = VxeUI;
746
- const tableVersion = `table v${"4.19.22"}`;
758
+ const tableVersion = `table v${"4.19.24"}`;
747
759
  function createComponentLog(name) {
748
760
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
749
761
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -766,7 +778,7 @@ class ColumnInfo {
766
778
  const $xeGrid = $xeTable.xeGrid;
767
779
  const $xeGantt = $xeTable.xeGantt;
768
780
  const $xeGGWrapper = $xeGrid || $xeGantt;
769
- const { type, field, width, visible, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs;
781
+ const { type, field, width, visible, fixed, align, headerAlign, footerAlign, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs;
770
782
  const colId = colConfs.colId || XEUtils.uniqueId('col_');
771
783
  const defaultVisible = XEUtils.isBoolean(visible) ? visible : true;
772
784
  const defaultRenderWidth = width && isPx(width) && width !== 'auto' ? Math.max(0, XEUtils.toInteger(width)) : 0;
@@ -828,10 +840,10 @@ class ColumnInfo {
828
840
  minWidth: colConfs.minWidth,
829
841
  maxWidth: colConfs.maxWidth,
830
842
  resizable: colConfs.resizable,
831
- fixed: colConfs.fixed,
832
- align: colConfs.align,
833
- headerAlign: colConfs.headerAlign,
834
- footerAlign: colConfs.footerAlign,
843
+ fixed,
844
+ align,
845
+ headerAlign,
846
+ footerAlign,
835
847
  showOverflow: colConfs.showOverflow,
836
848
  showHeaderOverflow: colConfs.showHeaderOverflow,
837
849
  showFooterOverflow: colConfs.showFooterOverflow,
@@ -868,7 +880,7 @@ class ColumnInfo {
868
880
  titleHelp: colConfs.titleHelp,
869
881
  titlePrefix: colConfs.titlePrefix,
870
882
  titleSuffix: colConfs.titleSuffix,
871
- aggFunc: colConfs.aggFunc,
883
+ aggFunc,
872
884
  copyMethod: colConfs.copyMethod,
873
885
  cutMethod: colConfs.cutMethod,
874
886
  pasteMethod: colConfs.pasteMethod,
@@ -882,8 +894,11 @@ class ColumnInfo {
882
894
  defaultParentId: null,
883
895
  halfVisible: false,
884
896
  defaultVisible: defaultVisible,
885
- defaultFixed: colConfs.fixed,
886
- defaultAggFunc: colConfs.aggFunc,
897
+ defaultFixed: fixed,
898
+ defaultAlign: align,
899
+ defaultHeaderAlign: headerAlign,
900
+ defaultFooterAlign: footerAlign,
901
+ defaultAggFunc: aggFunc,
887
902
  checked: false,
888
903
  halfChecked: false,
889
904
  disabled: false,
@@ -902,6 +917,9 @@ class ColumnInfo {
902
917
  renderAggFn: '',
903
918
  renderAggDigits: null,
904
919
  renderAggFormat: null,
920
+ renderAlign: '',
921
+ renderHeaderAlign: '',
922
+ renderFooterAlign: '',
905
923
  renderFixed: '',
906
924
  renderVisible: false,
907
925
  renderWidth: defaultRenderWidth,
@@ -1165,7 +1183,8 @@ function createReactData$2() {
1165
1183
  activeWrapper: false,
1166
1184
  visible: false,
1167
1185
  maxHeight: null,
1168
- popupStyle: {},
1186
+ defPopupStyle: {},
1187
+ panePopupStyle: {},
1169
1188
  oldSortMaps: {},
1170
1189
  oldFixedMaps: {},
1171
1190
  oldVisibleMaps: {}
@@ -1965,6 +1984,36 @@ function colToVisible($xeTable, isForce, column, row) {
1965
1984
  }
1966
1985
  return Promise.resolve();
1967
1986
  }
1987
+ function hangleBolleanDefaultValue(currVal, defVal) {
1988
+ return XEUtils.isBoolean(currVal) ? currVal : defVal;
1989
+ }
1990
+ function handleCustomStoreConfig($xeTable) {
1991
+ const { computeCustomOpts } = $xeTable.getComputeMaps();
1992
+ const customOpts = computeCustomOpts.value;
1993
+ const { storage, storeOptions } = customOpts;
1994
+ const isAllCustom = storage === true;
1995
+ const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
1996
+ const isCustomAlign = hangleBolleanDefaultValue(storageOpts.align, isAllCustom);
1997
+ const isCustomHeaderAlign = hangleBolleanDefaultValue(storageOpts.headerAlign, isAllCustom);
1998
+ const isCustomFooterAlign = hangleBolleanDefaultValue(storageOpts.footerAlign, isAllCustom);
1999
+ const isCustomResizable = hangleBolleanDefaultValue(storageOpts.resizable, isAllCustom);
2000
+ const isCustomVisible = hangleBolleanDefaultValue(storageOpts.visible, isAllCustom);
2001
+ const isCustomFixed = hangleBolleanDefaultValue(storageOpts.fixed, isAllCustom);
2002
+ const isCustomSort = hangleBolleanDefaultValue(storageOpts.sort, isAllCustom);
2003
+ const isCustomAggGroup = hangleBolleanDefaultValue(storageOpts.aggGroup, isAllCustom);
2004
+ const isCustomAggFunc = hangleBolleanDefaultValue(storageOpts.aggFunc, isAllCustom);
2005
+ return {
2006
+ isCustomAlign,
2007
+ isCustomHeaderAlign,
2008
+ isCustomFooterAlign,
2009
+ isCustomResizable,
2010
+ isCustomVisible,
2011
+ isCustomFixed,
2012
+ isCustomSort,
2013
+ isCustomAggGroup,
2014
+ isCustomAggFunc
2015
+ };
2016
+ }
1968
2017
 
1969
2018
  function getOnName(type) {
1970
2019
  return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1);
@@ -2544,7 +2593,7 @@ const Cell = {
2544
2593
  const { treeExpandedFlag } = tableReactData;
2545
2594
  const { fullAllDataRowIdData, treeExpandedMaps, treeExpandLazyLoadedMaps } = tableInternalData;
2546
2595
  const treeOpts = computeTreeOpts.value;
2547
- const { padding, indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
2596
+ const { padding, indent, lazy, trigger, visibleMethod, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
2548
2597
  const childrenField = treeOpts.children || treeOpts.childrenField;
2549
2598
  const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
2550
2599
  const rowChilds = row[childrenField];
@@ -2579,7 +2628,7 @@ const Cell = {
2579
2628
  }
2580
2629
  : undefined
2581
2630
  }, [
2582
- showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild)
2631
+ showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild) && (!visibleMethod || visibleMethod(params))
2583
2632
  ? [
2584
2633
  h('div', Object.assign({ class: 'vxe-cell--tree-btn' }, ons), [
2585
2634
  h('i', {
@@ -3885,6 +3934,9 @@ const tableEmits = [
3885
3934
  'custom-visible-all',
3886
3935
  'custom-fixed-change',
3887
3936
  'custom-sort-change',
3937
+ 'custom-align-change',
3938
+ 'custom-header-align-change',
3939
+ 'custom-footer-align-change',
3888
3940
  'change-fnr', // 废弃
3889
3941
  'open-fnr',
3890
3942
  'show-fnr',
@@ -5893,6 +5945,20 @@ var TableCustomPanelComponent = defineVxeComponent({
5893
5945
  $xeTable.dispatchEvent('custom-fixed-change', { column, fixed: targetFixed }, evnt);
5894
5946
  }
5895
5947
  };
5948
+ const changeAlignOption = (column, targetAlign, colProperty, renderProperty, eName, evnt) => {
5949
+ const customOpts = computeCustomOpts.value;
5950
+ if (customOpts.immediate) {
5951
+ column[colProperty] = targetAlign;
5952
+ column[renderProperty] = targetAlign;
5953
+ tableReactData.isCustomStatus = true;
5954
+ $xeTable.handleCustom();
5955
+ $xeTable.saveCustomStore(`update:${colProperty}`);
5956
+ }
5957
+ else {
5958
+ column[renderProperty] = targetAlign;
5959
+ }
5960
+ $xeTable.dispatchEvent(eName, { column, [colProperty]: targetAlign }, evnt);
5961
+ };
5896
5962
  const allOptionEvent = (evnt) => {
5897
5963
  const { customStore } = tableReactData;
5898
5964
  const isAll = !customStore.isAll;
@@ -6348,7 +6414,7 @@ var TableCustomPanelComponent = defineVxeComponent({
6348
6414
  const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
6349
6415
  const customOpts = computeCustomOpts.value;
6350
6416
  const columnDragOpts = computeColumnDragOpts.value;
6351
- const { popupStyle } = customStore;
6417
+ const { defPopupStyle } = customStore;
6352
6418
  const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
6353
6419
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
6354
6420
  const vSize = computeSize.value;
@@ -6506,9 +6572,9 @@ var TableCustomPanelComponent = defineVxeComponent({
6506
6572
  !parentItem && allowFixed
6507
6573
  ? h('div', {
6508
6574
  class: 'vxe-table-custom--fixed-option'
6509
- }, [
6510
- VxeUIButtonComponent
6511
- ? h(VxeUIButtonComponent, {
6575
+ }, VxeUIButtonComponent
6576
+ ? [
6577
+ h(VxeUIButtonComponent, {
6512
6578
  mode: 'text',
6513
6579
  icon: column.renderFixed === 'left' ? getIcon$6().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon$6().TOOLBAR_TOOLS_FIXED_LEFT,
6514
6580
  status: column.renderFixed === 'left' ? 'primary' : '',
@@ -6517,10 +6583,8 @@ var TableCustomPanelComponent = defineVxeComponent({
6517
6583
  onClick: ({ $event }) => {
6518
6584
  changeFixedOption(column, 'left', $event);
6519
6585
  }
6520
- })
6521
- : renderEmptyElement$6($xeTable),
6522
- VxeUIButtonComponent
6523
- ? h(VxeUIButtonComponent, {
6586
+ }),
6587
+ h(VxeUIButtonComponent, {
6524
6588
  mode: 'text',
6525
6589
  icon: column.renderFixed === 'right' ? getIcon$6().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon$6().TOOLBAR_TOOLS_FIXED_RIGHT,
6526
6590
  status: column.renderFixed === 'right' ? 'primary' : '',
@@ -6530,8 +6594,8 @@ var TableCustomPanelComponent = defineVxeComponent({
6530
6594
  changeFixedOption(column, 'right', $event);
6531
6595
  }
6532
6596
  })
6533
- : renderEmptyElement$6($xeTable)
6534
- ])
6597
+ ]
6598
+ : [])
6535
6599
  : renderEmptyElement$6($xeTable)
6536
6600
  ]));
6537
6601
  }
@@ -6543,7 +6607,7 @@ var TableCustomPanelComponent = defineVxeComponent({
6543
6607
  [`size--${vSize}`]: vSize,
6544
6608
  'is--active': customStore.visible
6545
6609
  }],
6546
- style: popupStyle
6610
+ style: defPopupStyle
6547
6611
  }, customStore.visible
6548
6612
  ? [
6549
6613
  h('div', {
@@ -6664,44 +6728,18 @@ var TableCustomPanelComponent = defineVxeComponent({
6664
6728
  ]
6665
6729
  : []);
6666
6730
  };
6667
- const renderPopupPanel = () => {
6668
- const $xeGrid = $xeTable.xeGrid;
6669
- const $xeGantt = $xeTable.xeGantt;
6670
- const { customStore } = props;
6671
- const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps;
6672
- const { isCustomStatus, customColumnList } = tableReactData;
6731
+ const renderPopupBodys = () => {
6732
+ const { resizable: allResizable } = tableProps;
6733
+ const { customColumnList } = tableReactData;
6673
6734
  const customOpts = computeCustomOpts.value;
6674
6735
  const columnDragOpts = computeColumnDragOpts.value;
6675
- const aggregateOpts = computeAggregateOpts.value;
6676
- const { placement: aggPlacement } = aggregateOpts;
6677
- const { mode, immediate, showSortDragButton, showSortMoveButton, showSortPutButton, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
6736
+ const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton, allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
6678
6737
  const columnOpts = computeColumnOpts.value;
6679
- const { maxFixedSize } = columnOpts;
6680
6738
  const resizableOpts = computeResizableOpts.value;
6681
6739
  const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts;
6682
- const modalOpts = Object.assign({}, modalOptions);
6683
- const drawerOpts = Object.assign({}, drawerOptions);
6684
6740
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
6685
6741
  const { isCrossDrag, isPeerDrag } = columnDragOpts;
6686
- const slots = customOpts.slots || {};
6687
- const headerSlot = slots.header;
6688
- const topSlot = slots.top;
6689
- const bottomSlot = slots.bottom;
6690
- const defaultSlot = slots.default;
6691
- const footerSlot = slots.footer;
6692
6742
  const trVNs = [];
6693
- const isAllChecked = customStore.isAll;
6694
- const isAllIndeterminate = customStore.isIndeterminate;
6695
- const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
6696
- const params = {
6697
- $table: $xeTable,
6698
- $grid: $xeGrid,
6699
- $gantt: $xeGantt,
6700
- columns: customColumnList,
6701
- isAllChecked,
6702
- isAllIndeterminate,
6703
- isCustomStatus
6704
- };
6705
6743
  XEUtils.eachTree(customColumnList, (column, index, items, path, parentItem) => {
6706
6744
  const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
6707
6745
  if (isVisible) {
@@ -6733,6 +6771,243 @@ var TableCustomPanelComponent = defineVxeComponent({
6733
6771
  const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
6734
6772
  const isHidden = !isChecked;
6735
6773
  const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
6774
+ const alignList = [
6775
+ { icon: getIcon$6().TABLE_CUSTOM_ALIGN_LEFT, value: 'left', title: getI18n$a('vxe.custom.setting.anLeftTitle'), disabled: isHidden },
6776
+ { icon: getIcon$6().TABLE_CUSTOM_ALIGN_CENTER, value: 'center', title: getI18n$a('vxe.custom.setting.anCenterTitle'), disabled: isHidden },
6777
+ { icon: getIcon$6().TABLE_CUSTOM_ALIGN_RIGHT, value: 'right', title: getI18n$a('vxe.custom.setting.anRightTitle'), disabled: isHidden }
6778
+ ];
6779
+ const tdVNs = [];
6780
+ if (allowVisible) {
6781
+ tdVNs.push(h('td', {
6782
+ key: 'av',
6783
+ class: 'vxe-table-custom-popup--column-td col--visible'
6784
+ }, [
6785
+ h('div', {
6786
+ class: ['vxe-table-custom--checkbox-option', {
6787
+ 'is--checked': isChecked,
6788
+ 'is--indeterminate': isIndeterminate,
6789
+ 'is--disabled': isDisabled
6790
+ }],
6791
+ title: getI18n$a('vxe.custom.setting.colVisible'),
6792
+ onClick: (evnt) => {
6793
+ if (!isDisabled) {
6794
+ changeCheckboxOption(column, evnt);
6795
+ }
6796
+ }
6797
+ }, [
6798
+ h('span', {
6799
+ class: ['vxe-checkbox--icon', isIndeterminate ? getIcon$6().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon$6().TABLE_CHECKBOX_CHECKED : getIcon$6().TABLE_CHECKBOX_UNCHECKED)]
6800
+ })
6801
+ ])
6802
+ ]));
6803
+ }
6804
+ tdVNs.push(h('td', {
6805
+ key: 'at',
6806
+ class: 'vxe-table-custom-popup--column-td col--name'
6807
+ }, [
6808
+ h('div', {
6809
+ class: 'vxe-table-custom-popup--name'
6810
+ }, [
6811
+ (allowSort && showSortDragButton) || (allowGroup || allowValues)
6812
+ ? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
6813
+ ? h('div', Object.assign({ class: ['vxe-table-custom-popup--column-sort-btn', {
6814
+ 'is--disabled': isHidden
6815
+ }], title: getI18n$a('vxe.custom.setting.sortHelpTip') }, (isHidden
6816
+ ? {}
6817
+ : {
6818
+ onMousedown: sortMousedownEvent,
6819
+ onMouseup: sortMouseupEvent
6820
+ })), [
6821
+ h('i', {
6822
+ class: getIcon$6().TABLE_CUSTOM_SORT
6823
+ })
6824
+ ])
6825
+ : h('div', {
6826
+ class: 'vxe-table-custom-popup--column-sort-placeholder'
6827
+ }))
6828
+ : renderEmptyElement$6($xeTable),
6829
+ column.type === 'html'
6830
+ ? h('div', {
6831
+ key: '1',
6832
+ class: 'vxe-table-custom-popup--title',
6833
+ innerHTML: colTitle
6834
+ })
6835
+ : h('div', {
6836
+ key: '0',
6837
+ class: 'vxe-table-custom-popup--title',
6838
+ title: colTitle
6839
+ }, colTitle),
6840
+ showSortBtn && (showSortMoveButton || showSortPutButton)
6841
+ ? h('div', {
6842
+ class: 'vxe-table-custom-popup--move-btn'
6843
+ }, VxeUIButtonComponent
6844
+ ? [
6845
+ showSortMoveButton
6846
+ ? h(VxeUIButtonComponent, {
6847
+ mode: 'text',
6848
+ icon: 'vxe-icon-arrows-up',
6849
+ title: getI18n$a('vxe.custom.setting.moveUpTitle'),
6850
+ disabled: index <= 0,
6851
+ onClick(evntParame) {
6852
+ sortMoveUpEvent(evntParame, column);
6853
+ }
6854
+ })
6855
+ : renderEmptyElement$6($xeTable),
6856
+ showSortMoveButton
6857
+ ? h(VxeUIButtonComponent, {
6858
+ mode: 'text',
6859
+ icon: 'vxe-icon-arrows-down',
6860
+ title: getI18n$a('vxe.custom.setting.moveDnTitle'),
6861
+ disabled: index >= items.length - 1,
6862
+ onClick(evntParame) {
6863
+ sortMoveDnEvent(evntParame, column);
6864
+ }
6865
+ })
6866
+ : renderEmptyElement$6($xeTable),
6867
+ showSortPutButton && !parentItem
6868
+ ? h(VxeUIButtonComponent, {
6869
+ mode: 'text',
6870
+ icon: 'vxe-icon-top',
6871
+ title: getI18n$a('vxe.custom.setting.putTopTitle'),
6872
+ disabled: index <= 0,
6873
+ onClick(evntParame) {
6874
+ sortMoveTopEvent(evntParame, column);
6875
+ }
6876
+ })
6877
+ : renderEmptyElement$6($xeTable),
6878
+ showSortPutButton && !parentItem
6879
+ ? h(VxeUIButtonComponent, {
6880
+ mode: 'text',
6881
+ icon: 'vxe-icon-bottom',
6882
+ title: getI18n$a('vxe.custom.setting.putBottomTitle'),
6883
+ disabled: index >= items.length - 1,
6884
+ onClick(evntParame) {
6885
+ sortMoveBottomEvent(evntParame, column);
6886
+ }
6887
+ })
6888
+ : renderEmptyElement$6($xeTable)
6889
+ ]
6890
+ : [])
6891
+ : renderEmptyElement$6($xeTable)
6892
+ ])
6893
+ ]));
6894
+ if (allowResizable) {
6895
+ tdVNs.push(h('td', {
6896
+ key: 'aw',
6897
+ class: 'vxe-table-custom-popup--column-td col--resizable'
6898
+ }, [
6899
+ ((column.children && column.children.length) ||
6900
+ !(XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable)))
6901
+ ? h('span', '-')
6902
+ : (VxeUINumberInputComponent
6903
+ ? h(VxeUINumberInputComponent, {
6904
+ type: 'integer',
6905
+ immediate: false,
6906
+ disabled: isHidden,
6907
+ modelValue: column.renderResizeWidth,
6908
+ min: customMinWidth || undefined,
6909
+ max: customMaxWidth || undefined,
6910
+ 'onUpdate:modelValue'(value) {
6911
+ const width = Math.max(0, Number(value));
6912
+ column.renderResizeWidth = width;
6913
+ },
6914
+ onChange() {
6915
+ changeColumnWidth(column);
6916
+ }
6917
+ })
6918
+ : renderEmptyElement$6($xeTable))
6919
+ ]));
6920
+ }
6921
+ if (allowFixed) {
6922
+ tdVNs.push(h('td', {
6923
+ key: 'af',
6924
+ class: 'vxe-table-custom-popup--column-td col--fixed'
6925
+ }, parentItem
6926
+ ? [h('span', '-')]
6927
+ : (VxeUIRadioGroupComponent
6928
+ ? [
6929
+ h(VxeUIButtonComponent, {
6930
+ icon: column.renderFixed === 'left' ? getIcon$6().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon$6().TOOLBAR_TOOLS_FIXED_LEFT,
6931
+ status: column.renderFixed === 'left' ? 'primary' : '',
6932
+ disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
6933
+ title: getI18n$a(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
6934
+ onClick: ({ $event }) => {
6935
+ changeFixedOption(column, 'left', $event);
6936
+ }
6937
+ }),
6938
+ h(VxeUIButtonComponent, {
6939
+ icon: column.renderFixed === 'right' ? getIcon$6().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon$6().TOOLBAR_TOOLS_FIXED_RIGHT,
6940
+ status: column.renderFixed === 'right' ? 'primary' : '',
6941
+ disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
6942
+ title: getI18n$a(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
6943
+ onClick: ({ $event }) => {
6944
+ changeFixedOption(column, 'right', $event);
6945
+ }
6946
+ })
6947
+ ]
6948
+ : [])));
6949
+ }
6950
+ if (allowAlign) {
6951
+ tdVNs.push(h('td', {
6952
+ key: 'aa',
6953
+ class: 'vxe-table-custom-popup--column-td col--align'
6954
+ }, VxeUIRadioGroupComponent
6955
+ ? [
6956
+ h(VxeUIRadioGroupComponent, {
6957
+ modelValue: column.renderAlign || '',
6958
+ type: 'button',
6959
+ strict: false,
6960
+ disabled: isHidden,
6961
+ options: alignList,
6962
+ onChange({ value, $event }) {
6963
+ changeAlignOption(column, value, 'align', 'renderAlign', 'custom-align-change', $event);
6964
+ }
6965
+ })
6966
+ ]
6967
+ : []));
6968
+ }
6969
+ if (allowHeaderAlign) {
6970
+ tdVNs.push(h('td', {
6971
+ key: 'aha',
6972
+ class: 'vxe-table-custom-popup--column-td col--header-align'
6973
+ }, isColGroup
6974
+ ? [h('span', '-')]
6975
+ : (VxeUIRadioGroupComponent
6976
+ ? [
6977
+ h(VxeUIRadioGroupComponent, {
6978
+ modelValue: column.renderHeaderAlign || '',
6979
+ type: 'button',
6980
+ strict: false,
6981
+ disabled: isHidden,
6982
+ options: alignList,
6983
+ onChange({ value, $event }) {
6984
+ changeAlignOption(column, value, 'headerAlign', 'renderHeaderAlign', 'custom-header-align-change', $event);
6985
+ }
6986
+ })
6987
+ ]
6988
+ : [])));
6989
+ }
6990
+ if (allowFooterAlign) {
6991
+ tdVNs.push(h('td', {
6992
+ key: 'afa',
6993
+ class: 'vxe-table-custom-popup--column-td col--footer-align'
6994
+ }, isColGroup
6995
+ ? [h('span', '-')]
6996
+ : (VxeUIRadioGroupComponent
6997
+ ? [
6998
+ h(VxeUIRadioGroupComponent, {
6999
+ modelValue: column.renderFooterAlign || '',
7000
+ type: 'button',
7001
+ strict: false,
7002
+ disabled: isHidden,
7003
+ options: alignList,
7004
+ onChange({ value, $event }) {
7005
+ changeAlignOption(column, value, 'footerAlign', 'renderFooterAlign', 'custom-footer-align-change', $event);
7006
+ }
7007
+ })
7008
+ ]
7009
+ : [])));
7010
+ }
6736
7011
  trVNs.push(h('tr', {
6737
7012
  key: column.id,
6738
7013
  colid: column.id,
@@ -6742,177 +7017,139 @@ var TableCustomPanelComponent = defineVxeComponent({
6742
7017
  onDragstart: sortDragstartEvent,
6743
7018
  onDragend: sortDragendEvent,
6744
7019
  onDragover: sortDragoverEvent
6745
- }, [
6746
- allowVisible
6747
- ? h('td', {
6748
- class: 'vxe-table-custom-popup--column-item col--visible'
6749
- }, [
6750
- h('div', {
6751
- class: ['vxe-table-custom--checkbox-option', {
6752
- 'is--checked': isChecked,
6753
- 'is--indeterminate': isIndeterminate,
6754
- 'is--disabled': isDisabled
6755
- }],
6756
- title: getI18n$a('vxe.custom.setting.colVisible'),
6757
- onClick: (evnt) => {
6758
- if (!isDisabled) {
6759
- changeCheckboxOption(column, evnt);
6760
- }
6761
- }
6762
- }, [
6763
- h('span', {
6764
- class: ['vxe-checkbox--icon', isIndeterminate ? getIcon$6().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon$6().TABLE_CHECKBOX_CHECKED : getIcon$6().TABLE_CHECKBOX_UNCHECKED)]
6765
- })
6766
- ])
6767
- ])
6768
- : renderEmptyElement$6($xeTable),
6769
- h('td', {
6770
- class: 'vxe-table-custom-popup--column-item col--name'
6771
- }, [
6772
- h('div', {
6773
- class: 'vxe-table-custom-popup--name'
6774
- }, [
6775
- (allowSort && showSortDragButton) || (allowGroup || allowValues)
6776
- ? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
6777
- ? h('div', Object.assign({ class: ['vxe-table-custom-popup--column-sort-btn', {
6778
- 'is--disabled': isHidden
6779
- }], title: getI18n$a('vxe.custom.setting.sortHelpTip') }, (isHidden
6780
- ? {}
6781
- : {
6782
- onMousedown: sortMousedownEvent,
6783
- onMouseup: sortMouseupEvent
6784
- })), [
6785
- h('i', {
6786
- class: getIcon$6().TABLE_CUSTOM_SORT
6787
- })
6788
- ])
6789
- : h('div', {
6790
- class: 'vxe-table-custom-popup--column-sort-placeholder'
6791
- }))
6792
- : renderEmptyElement$6($xeTable),
6793
- column.type === 'html'
6794
- ? h('div', {
6795
- key: '1',
6796
- class: 'vxe-table-custom-popup--title',
6797
- innerHTML: colTitle
6798
- })
6799
- : h('div', {
6800
- key: '0',
6801
- class: 'vxe-table-custom-popup--title',
6802
- title: colTitle
6803
- }, colTitle),
6804
- showSortBtn && (showSortMoveButton || showSortPutButton)
6805
- ? h('div', {
6806
- class: 'vxe-table-custom-popup--move-btn'
6807
- }, VxeUIButtonComponent
6808
- ? [
6809
- showSortMoveButton
6810
- ? h(VxeUIButtonComponent, {
6811
- mode: 'text',
6812
- content: getI18n$a('vxe.custom.setting.moveUp'),
6813
- title: getI18n$a('vxe.custom.setting.moveUpTitle'),
6814
- disabled: index <= 0,
6815
- onClick(evntParame) {
6816
- sortMoveUpEvent(evntParame, column);
6817
- }
6818
- })
6819
- : renderEmptyElement$6($xeTable),
6820
- showSortMoveButton
6821
- ? h(VxeUIButtonComponent, {
6822
- mode: 'text',
6823
- content: getI18n$a('vxe.custom.setting.moveDn'),
6824
- title: getI18n$a('vxe.custom.setting.moveDnTitle'),
6825
- disabled: index >= items.length - 1,
6826
- onClick(evntParame) {
6827
- sortMoveDnEvent(evntParame, column);
6828
- }
6829
- })
6830
- : renderEmptyElement$6($xeTable),
6831
- showSortPutButton && !parentItem
6832
- ? h(VxeUIButtonComponent, {
6833
- mode: 'text',
6834
- content: getI18n$a('vxe.custom.setting.putTop'),
6835
- title: getI18n$a('vxe.custom.setting.putTopTitle'),
6836
- disabled: index <= 0,
6837
- onClick(evntParame) {
6838
- sortMoveTopEvent(evntParame, column);
6839
- }
6840
- })
6841
- : renderEmptyElement$6($xeTable),
6842
- showSortPutButton && !parentItem
6843
- ? h(VxeUIButtonComponent, {
6844
- mode: 'text',
6845
- content: getI18n$a('vxe.custom.setting.putBottom'),
6846
- title: getI18n$a('vxe.custom.setting.putBottomTitle'),
6847
- disabled: index >= items.length - 1,
6848
- onClick(evntParame) {
6849
- sortMoveBottomEvent(evntParame, column);
6850
- }
6851
- })
6852
- : renderEmptyElement$6($xeTable)
6853
- ]
6854
- : [])
6855
- : renderEmptyElement$6($xeTable)
6856
- ])
6857
- ]),
6858
- allowResizable
6859
- ? h('td', {
6860
- class: 'vxe-table-custom-popup--column-item col--resizable'
6861
- }, [
6862
- ((column.children && column.children.length) ||
6863
- !(XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable)))
6864
- ? h('span', '-')
6865
- : (VxeUINumberInputComponent
6866
- ? h(VxeUINumberInputComponent, {
6867
- type: 'integer',
6868
- immediate: false,
6869
- disabled: isHidden,
6870
- modelValue: column.renderResizeWidth,
6871
- min: customMinWidth || undefined,
6872
- max: customMaxWidth || undefined,
6873
- 'onUpdate:modelValue'(value) {
6874
- const width = Math.max(0, Number(value));
6875
- column.renderResizeWidth = width;
6876
- },
6877
- onChange() {
6878
- changeColumnWidth(column);
6879
- }
6880
- })
6881
- : renderEmptyElement$6($xeTable))
6882
- ])
6883
- : renderEmptyElement$6($xeTable),
6884
- allowFixed
6885
- ? h('td', {
6886
- class: 'vxe-table-custom-popup--column-item col--fixed'
6887
- }, [
6888
- parentItem
6889
- ? h('span', '-')
6890
- : (VxeUIRadioGroupComponent
6891
- ? h(VxeUIRadioGroupComponent, {
6892
- modelValue: column.renderFixed || '',
6893
- type: 'button',
6894
- size: 'mini',
6895
- disabled: isHidden,
6896
- options: [
6897
- { label: getI18n$a('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isHidden || isMaxFixedColumn },
6898
- { label: getI18n$a('vxe.custom.setting.fixedUnset'), value: '', disabled: isHidden },
6899
- { label: getI18n$a('vxe.custom.setting.fixedRight'), value: 'right', disabled: isHidden || isMaxFixedColumn }
6900
- ],
6901
- onChange({ label, $event }) {
6902
- changeFixedOption(column, label, $event);
6903
- }
6904
- })
6905
- : renderEmptyElement$6($xeTable))
6906
- ])
6907
- : renderEmptyElement$6($xeTable)
6908
- ]));
7020
+ }, tdVNs));
6909
7021
  }
6910
7022
  });
7023
+ return trVNs;
7024
+ };
7025
+ const renderPopupPanel = () => {
7026
+ const $xeGrid = $xeTable.xeGrid;
7027
+ const $xeGantt = $xeTable.xeGantt;
7028
+ const { customStore } = props;
7029
+ const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
7030
+ const { isCustomStatus, customColumnList } = tableReactData;
7031
+ const vSize = computeSize.value;
7032
+ const customOpts = computeCustomOpts.value;
7033
+ const aggregateOpts = computeAggregateOpts.value;
7034
+ const { panePopupStyle } = customStore;
7035
+ const { placement: aggPlacement } = aggregateOpts;
7036
+ const { mode, immediate, modalOptions, drawerOptions, allowVisible, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable } = customOpts;
7037
+ const columnOpts = computeColumnOpts.value;
7038
+ const { maxFixedSize } = columnOpts;
7039
+ const modalOpts = Object.assign({}, modalOptions);
7040
+ const drawerOpts = Object.assign({}, drawerOptions);
7041
+ const slots = customOpts.slots || {};
7042
+ const headerSlot = slots.header;
7043
+ const topSlot = slots.top;
7044
+ const bottomSlot = slots.bottom;
7045
+ const defaultSlot = slots.default;
7046
+ const footerSlot = slots.footer;
7047
+ const isAllChecked = customStore.isAll;
7048
+ const isAllIndeterminate = customStore.isIndeterminate;
7049
+ const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
7050
+ const params = {
7051
+ $table: $xeTable,
7052
+ $grid: $xeGrid,
7053
+ $gantt: $xeGantt,
7054
+ columns: customColumnList,
7055
+ isAllChecked,
7056
+ isAllIndeterminate,
7057
+ isCustomStatus
7058
+ };
7059
+ const colVNs = [];
7060
+ const headVNs = [];
7061
+ if (allowVisible) {
7062
+ colVNs.push(h('col', {
7063
+ key: 'av',
7064
+ class: 'vxe-table-custom-popup--column-col col--checkbox'
7065
+ }));
7066
+ headVNs.push(h('th', {
7067
+ key: 'av',
7068
+ class: 'vxe-table-custom-popup--column-th col--checkbox'
7069
+ }, [
7070
+ h('div', {
7071
+ class: ['vxe-table-custom--checkbox-option', {
7072
+ 'is--checked': isAllChecked,
7073
+ 'is--indeterminate': isAllIndeterminate
7074
+ }],
7075
+ title: getI18n$a('vxe.table.allTitle'),
7076
+ onClick: allOptionEvent
7077
+ }, [
7078
+ h('span', {
7079
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon$6().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon$6().TABLE_CHECKBOX_CHECKED : getIcon$6().TABLE_CHECKBOX_UNCHECKED)]
7080
+ })
7081
+ // h('span', {
7082
+ // class: 'vxe-checkbox--label'
7083
+ // }, getI18n('vxe.toolbar.customAll'))
7084
+ ])
7085
+ ]));
7086
+ }
7087
+ colVNs.push(h('col', {
7088
+ key: 'at',
7089
+ class: 'vxe-table-custom-popup--column-col col--title'
7090
+ }));
7091
+ headVNs.push(h('th', {
7092
+ key: 'at',
7093
+ class: 'vxe-table-custom-popup--column-th col--title'
7094
+ }, getI18n$a('vxe.custom.setting.colTitle')));
7095
+ if (allowResizable) {
7096
+ colVNs.push(h('col', {
7097
+ key: 'aw',
7098
+ class: 'vxe-table-custom-popup--column-col col--width'
7099
+ }));
7100
+ headVNs.push(h('th', {
7101
+ key: 'aw',
7102
+ class: 'vxe-table-custom-popup--column-th col--width'
7103
+ }, getI18n$a('vxe.custom.setting.colResizable')));
7104
+ }
7105
+ if (allowFixed) {
7106
+ colVNs.push(h('col', {
7107
+ key: 'af',
7108
+ class: 'vxe-table-custom-popup--column-col col--fixed'
7109
+ }));
7110
+ headVNs.push(h('th', {
7111
+ key: 'af',
7112
+ class: 'vxe-table-custom-popup--column-th col--fixed'
7113
+ }, getI18n$a(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])));
7114
+ }
7115
+ if (allowAlign) {
7116
+ colVNs.push(h('col', {
7117
+ key: 'aa',
7118
+ class: 'vxe-table-custom-popup--column-col col--align'
7119
+ }));
7120
+ headVNs.push(h('th', {
7121
+ key: 'aa',
7122
+ class: 'vxe-table-custom-popup--column-th col--align'
7123
+ }, getI18n$a('vxe.custom.setting.colAlign')));
7124
+ }
7125
+ if (allowHeaderAlign) {
7126
+ colVNs.push(h('col', {
7127
+ key: 'aha',
7128
+ class: 'vxe-table-custom-popup--column-col col--header-align'
7129
+ }));
7130
+ headVNs.push(h('th', {
7131
+ key: 'aha',
7132
+ class: 'vxe-table-custom-popup--column-th col--header-align'
7133
+ }, getI18n$a('vxe.custom.setting.colHeadAlign')));
7134
+ }
7135
+ if (allowFooterAlign) {
7136
+ colVNs.push(h('col', {
7137
+ key: 'afa',
7138
+ class: 'vxe-table-custom-popup--column-col col--footer-align'
7139
+ }));
7140
+ headVNs.push(h('th', {
7141
+ key: 'afa',
7142
+ class: 'vxe-table-custom-popup--column-th col--footer-align'
7143
+ }, getI18n$a('vxe.custom.setting.colFootAlign')));
7144
+ }
6911
7145
  const scopedSlots = {
6912
7146
  default: () => {
6913
7147
  return h('div', {
6914
7148
  ref: refBodyWrapperElem,
6915
- class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`]
7149
+ class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`, {
7150
+ [`size--${vSize}`]: vSize
7151
+ }],
7152
+ style: panePopupStyle
6916
7153
  }, defaultSlot
6917
7154
  ? $xeTable.callSlot(defaultSlot, params)
6918
7155
  : [
@@ -6934,62 +7171,16 @@ var TableCustomPanelComponent = defineVxeComponent({
6934
7171
  class: 'vxe-table-custom-popup--table-wrapper'
6935
7172
  }, [
6936
7173
  h('table', {}, [
6937
- h('colgroup', {}, [
6938
- allowVisible
6939
- ? h('col', {
6940
- class: 'vxe-table-custom-popup--table-col-seq'
6941
- })
6942
- : renderEmptyElement$6($xeTable),
6943
- h('col', {
6944
- class: 'vxe-table-custom-popup--table-col-title'
6945
- }),
6946
- allowResizable
6947
- ? h('col', {
6948
- class: 'vxe-table-custom-popup--table-col-width'
6949
- })
6950
- : renderEmptyElement$6($xeTable),
6951
- allowFixed
6952
- ? h('col', {
6953
- class: 'vxe-table-custom-popup--table-col-fixed'
6954
- })
6955
- : renderEmptyElement$6($xeTable)
6956
- ]),
7174
+ h('colgroup', {}, colVNs),
6957
7175
  h('thead', {}, [
6958
- h('tr', {}, [
6959
- allowVisible
6960
- ? h('th', {}, [
6961
- h('div', {
6962
- class: ['vxe-table-custom--checkbox-option', {
6963
- 'is--checked': isAllChecked,
6964
- 'is--indeterminate': isAllIndeterminate
6965
- }],
6966
- title: getI18n$a('vxe.table.allTitle'),
6967
- onClick: allOptionEvent
6968
- }, [
6969
- h('span', {
6970
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon$6().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon$6().TABLE_CHECKBOX_CHECKED : getIcon$6().TABLE_CHECKBOX_UNCHECKED)]
6971
- }),
6972
- h('span', {
6973
- class: 'vxe-checkbox--label'
6974
- }, getI18n$a('vxe.toolbar.customAll'))
6975
- ])
6976
- ])
6977
- : renderEmptyElement$6($xeTable),
6978
- h('th', {}, getI18n$a('vxe.custom.setting.colTitle')),
6979
- allowResizable
6980
- ? h('th', {}, getI18n$a('vxe.custom.setting.colResizable'))
6981
- : renderEmptyElement$6($xeTable),
6982
- allowFixed
6983
- ? h('th', {}, getI18n$a(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
6984
- : renderEmptyElement$6($xeTable)
6985
- ])
7176
+ h('tr', {}, headVNs)
6986
7177
  ]),
6987
7178
  h(TransitionGroup, {
6988
7179
  class: 'vxe-table-custom--panel-list',
6989
7180
  tag: 'tbody',
6990
7181
  name: 'vxe-table-custom--list'
6991
7182
  }, {
6992
- default: () => trVNs
7183
+ default: () => renderPopupBodys()
6993
7184
  })
6994
7185
  ])
6995
7186
  ]),
@@ -7024,6 +7215,7 @@ var TableCustomPanelComponent = defineVxeComponent({
7024
7215
  immediate
7025
7216
  ? (VxeUIButtonComponent
7026
7217
  ? h(VxeUIButtonComponent, {
7218
+ status: 'primary',
7027
7219
  content: customOpts.closeButtonText || getI18n$a('vxe.table.customClose'),
7028
7220
  onClick: cancelCloseEvent
7029
7221
  })
@@ -7075,8 +7267,8 @@ var TableCustomPanelComponent = defineVxeComponent({
7075
7267
  className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
7076
7268
  modelValue: customStore.visible,
7077
7269
  title: modalOpts.title || getI18n$a('vxe.custom.cstmTitle'),
7078
- width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
7079
- minWidth: modalOpts.minWidth || 700,
7270
+ width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
7271
+ minWidth: modalOpts.minWidth || 800,
7080
7272
  height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
7081
7273
  minHeight: modalOpts.minHeight || 400,
7082
7274
  showZoom: modalOpts.showZoom,
@@ -7085,6 +7277,7 @@ var TableCustomPanelComponent = defineVxeComponent({
7085
7277
  mask: modalOpts.mask,
7086
7278
  lockView: modalOpts.lockView,
7087
7279
  resize: modalOpts.resize,
7280
+ transfer: modalOpts.transfer,
7088
7281
  escClosable: !!modalOpts.escClosable,
7089
7282
  maskClosable: !!modalOpts.maskClosable,
7090
7283
  destroyOnClose: true,
@@ -13128,6 +13321,7 @@ hooks$2.add('tableValidatorModule', {
13128
13321
  });
13129
13322
 
13130
13323
  const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'getCustomVisible', 'toggleCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox'];
13324
+ const customColumnCssKeys = ['checkbox', 'sort', 'title', 'width', 'fixed', 'align', 'header-align', 'footer-align'];
13131
13325
  VxeUI.hooks.add('tableCustomModule', {
13132
13326
  setupTable($xeTable) {
13133
13327
  const { reactData, internalData } = $xeTable;
@@ -13141,14 +13335,15 @@ VxeUI.hooks.add('tableCustomModule', {
13141
13335
  const customOpts = computeCustomOpts.value;
13142
13336
  const { mode, placement, popupOptions } = customOpts;
13143
13337
  const showSimple = !(mode === 'modal' || mode === 'drawer');
13144
- const { transfer, maxHeight } = popupOptions || {};
13338
+ const { transfer, minWidth, maxWidth, maxHeight } = popupOptions || {};
13145
13339
  const customSimpleMode = computeCustomSimpleMode.value;
13146
13340
  const showCustomSimpleOutside = customSimpleMode === 'outside';
13147
13341
  const bodyEl = document.documentElement;
13148
13342
  let wrapperEl = refElem.value;
13149
13343
  let popupTop = 0;
13150
13344
  let popupMaxHeight = 0;
13151
- const popupStys = {};
13345
+ const defPupStys = {};
13346
+ const panePupStys = {};
13152
13347
  if ($xeGantt) {
13153
13348
  const { refGanttContainerElem } = $xeGantt.getRefMaps();
13154
13349
  const ganttContainerElem = refGanttContainerElem.value;
@@ -13181,24 +13376,41 @@ VxeUI.hooks.add('tableCustomModule', {
13181
13376
  }
13182
13377
  if (!placement || !(['left', 'right', 'bottom-left', 'bottom-right'].includes(placement))) {
13183
13378
  if (popupTop) {
13184
- popupStys.top = toCssUnit(popupTop);
13379
+ defPupStys.top = toCssUnit(popupTop);
13185
13380
  }
13186
13381
  }
13187
13382
  if (showSimple && transfer) {
13188
13383
  if (placement === 'bottom-left' || placement === 'bottom-right') {
13189
- popupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
13384
+ defPupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
13190
13385
  }
13191
13386
  if (placement === 'top-left' || placement === 'bottom-left') {
13192
- popupStys.left = toCssUnit(tableRect.left);
13387
+ defPupStys.left = toCssUnit(tableRect.left);
13193
13388
  }
13194
13389
  else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
13195
- popupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
13390
+ defPupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
13196
13391
  }
13197
13392
  }
13393
+ // 同步表格的css变量到弹窗中
13394
+ const bodyComputeStyle = getComputedStyle(bodyEl);
13395
+ const tableComputeStyle = getComputedStyle(wrapperEl);
13396
+ customColumnCssKeys.forEach(key => {
13397
+ const currCssKey = `--vxe-ui-vxe-table-custom-column-${key}-${key === 'title' ? 'min-' : ''}width`;
13398
+ const currCssVal = tableComputeStyle.getPropertyValue(currCssKey);
13399
+ if (currCssVal && currCssVal !== bodyComputeStyle.getPropertyValue(currCssKey)) {
13400
+ panePupStys[currCssKey] = currCssVal;
13401
+ }
13402
+ });
13403
+ if (minWidth) {
13404
+ defPupStys['--vxe-ui-vxe-table-custom-default-min-width'] = toCssUnit(minWidth);
13405
+ }
13406
+ if (maxWidth) {
13407
+ defPupStys['--vxe-ui-vxe-table-custom-default-max-width'] = toCssUnit(maxWidth);
13408
+ }
13198
13409
  if (popupMxHeight) {
13199
- popupStys.maxHeight = toCssUnit(popupMxHeight);
13410
+ defPupStys.maxHeight = toCssUnit(popupMxHeight);
13200
13411
  }
13201
- customStore.popupStyle = popupStys;
13412
+ customStore.defPopupStyle = defPupStys;
13413
+ customStore.panePopupStyle = panePupStys;
13202
13414
  customStore.maxHeight = popupMxHeight;
13203
13415
  return nextTick();
13204
13416
  };
@@ -13247,6 +13459,9 @@ VxeUI.hooks.add('tableCustomModule', {
13247
13459
  column.renderFixed = column.fixed;
13248
13460
  column.renderVisible = column.visible;
13249
13461
  column.renderResizeWidth = column.renderWidth;
13462
+ column.renderAlign = column.align;
13463
+ column.renderHeaderAlign = column.headerAlign;
13464
+ column.renderFooterAlign = column.footerAlign;
13250
13465
  sortMaps[colid] = column.renderSortNumber;
13251
13466
  fixedMaps[colid] = column.fixed;
13252
13467
  visibleMaps[colid] = column.visible;
@@ -13278,8 +13493,17 @@ VxeUI.hooks.add('tableCustomModule', {
13278
13493
  const saveCustom = (isDirectly) => {
13279
13494
  const { customColumnList, aggHandleFields, rowGroupList } = reactData;
13280
13495
  const customOpts = computeCustomOpts.value;
13281
- const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts;
13282
- if (!isDirectly) {
13496
+ const { allowVisible, allowSort, allowFixed, allowResizable, allowAlign, allowHeaderAlign, allowFooterAlign, allowGroup, allowValues } = customOpts;
13497
+ if (isDirectly) {
13498
+ XEUtils.eachTree(customColumnList, (column) => {
13499
+ if (allowResizable) {
13500
+ if (column.renderVisible && (!column.children || !column.children.length)) {
13501
+ column.resizeWidth = Math.max(0, XEUtils.toNumber(column.renderWidth));
13502
+ }
13503
+ }
13504
+ });
13505
+ }
13506
+ else {
13283
13507
  XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
13284
13508
  if (parentColumn) {
13285
13509
  // 更新子列信息
@@ -13305,6 +13529,15 @@ VxeUI.hooks.add('tableCustomModule', {
13305
13529
  if (allowVisible) {
13306
13530
  column.visible = column.renderVisible;
13307
13531
  }
13532
+ if (allowAlign) {
13533
+ column.align = column.renderAlign;
13534
+ }
13535
+ if (allowHeaderAlign) {
13536
+ column.headerAlign = column.renderHeaderAlign;
13537
+ }
13538
+ if (allowFooterAlign) {
13539
+ column.footerAlign = column.renderFooterAlign;
13540
+ }
13308
13541
  if (allowGroup && allowValues) {
13309
13542
  column.aggFunc = column.renderAggFn;
13310
13543
  }
@@ -13335,7 +13568,7 @@ VxeUI.hooks.add('tableCustomModule', {
13335
13568
  const { customColumnList, customStore } = reactData;
13336
13569
  const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore;
13337
13570
  const customOpts = computeCustomOpts.value;
13338
- const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts;
13571
+ const { allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues } = customOpts;
13339
13572
  XEUtils.eachTree(customColumnList, column => {
13340
13573
  const colid = column.getKey();
13341
13574
  const visible = !!oldVisibleMaps[colid];
@@ -13354,6 +13587,15 @@ VxeUI.hooks.add('tableCustomModule', {
13354
13587
  if (allowResizable) {
13355
13588
  column.renderResizeWidth = column.renderWidth;
13356
13589
  }
13590
+ if (allowAlign) {
13591
+ column.align = column.renderAlign;
13592
+ }
13593
+ if (allowHeaderAlign) {
13594
+ column.headerAlign = column.renderHeaderAlign;
13595
+ }
13596
+ if (allowFooterAlign) {
13597
+ column.footerAlign = column.renderFooterAlign;
13598
+ }
13357
13599
  }, { children: 'children' });
13358
13600
  return nextTick();
13359
13601
  };
@@ -13416,7 +13658,10 @@ VxeUI.hooks.add('tableCustomModule', {
13416
13658
  resizable: options === true,
13417
13659
  fixed: options === true,
13418
13660
  sort: options === true,
13419
- aggFunc: options === true
13661
+ aggFunc: options === true,
13662
+ align: options === true,
13663
+ headerAlign: options === true,
13664
+ footerAlign: options === true
13420
13665
  }, options);
13421
13666
  const allCols = [];
13422
13667
  XEUtils.eachTree(collectColumn, (column) => {
@@ -13425,6 +13670,7 @@ VxeUI.hooks.add('tableCustomModule', {
13425
13670
  }
13426
13671
  if (opts.fixed) {
13427
13672
  column.fixed = column.defaultFixed;
13673
+ column.renderFixed = column.defaultFixed;
13428
13674
  }
13429
13675
  if (opts.sort) {
13430
13676
  column.renderSortNumber = column.sortNumber;
@@ -13433,6 +13679,18 @@ VxeUI.hooks.add('tableCustomModule', {
13433
13679
  if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
13434
13680
  column.visible = column.defaultVisible;
13435
13681
  }
13682
+ if (opts.align) {
13683
+ column.align = column.defaultAlign;
13684
+ column.renderAlign = column.defaultAlign;
13685
+ }
13686
+ if (opts.headerAlign) {
13687
+ column.headerAlign = column.defaultHeaderAlign;
13688
+ column.renderHeaderAlign = column.defaultHeaderAlign;
13689
+ }
13690
+ if (opts.footerAlign) {
13691
+ column.footerAlign = column.defaultFooterAlign;
13692
+ column.renderFooterAlign = column.defaultFooterAlign;
13693
+ }
13436
13694
  if (opts.aggFunc) {
13437
13695
  column.aggFunc = column.defaultAggFunc;
13438
13696
  column.renderAggFn = column.defaultAggFunc;
@@ -15765,9 +16023,6 @@ var VxeTableComponent = defineVxeComponent({
15765
16023
  internalData.currKeyField = keyField;
15766
16024
  internalData.isCurrDeepKey = hasDeepKey(keyField);
15767
16025
  };
15768
- const hangleStorageDefaultValue = (value, isAll) => {
15769
- return XEUtils.isBoolean(value) ? value : isAll;
15770
- };
15771
16026
  const getNextSortOrder = (column) => {
15772
16027
  const sortOpts = computeSortOpts.value;
15773
16028
  const { orders = [] } = sortOpts;
@@ -16423,19 +16678,18 @@ var VxeTableComponent = defineVxeComponent({
16423
16678
  const handleCustomRestore = (storeData) => {
16424
16679
  const { aggregateConfig, rowGroupConfig } = props;
16425
16680
  const { collectColumn } = internalData;
16426
- const customOpts = computeCustomOpts.value;
16427
- const { storage, storeOptions } = customOpts;
16428
- const isAllCustom = storage === true;
16429
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
16430
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
16431
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
16432
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
16433
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
16434
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
16435
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
16436
- let { resizableData, sortData, visibleData, fixedData, aggGroupData, aggFuncData } = storeData;
16681
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
16682
+ let { alignData, headerAlignData, footerAlignData, resizableData, sortData, visibleData, fixedData, aggGroupData, aggFuncData } = storeData;
16437
16683
  // 处理还原
16438
- if ((isCustomResizable && resizableData) || (isCustomSort && sortData) || (isCustomVisible && visibleData) || (isCustomFixed && fixedData) || (isCustomAggGroup && aggGroupData) || (isCustomAggFunc && aggFuncData)) {
16684
+ if ((isCustomAlign && alignData) ||
16685
+ (isCustomHeaderAlign && headerAlignData) ||
16686
+ (isCustomFooterAlign && footerAlignData) ||
16687
+ (isCustomResizable && resizableData) ||
16688
+ (isCustomSort && sortData) ||
16689
+ (isCustomVisible && visibleData) ||
16690
+ (isCustomFixed && fixedData) ||
16691
+ (isCustomAggGroup && aggGroupData) ||
16692
+ (isCustomAggFunc && aggFuncData)) {
16439
16693
  const sortColMaps = {};
16440
16694
  if (isCustomSort && sortData) {
16441
16695
  // 转换兼容老版本数据,即将废弃兼容
@@ -16518,16 +16772,19 @@ var VxeTableComponent = defineVxeComponent({
16518
16772
  const { customConfig } = props;
16519
16773
  const tableId = computeTableId.value;
16520
16774
  const customOpts = computeCustomOpts.value;
16521
- const { storage, restoreStore, storeOptions } = customOpts;
16522
- const isAllCustom = storage === true;
16523
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
16524
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
16525
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
16526
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
16527
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
16528
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
16529
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
16530
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort || isCustomAggGroup || isCustomAggFunc)) {
16775
+ const { storage, restoreStore } = customOpts;
16776
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
16777
+ if (storage &&
16778
+ (customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
16779
+ (isCustomAlign ||
16780
+ isCustomHeaderAlign ||
16781
+ isCustomFooterAlign ||
16782
+ isCustomResizable ||
16783
+ isCustomVisible ||
16784
+ isCustomFixed ||
16785
+ isCustomSort ||
16786
+ isCustomAggGroup ||
16787
+ isCustomAggFunc)) {
16531
16788
  if (!tableId) {
16532
16789
  errLog$2('vxe.error.reqProp', ['id']);
16533
16790
  return;
@@ -19153,8 +19410,9 @@ var VxeTableComponent = defineVxeComponent({
19153
19410
  const result = [];
19154
19411
  const columnIndex = $xeTable.getColumnIndex(treeNodeColumn);
19155
19412
  const $columnIndex = $xeTable.getVMColumnIndex(treeNodeColumn);
19413
+ const _columnIndex = $xeTable.getVTColumnIndex(treeNodeColumn);
19156
19414
  const { handleGetRowId } = createHandleGetRowId($xeTable);
19157
- let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, row })) : rows;
19415
+ let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, _columnIndex, row })) : rows;
19158
19416
  if (accordion) {
19159
19417
  validRows = validRows.length ? [validRows[validRows.length - 1]] : [];
19160
19418
  // 同一级只能展开一个
@@ -22911,6 +23169,9 @@ var VxeTableComponent = defineVxeComponent({
22911
23169
  if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
22912
23170
  column.visible = column.defaultVisible;
22913
23171
  }
23172
+ column.align = column.defaultAlign;
23173
+ column.headerAlign = column.defaultHeaderAlign;
23174
+ column.footerAlign = column.defaultFooterAlign;
22914
23175
  column.aggFunc = column.defaultAggFunc;
22915
23176
  column.renderAggFn = column.defaultAggFunc;
22916
23177
  column.renderResizeWidth = column.renderWidth;
@@ -22952,15 +23213,11 @@ var VxeTableComponent = defineVxeComponent({
22952
23213
  const customOpts = computeCustomOpts.value;
22953
23214
  const { isRowGroupStatus, rowGroupList } = reactData;
22954
23215
  const { fullColumnFieldData, collectColumn } = internalData;
22955
- const { storage, checkMethod, storeOptions } = customOpts;
22956
- const isAllCustom = storage === true;
22957
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
22958
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
22959
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
22960
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
22961
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
22962
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
22963
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
23216
+ const { storage, checkMethod } = customOpts;
23217
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
23218
+ const alignData = {};
23219
+ const headerAlignData = {};
23220
+ const footerAlignData = {};
22964
23221
  const resizableData = {};
22965
23222
  const sortData = [];
22966
23223
  const visibleData = {};
@@ -22968,6 +23225,9 @@ var VxeTableComponent = defineVxeComponent({
22968
23225
  const aggGroupData = {};
22969
23226
  const aggFuncData = {};
22970
23227
  const storeData = {
23228
+ alignData: undefined,
23229
+ headerAlignData: undefined,
23230
+ footerAlignData: undefined,
22971
23231
  resizableData: undefined,
22972
23232
  sortData: undefined,
22973
23233
  visibleData: undefined,
@@ -22981,6 +23241,9 @@ var VxeTableComponent = defineVxeComponent({
22981
23241
  }
22982
23242
  return storeData;
22983
23243
  }
23244
+ let hasAlign = 0;
23245
+ let hasHeaderAlign = 0;
23246
+ let hasFooterAlign = 0;
22984
23247
  let hasResizable = 0;
22985
23248
  let hasSort = 0;
22986
23249
  let hasFixed = 0;
@@ -23021,6 +23284,18 @@ var VxeTableComponent = defineVxeComponent({
23021
23284
  fixedData[colKey] = column.fixed;
23022
23285
  }
23023
23286
  }
23287
+ if (isCustomAlign && column.align) {
23288
+ hasAlign = 1;
23289
+ alignData[colKey] = column.align;
23290
+ }
23291
+ if (isCustomHeaderAlign && column.headerAlign) {
23292
+ hasHeaderAlign = 1;
23293
+ headerAlignData[colKey] = column.headerAlign;
23294
+ }
23295
+ if (isCustomFooterAlign && column.footerAlign) {
23296
+ hasFooterAlign = 1;
23297
+ footerAlignData[colKey] = column.footerAlign;
23298
+ }
23024
23299
  if (isCustomResizable && column.resizeWidth) {
23025
23300
  hasResizable = 1;
23026
23301
  resizableData[colKey] = column.renderWidth;
@@ -23040,6 +23315,15 @@ var VxeTableComponent = defineVxeComponent({
23040
23315
  aggFuncData[colKey] = column.aggFunc;
23041
23316
  }
23042
23317
  });
23318
+ if (hasAlign) {
23319
+ storeData.alignData = alignData;
23320
+ }
23321
+ if (hasHeaderAlign) {
23322
+ storeData.headerAlignData = headerAlignData;
23323
+ }
23324
+ if (hasFooterAlign) {
23325
+ storeData.footerAlignData = footerAlignData;
23326
+ }
23043
23327
  if (hasResizable) {
23044
23328
  storeData.resizableData = resizableData;
23045
23329
  }
@@ -24919,26 +25203,32 @@ var VxeTableComponent = defineVxeComponent({
24919
25203
  const { customConfig } = props;
24920
25204
  const tableId = computeTableId.value;
24921
25205
  const customOpts = computeCustomOpts.value;
24922
- const { updateStore, storage, storeOptions } = customOpts;
24923
- const isAllCustom = storage === true;
24924
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
24925
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
24926
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
24927
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
24928
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
24929
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
24930
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
25206
+ const { updateStore, storage } = customOpts;
25207
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
24931
25208
  if (type !== 'reset') {
24932
25209
  // fix:修复拖动列宽,重置按钮无法点击的问题
24933
25210
  reactData.isCustomStatus = true;
24934
25211
  }
24935
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort || isCustomAggGroup || isCustomAggFunc)) {
25212
+ if (storage &&
25213
+ (customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
25214
+ (isCustomAlign ||
25215
+ isCustomHeaderAlign ||
25216
+ isCustomFooterAlign ||
25217
+ isCustomResizable ||
25218
+ isCustomVisible ||
25219
+ isCustomFixed ||
25220
+ isCustomSort ||
25221
+ isCustomAggGroup ||
25222
+ isCustomAggFunc)) {
24936
25223
  if (!tableId) {
24937
25224
  errLog$2('vxe.error.reqProp', ['id']);
24938
25225
  return nextTick();
24939
25226
  }
24940
25227
  const storeData = type === 'reset'
24941
25228
  ? {
25229
+ alignData: {},
25230
+ headerAlignData: {},
25231
+ footerAlignData: {},
24942
25232
  resizableData: {},
24943
25233
  sortData: [],
24944
25234
  visibleData: {},
@@ -32098,10 +32388,16 @@ var zhCN = {
32098
32388
  colResizable: '列宽(像素)',
32099
32389
  colVisible: '是否显示',
32100
32390
  colFixed: '冻结列',
32101
- colFixedMax: '冻结列(最多 {0} 列)',
32102
- fixedLeft: '左侧',
32103
- fixedUnset: '不设置',
32104
- fixedRight: '右侧',
32391
+ colFixedMax: '冻结列({0}',
32392
+ colAlign: '对齐方式',
32393
+ colHeadAlign: '表头对齐方式',
32394
+ colFootAlign: '表尾对齐方式',
32395
+ fixedLeft: '左',
32396
+ fixedUnset: '无',
32397
+ fixedRight: '右',
32398
+ alignLeft: '左',
32399
+ alignCenter: '中',
32400
+ alignRight: '右',
32105
32401
  moveUp: '上移',
32106
32402
  moveDn: '下移',
32107
32403
  putTop: '置顶',
@@ -32109,7 +32405,10 @@ var zhCN = {
32109
32405
  moveUpTitle: '点击向上移动',
32110
32406
  moveDnTitle: '点击向下移动',
32111
32407
  putTopTitle: '点击置顶',
32112
- putBottomTitle: '点击置尾'
32408
+ putBottomTitle: '点击置尾',
32409
+ anLeftTitle: '左对齐',
32410
+ anCenterTitle: '居中',
32411
+ anRightTitle: '右对齐'
32113
32412
  }
32114
32413
  },
32115
32414
  import: {