vxe-table 3.21.22 → 3.21.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 (176) hide show
  1. package/es/{iconfont.1782890276645.ttf → iconfont.1783331230583.ttf} +0 -0
  2. package/es/iconfont.1783331230583.woff +0 -0
  3. package/es/iconfont.1783331230583.woff2 +0 -0
  4. package/es/index.css +1 -1
  5. package/es/index.min.css +1 -1
  6. package/es/locale/lang/ar-EG.js +12 -3
  7. package/es/locale/lang/de-DE.js +12 -3
  8. package/es/locale/lang/en-US.js +16 -7
  9. package/es/locale/lang/es-ES.js +12 -3
  10. package/es/locale/lang/fr-FR.js +12 -3
  11. package/es/locale/lang/hu-HU.js +12 -3
  12. package/es/locale/lang/hy-AM.js +12 -3
  13. package/es/locale/lang/id-ID.js +12 -3
  14. package/es/locale/lang/it-IT.js +11 -2
  15. package/es/locale/lang/ja-JP.js +12 -3
  16. package/es/locale/lang/ko-KR.js +12 -3
  17. package/es/locale/lang/ms-MY.js +12 -3
  18. package/es/locale/lang/nb-NO.js +12 -3
  19. package/es/locale/lang/pt-BR.js +12 -3
  20. package/es/locale/lang/ru-RU.js +12 -3
  21. package/es/locale/lang/th-TH.js +12 -3
  22. package/es/locale/lang/ug-CN.js +12 -3
  23. package/es/locale/lang/uk-UA.js +12 -3
  24. package/es/locale/lang/uz-UZ.js +12 -3
  25. package/es/locale/lang/vi-VN.js +11 -2
  26. package/es/locale/lang/zh-CHT.js +14 -5
  27. package/es/locale/lang/zh-CN.js +14 -5
  28. package/es/style.css +1 -1
  29. package/es/style.min.css +1 -1
  30. package/es/table/module/custom/mixin.js +84 -13
  31. package/es/table/module/custom/panel.js +485 -312
  32. package/es/table/src/cell.js +2 -2
  33. package/es/table/src/columnInfo.js +13 -7
  34. package/es/table/src/methods.js +102 -60
  35. package/es/table/src/util.js +31 -1
  36. package/es/table/style.css +96 -49
  37. package/es/table/style.min.css +1 -1
  38. package/es/ui/index.js +16 -4
  39. package/es/ui/src/log.js +1 -1
  40. package/es/vxe-table/style.css +96 -49
  41. package/es/vxe-table/style.min.css +1 -1
  42. package/lib/{iconfont.1782890276645.ttf → iconfont.1783331230583.ttf} +0 -0
  43. package/lib/iconfont.1783331230583.woff +0 -0
  44. package/lib/iconfont.1783331230583.woff2 +0 -0
  45. package/lib/index.css +1 -1
  46. package/lib/index.min.css +1 -1
  47. package/lib/index.umd.js +560 -196
  48. package/lib/index.umd.min.js +1 -1
  49. package/lib/locale/lang/ar-EG.js +12 -3
  50. package/lib/locale/lang/ar-EG.min.js +1 -1
  51. package/lib/locale/lang/ar-EG.umd.js +12 -3
  52. package/lib/locale/lang/de-DE.js +12 -3
  53. package/lib/locale/lang/de-DE.min.js +1 -1
  54. package/lib/locale/lang/de-DE.umd.js +12 -3
  55. package/lib/locale/lang/en-US.js +16 -7
  56. package/lib/locale/lang/en-US.min.js +1 -1
  57. package/lib/locale/lang/en-US.umd.js +16 -7
  58. package/lib/locale/lang/es-ES.js +12 -3
  59. package/lib/locale/lang/es-ES.min.js +1 -1
  60. package/lib/locale/lang/es-ES.umd.js +12 -3
  61. package/lib/locale/lang/fr-FR.js +12 -3
  62. package/lib/locale/lang/fr-FR.min.js +1 -1
  63. package/lib/locale/lang/fr-FR.umd.js +12 -3
  64. package/lib/locale/lang/hu-HU.js +12 -3
  65. package/lib/locale/lang/hu-HU.min.js +1 -1
  66. package/lib/locale/lang/hu-HU.umd.js +12 -3
  67. package/lib/locale/lang/hy-AM.js +12 -3
  68. package/lib/locale/lang/hy-AM.min.js +1 -1
  69. package/lib/locale/lang/hy-AM.umd.js +12 -3
  70. package/lib/locale/lang/id-ID.js +12 -3
  71. package/lib/locale/lang/id-ID.min.js +1 -1
  72. package/lib/locale/lang/id-ID.umd.js +12 -3
  73. package/lib/locale/lang/it-IT.js +11 -2
  74. package/lib/locale/lang/it-IT.min.js +1 -1
  75. package/lib/locale/lang/it-IT.umd.js +11 -2
  76. package/lib/locale/lang/ja-JP.js +12 -3
  77. package/lib/locale/lang/ja-JP.min.js +1 -1
  78. package/lib/locale/lang/ja-JP.umd.js +12 -3
  79. package/lib/locale/lang/ko-KR.js +12 -3
  80. package/lib/locale/lang/ko-KR.min.js +1 -1
  81. package/lib/locale/lang/ko-KR.umd.js +12 -3
  82. package/lib/locale/lang/ms-MY.js +12 -3
  83. package/lib/locale/lang/ms-MY.min.js +1 -1
  84. package/lib/locale/lang/ms-MY.umd.js +12 -3
  85. package/lib/locale/lang/nb-NO.js +12 -3
  86. package/lib/locale/lang/nb-NO.min.js +1 -1
  87. package/lib/locale/lang/nb-NO.umd.js +12 -3
  88. package/lib/locale/lang/pt-BR.js +12 -3
  89. package/lib/locale/lang/pt-BR.min.js +1 -1
  90. package/lib/locale/lang/pt-BR.umd.js +12 -3
  91. package/lib/locale/lang/ru-RU.js +12 -3
  92. package/lib/locale/lang/ru-RU.min.js +1 -1
  93. package/lib/locale/lang/ru-RU.umd.js +12 -3
  94. package/lib/locale/lang/th-TH.js +12 -3
  95. package/lib/locale/lang/th-TH.min.js +1 -1
  96. package/lib/locale/lang/th-TH.umd.js +12 -3
  97. package/lib/locale/lang/ug-CN.js +12 -3
  98. package/lib/locale/lang/ug-CN.min.js +1 -1
  99. package/lib/locale/lang/ug-CN.umd.js +12 -3
  100. package/lib/locale/lang/uk-UA.js +12 -3
  101. package/lib/locale/lang/uk-UA.min.js +1 -1
  102. package/lib/locale/lang/uk-UA.umd.js +12 -3
  103. package/lib/locale/lang/uz-UZ.js +12 -3
  104. package/lib/locale/lang/uz-UZ.min.js +1 -1
  105. package/lib/locale/lang/uz-UZ.umd.js +12 -3
  106. package/lib/locale/lang/vi-VN.js +11 -2
  107. package/lib/locale/lang/vi-VN.min.js +1 -1
  108. package/lib/locale/lang/vi-VN.umd.js +11 -2
  109. package/lib/locale/lang/zh-CHT.js +14 -5
  110. package/lib/locale/lang/zh-CHT.min.js +1 -1
  111. package/lib/locale/lang/zh-CHT.umd.js +14 -5
  112. package/lib/locale/lang/zh-CN.js +14 -5
  113. package/lib/locale/lang/zh-CN.min.js +1 -1
  114. package/lib/locale/lang/zh-CN.umd.js +14 -5
  115. package/lib/style.css +1 -1
  116. package/lib/style.min.css +1 -1
  117. package/lib/table/module/custom/mixin.js +91 -11
  118. package/lib/table/module/custom/mixin.min.js +1 -1
  119. package/lib/table/module/custom/panel.js +376 -158
  120. package/lib/table/module/custom/panel.min.js +1 -1
  121. package/lib/table/src/cell.js +2 -1
  122. package/lib/table/src/cell.min.js +1 -1
  123. package/lib/table/src/columnInfo.js +16 -6
  124. package/lib/table/src/columnInfo.min.js +1 -1
  125. package/lib/table/src/methods.js +10 -9
  126. package/lib/table/src/methods.min.js +1 -1
  127. package/lib/table/src/util.js +35 -1
  128. package/lib/table/src/util.min.js +1 -1
  129. package/lib/table/style/style.css +96 -49
  130. package/lib/table/style/style.min.css +1 -1
  131. package/lib/ui/index.js +16 -4
  132. package/lib/ui/index.min.js +1 -1
  133. package/lib/ui/src/log.js +1 -1
  134. package/lib/ui/src/log.min.js +1 -1
  135. package/lib/vxe-table/style/style.css +96 -49
  136. package/lib/vxe-table/style/style.min.css +1 -1
  137. package/package.json +2 -2
  138. package/packages/locale/lang/ar-EG.ts +12 -3
  139. package/packages/locale/lang/de-DE.ts +12 -3
  140. package/packages/locale/lang/en-US.ts +16 -7
  141. package/packages/locale/lang/es-ES.ts +12 -3
  142. package/packages/locale/lang/fr-FR.ts +12 -3
  143. package/packages/locale/lang/hu-HU.ts +12 -3
  144. package/packages/locale/lang/hy-AM.ts +12 -3
  145. package/packages/locale/lang/id-ID.ts +12 -3
  146. package/packages/locale/lang/it-IT.ts +11 -2
  147. package/packages/locale/lang/ja-JP.ts +12 -3
  148. package/packages/locale/lang/ko-KR.ts +12 -3
  149. package/packages/locale/lang/ms-MY.ts +12 -3
  150. package/packages/locale/lang/nb-NO.ts +12 -3
  151. package/packages/locale/lang/pt-BR.ts +12 -3
  152. package/packages/locale/lang/ru-RU.ts +12 -3
  153. package/packages/locale/lang/th-TH.ts +12 -3
  154. package/packages/locale/lang/ug-CN.ts +12 -3
  155. package/packages/locale/lang/uk-UA.ts +12 -3
  156. package/packages/locale/lang/uz-UZ.ts +12 -3
  157. package/packages/locale/lang/vi-VN.ts +11 -2
  158. package/packages/locale/lang/zh-CHT.ts +14 -5
  159. package/packages/locale/lang/zh-CN.ts +14 -5
  160. package/packages/table/module/custom/mixin.ts +85 -14
  161. package/packages/table/module/custom/panel.ts +538 -307
  162. package/packages/table/src/cell.ts +2 -2
  163. package/packages/table/src/columnInfo.ts +13 -7
  164. package/packages/table/src/methods.ts +118 -61
  165. package/packages/table/src/util.ts +34 -1
  166. package/packages/ui/index.ts +15 -3
  167. package/styles/components/icon.scss +29 -2
  168. package/styles/components/table-module/custom.scss +88 -67
  169. package/styles/icon/iconfont.ttf +0 -0
  170. package/styles/icon/iconfont.woff +0 -0
  171. package/styles/icon/iconfont.woff2 +0 -0
  172. package/styles/theme/base.scss +11 -0
  173. package/es/iconfont.1782890276645.woff +0 -0
  174. package/es/iconfont.1782890276645.woff2 +0 -0
  175. package/lib/iconfont.1782890276645.woff +0 -0
  176. package/lib/iconfont.1782890276645.woff2 +0 -0
@@ -533,7 +533,7 @@ export const Cell = {
533
533
  const treeOpts = $table.computeTreeOpts;
534
534
  const { row, column, level } = params;
535
535
  const { slots } = column;
536
- const { padding, indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
536
+ const { padding, indent, lazy, trigger, visibleMethod, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
537
537
  const childrenField = treeOpts.children || treeOpts.childrenField;
538
538
  const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
539
539
  const rowChilds = row[childrenField];
@@ -573,7 +573,7 @@ export const Cell = {
573
573
  }
574
574
  : undefined
575
575
  }, [
576
- showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild)
576
+ showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild) && (!visibleMethod || visibleMethod(params))
577
577
  ? [
578
578
  h('div', {
579
579
  class: 'vxe-cell--tree-btn',
@@ -13,7 +13,7 @@ export class ColumnInfo {
13
13
  const $xeGrid = $xeTable.$xeGrid;
14
14
  const $xeGantt = $xeTable.$xeGantt;
15
15
  const $xeGGWrapper = $xeGrid || $xeGantt;
16
- const { type, field, width, visible, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs;
16
+ const { type, field, width, visible, fixed, align, headerAlign, footerAlign, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs;
17
17
  const colId = colConfs.colId || XEUtils.uniqueId('col_');
18
18
  const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : null;
19
19
  const defaultVisible = XEUtils.isBoolean(visible) ? visible : true;
@@ -82,10 +82,10 @@ export class ColumnInfo {
82
82
  minWidth: colConfs.minWidth,
83
83
  maxWidth: colConfs.maxWidth,
84
84
  resizable: colConfs.resizable,
85
- fixed: colConfs.fixed,
86
- align: colConfs.align,
87
- headerAlign: colConfs.headerAlign,
88
- footerAlign: colConfs.footerAlign,
85
+ fixed,
86
+ align,
87
+ headerAlign,
88
+ footerAlign,
89
89
  showOverflow: colConfs.showOverflow,
90
90
  showHeaderOverflow: colConfs.showHeaderOverflow,
91
91
  showFooterOverflow: colConfs.showFooterOverflow,
@@ -126,7 +126,7 @@ export class ColumnInfo {
126
126
  titleHelp: colConfs.titleHelp,
127
127
  titlePrefix: colConfs.titlePrefix,
128
128
  titleSuffix: colConfs.titleSuffix,
129
- aggFunc: colConfs.aggFunc,
129
+ aggFunc,
130
130
  copyMethod: colConfs.copyMethod,
131
131
  cutMethod: colConfs.cutMethod,
132
132
  pasteMethod: colConfs.pasteMethod,
@@ -140,7 +140,10 @@ export class ColumnInfo {
140
140
  defaultParentId: null,
141
141
  halfVisible: false,
142
142
  defaultVisible: defaultVisible,
143
- defaultFixed: colConfs.fixed,
143
+ defaultFixed: fixed,
144
+ defaultAlign: align,
145
+ defaultHeaderAlign: headerAlign,
146
+ defaultFooterAlign: footerAlign,
144
147
  defaultAggFunc: colConfs.aggFunc,
145
148
  checked: false,
146
149
  halfChecked: false,
@@ -160,6 +163,9 @@ export class ColumnInfo {
160
163
  renderAggFn: '',
161
164
  renderAggDigits: null,
162
165
  renderAggFormat: null,
166
+ renderAlign: '',
167
+ renderHeaderAlign: '',
168
+ renderFooterAlign: '',
163
169
  renderFixed: '',
164
170
  renderVisible: false,
165
171
  renderWidth: defaultRenderWidth,
@@ -3,7 +3,7 @@ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollLe
3
3
  import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
4
4
  import { VxeUI } from '../../ui';
5
5
  import Cell from './cell';
6
- import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn, getRowMaxHeight } from './util';
6
+ import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig } from './util';
7
7
  import { getSlotVNs } from '../../ui/src/vn';
8
8
  import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime';
9
9
  import { createComponentLog } from '../../ui/src/log';
@@ -31,9 +31,6 @@ function eqCellValue(newRow, oldRow, field) {
31
31
  }
32
32
  return { newValue: val1, oldValue: val2, result };
33
33
  }
34
- function hangleStorageDefaultValue(value, isAll) {
35
- return XEUtils.isBoolean(value) ? value : isAll;
36
- }
37
34
  function getNextSortOrder($xeTable, column) {
38
35
  const sortOpts = $xeTable.computeSortOpts;
39
36
  const { orders = [] } = sortOpts;
@@ -127,19 +124,18 @@ function handleCustomRestore($xeTable, storeData) {
127
124
  const internalData = $xeTable;
128
125
  const { aggregateConfig, rowGroupConfig } = props;
129
126
  const { collectColumn } = internalData;
130
- const customOpts = $xeTable.computeCustomOpts;
131
- const { storage, storeOptions } = customOpts;
132
- const isAllCustom = storage === true;
133
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
134
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
135
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
136
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
137
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
138
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
139
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
140
- let { resizableData, sortData, visibleData, fixedData, aggGroupData, aggFuncData } = storeData;
127
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
128
+ let { alignData, headerAlignData, footerAlignData, resizableData, sortData, visibleData, fixedData, aggGroupData, aggFuncData } = storeData;
141
129
  // 处理还原
142
- if ((isCustomResizable && resizableData) || (isCustomSort && sortData) || (isCustomVisible && visibleData) || (isCustomFixed && fixedData) || (isCustomAggGroup && aggGroupData) || (isCustomAggFunc && aggFuncData)) {
130
+ if ((isCustomAlign && alignData) ||
131
+ (isCustomHeaderAlign && headerAlignData) ||
132
+ (isCustomFooterAlign && footerAlignData) ||
133
+ (isCustomResizable && resizableData) ||
134
+ (isCustomSort && sortData) ||
135
+ (isCustomVisible && visibleData) ||
136
+ (isCustomFixed && fixedData) ||
137
+ (isCustomAggGroup && aggGroupData) ||
138
+ (isCustomAggFunc && aggFuncData)) {
143
139
  const sortColMaps = {};
144
140
  if (isCustomSort && sortData) {
145
141
  // 转换兼容老版本数据,即将废弃兼容
@@ -223,15 +219,19 @@ function restoreCustomStorage($xeTable) {
223
219
  const { customConfig } = props;
224
220
  const tableId = $xeTable.computeTableId;
225
221
  const customOpts = $xeTable.computeCustomOpts;
226
- const { storage, restoreStore, storeOptions } = customOpts;
227
- const isAllCustom = storage === true;
228
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
229
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
230
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
231
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
232
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
233
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
234
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort || isCustomAggFunc)) {
222
+ const { storage, restoreStore } = customOpts;
223
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
224
+ if (storage &&
225
+ (customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
226
+ (isCustomAlign ||
227
+ isCustomHeaderAlign ||
228
+ isCustomFooterAlign ||
229
+ isCustomResizable ||
230
+ isCustomVisible ||
231
+ isCustomFixed ||
232
+ isCustomSort ||
233
+ isCustomAggGroup ||
234
+ isCustomAggFunc)) {
235
235
  if (!tableId) {
236
236
  errLog('vxe.error.reqProp', ['id']);
237
237
  return;
@@ -446,8 +446,9 @@ function handleBaseTreeExpand($xeTable, rows, expanded) {
446
446
  const result = [];
447
447
  const columnIndex = $xeTable.getColumnIndex(treeNodeColumn);
448
448
  const $columnIndex = $xeTable.getVMColumnIndex(treeNodeColumn);
449
+ const _columnIndex = $xeTable.getVTColumnIndex(treeNodeColumn);
449
450
  const { handleGetRowId } = createHandleGetRowId($xeTable);
450
- let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, row })) : rows;
451
+ let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, _columnIndex, row })) : rows;
451
452
  if (accordion) {
452
453
  validRows = validRows.length ? [validRows[validRows.length - 1]] : [];
453
454
  // 同一级只能展开一个
@@ -6397,15 +6398,19 @@ const tableMethods = {
6397
6398
  const { customConfig } = props;
6398
6399
  const tableId = $xeTable.computeTableId;
6399
6400
  const customOpts = $xeTable.computeCustomOpts;
6400
- const { storage, restoreStore, storeOptions } = customOpts;
6401
- const isAllCustom = storage === true;
6402
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
6403
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
6404
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
6405
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
6406
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
6407
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
6408
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomAggGroup || isCustomSort)) {
6401
+ const { storage, restoreStore } = customOpts;
6402
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
6403
+ if (storage &&
6404
+ (customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
6405
+ (isCustomAlign ||
6406
+ isCustomHeaderAlign ||
6407
+ isCustomFooterAlign ||
6408
+ isCustomResizable ||
6409
+ isCustomVisible ||
6410
+ isCustomFixed ||
6411
+ isCustomSort ||
6412
+ isCustomAggGroup ||
6413
+ isCustomAggFunc)) {
6409
6414
  if (!tableId) {
6410
6415
  errLog('vxe.error.reqProp', ['id']);
6411
6416
  return;
@@ -6450,6 +6455,9 @@ const tableMethods = {
6450
6455
  if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
6451
6456
  column.visible = column.defaultVisible;
6452
6457
  }
6458
+ column.align = column.defaultAlign;
6459
+ column.headerAlign = column.defaultHeaderAlign;
6460
+ column.footerAlign = column.defaultFooterAlign;
6453
6461
  column.aggFunc = column.defaultAggFunc;
6454
6462
  column.renderAggFn = column.defaultAggFunc;
6455
6463
  column.renderResizeWidth = column.renderWidth;
@@ -6495,15 +6503,11 @@ const tableMethods = {
6495
6503
  const customOpts = $xeTable.computeCustomOpts;
6496
6504
  const { isRowGroupStatus, rowGroupList } = reactData;
6497
6505
  const { fullColumnFieldData, collectColumn } = internalData;
6498
- const { storage, checkMethod, storeOptions } = customOpts;
6499
- const isAllCustom = storage === true;
6500
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
6501
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
6502
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
6503
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
6504
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
6505
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
6506
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
6506
+ const { storage, checkMethod } = customOpts;
6507
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
6508
+ const alignData = {};
6509
+ const headerAlignData = {};
6510
+ const footerAlignData = {};
6507
6511
  const resizableData = {};
6508
6512
  const sortData = [];
6509
6513
  const visibleData = {};
@@ -6511,6 +6515,9 @@ const tableMethods = {
6511
6515
  const aggGroupData = {};
6512
6516
  const aggFuncData = {};
6513
6517
  const storeData = {
6518
+ alignData: undefined,
6519
+ headerAlignData: undefined,
6520
+ footerAlignData: undefined,
6514
6521
  resizableData: undefined,
6515
6522
  sortData: undefined,
6516
6523
  visibleData: undefined,
@@ -6524,6 +6531,9 @@ const tableMethods = {
6524
6531
  }
6525
6532
  return storeData;
6526
6533
  }
6534
+ let hasAlign = 0;
6535
+ let hasHeaderAlign = 0;
6536
+ let hasFooterAlign = 0;
6527
6537
  let hasResizable = 0;
6528
6538
  let hasSort = 0;
6529
6539
  let hasFixed = 0;
@@ -6564,6 +6574,18 @@ const tableMethods = {
6564
6574
  fixedData[colKey] = column.fixed;
6565
6575
  }
6566
6576
  }
6577
+ if (isCustomAlign && column.align) {
6578
+ hasAlign = 1;
6579
+ alignData[colKey] = column.align;
6580
+ }
6581
+ if (isCustomHeaderAlign && column.headerAlign) {
6582
+ hasHeaderAlign = 1;
6583
+ headerAlignData[colKey] = column.headerAlign;
6584
+ }
6585
+ if (isCustomFooterAlign && column.footerAlign) {
6586
+ hasFooterAlign = 1;
6587
+ footerAlignData[colKey] = column.footerAlign;
6588
+ }
6567
6589
  if (isCustomResizable && column.resizeWidth) {
6568
6590
  hasResizable = 1;
6569
6591
  resizableData[colKey] = column.renderWidth;
@@ -6583,6 +6605,15 @@ const tableMethods = {
6583
6605
  aggFuncData[colKey] = column.aggFunc;
6584
6606
  }
6585
6607
  });
6608
+ if (hasAlign) {
6609
+ storeData.alignData = alignData;
6610
+ }
6611
+ if (hasHeaderAlign) {
6612
+ storeData.headerAlignData = headerAlignData;
6613
+ }
6614
+ if (hasFooterAlign) {
6615
+ storeData.footerAlignData = footerAlignData;
6616
+ }
6586
6617
  if (hasResizable) {
6587
6618
  storeData.resizableData = resizableData;
6588
6619
  }
@@ -6619,33 +6650,40 @@ const tableMethods = {
6619
6650
  const { customConfig } = props;
6620
6651
  const tableId = $xeTable.computeTableId;
6621
6652
  const customOpts = $xeTable.computeCustomOpts;
6622
- const { updateStore, storage, storeOptions } = customOpts;
6623
- const isAllCustom = storage === true;
6624
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
6625
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
6626
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
6627
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
6628
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
6629
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
6630
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
6653
+ const { updateStore, storage } = customOpts;
6654
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
6631
6655
  if (type !== 'reset') {
6656
+ // fix:修复拖动列宽,重置按钮无法点击的问题
6632
6657
  reactData.isCustomStatus = true;
6633
6658
  }
6634
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort || isCustomAggGroup || isCustomAggFunc)) {
6659
+ if (storage &&
6660
+ (customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
6661
+ (isCustomAlign ||
6662
+ isCustomHeaderAlign ||
6663
+ isCustomFooterAlign ||
6664
+ isCustomResizable ||
6665
+ isCustomVisible ||
6666
+ isCustomFixed ||
6667
+ isCustomSort ||
6668
+ isCustomAggGroup ||
6669
+ isCustomAggFunc)) {
6635
6670
  if (!tableId) {
6636
6671
  errLog('vxe.error.reqProp', ['id']);
6637
- return this.$nextTick();
6672
+ return $xeTable.$nextTick();
6638
6673
  }
6639
6674
  const storeData = type === 'reset'
6640
6675
  ? {
6676
+ alignData: {},
6677
+ headerAlignData: {},
6678
+ footerAlignData: {},
6641
6679
  resizableData: {},
6642
- sortData: {},
6680
+ sortData: [],
6643
6681
  visibleData: {},
6644
6682
  fixedData: {},
6645
6683
  aggGroupData: {},
6646
6684
  aggFuncData: {}
6647
6685
  }
6648
- : this.getCustomStoreData();
6686
+ : $xeTable.getCustomStoreData();
6649
6687
  if (updateStore) {
6650
6688
  return updateStore({
6651
6689
  $table: $xeTable,
@@ -6658,13 +6696,17 @@ const tableMethods = {
6658
6696
  setCustomStorageMap(tableId, type === 'reset' ? null : storeData);
6659
6697
  }
6660
6698
  }
6661
- return this.$nextTick();
6699
+ return $xeTable.$nextTick();
6662
6700
  },
6663
6701
  handleUpdateDataQueue() {
6664
- this.upDataFlag++;
6702
+ const $xeTable = this;
6703
+ const reactData = $xeTable;
6704
+ reactData.upDataFlag++;
6665
6705
  },
6666
6706
  handleRefreshColumnQueue() {
6667
- this.reColumnFlag++;
6707
+ const $xeTable = this;
6708
+ const reactData = $xeTable;
6709
+ reactData.reColumnFlag++;
6668
6710
  },
6669
6711
  handleFilterOptions(column) {
6670
6712
  const $xeTable = this;
@@ -219,7 +219,8 @@ export function createReactData() {
219
219
  activeWrapper: false,
220
220
  visible: false,
221
221
  maxHeight: null,
222
- popupStyle: {},
222
+ defPopupStyle: {},
223
+ panePopupStyle: {},
223
224
  oldSortMaps: {},
224
225
  oldFixedMaps: {},
225
226
  oldVisibleMaps: {}
@@ -1011,3 +1012,32 @@ export function colToVisible($xeTable, isForce, column, row) {
1011
1012
  }
1012
1013
  return Promise.resolve();
1013
1014
  }
1015
+ function hangleBolleanDefaultValue(currVal, defVal) {
1016
+ return XEUtils.isBoolean(currVal) ? currVal : defVal;
1017
+ }
1018
+ export function handleCustomStoreConfig($xeTable) {
1019
+ const customOpts = $xeTable.computeCustomOpts;
1020
+ const { storage, storeOptions } = customOpts;
1021
+ const isAllCustom = storage === true;
1022
+ const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
1023
+ const isCustomAlign = hangleBolleanDefaultValue(storageOpts.align, isAllCustom);
1024
+ const isCustomHeaderAlign = hangleBolleanDefaultValue(storageOpts.headerAlign, isAllCustom);
1025
+ const isCustomFooterAlign = hangleBolleanDefaultValue(storageOpts.footerAlign, isAllCustom);
1026
+ const isCustomResizable = hangleBolleanDefaultValue(storageOpts.resizable, isAllCustom);
1027
+ const isCustomVisible = hangleBolleanDefaultValue(storageOpts.visible, isAllCustom);
1028
+ const isCustomFixed = hangleBolleanDefaultValue(storageOpts.fixed, isAllCustom);
1029
+ const isCustomSort = hangleBolleanDefaultValue(storageOpts.sort, isAllCustom);
1030
+ const isCustomAggGroup = hangleBolleanDefaultValue(storageOpts.aggGroup, isAllCustom);
1031
+ const isCustomAggFunc = hangleBolleanDefaultValue(storageOpts.aggFunc, isAllCustom);
1032
+ return {
1033
+ isCustomAlign,
1034
+ isCustomHeaderAlign,
1035
+ isCustomFooterAlign,
1036
+ isCustomResizable,
1037
+ isCustomVisible,
1038
+ isCustomFixed,
1039
+ isCustomSort,
1040
+ isCustomAggGroup,
1041
+ isCustomAggFunc
1042
+ };
1043
+ }