vxe-table 3.21.21 → 3.21.23

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.1782656027274.ttf → iconfont.1783046294821.ttf} +0 -0
  2. package/es/iconfont.1783046294821.woff +0 -0
  3. package/es/iconfont.1783046294821.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 +16 -3
  7. package/es/locale/lang/de-DE.js +16 -3
  8. package/es/locale/lang/en-US.js +20 -7
  9. package/es/locale/lang/es-ES.js +16 -3
  10. package/es/locale/lang/fr-FR.js +16 -3
  11. package/es/locale/lang/hu-HU.js +16 -3
  12. package/es/locale/lang/hy-AM.js +16 -3
  13. package/es/locale/lang/id-ID.js +16 -3
  14. package/es/locale/lang/it-IT.js +15 -2
  15. package/es/locale/lang/ja-JP.js +16 -3
  16. package/es/locale/lang/ko-KR.js +16 -3
  17. package/es/locale/lang/ms-MY.js +16 -3
  18. package/es/locale/lang/nb-NO.js +16 -3
  19. package/es/locale/lang/pt-BR.js +16 -3
  20. package/es/locale/lang/ru-RU.js +16 -3
  21. package/es/locale/lang/th-TH.js +16 -3
  22. package/es/locale/lang/ug-CN.js +16 -3
  23. package/es/locale/lang/uk-UA.js +16 -3
  24. package/es/locale/lang/uz-UZ.js +16 -3
  25. package/es/locale/lang/vi-VN.js +15 -2
  26. package/es/locale/lang/zh-CHT.js +18 -5
  27. package/es/locale/lang/zh-CN.js +18 -5
  28. package/es/style.css +1 -1
  29. package/es/style.min.css +1 -1
  30. package/es/table/module/custom/mixin.js +115 -38
  31. package/es/table/module/custom/panel.js +492 -312
  32. package/es/table/module/edit/mixin.js +12 -6
  33. package/es/table/src/columnInfo.js +13 -7
  34. package/es/table/src/methods.js +105 -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.1782656027274.ttf → iconfont.1783046294821.ttf} +0 -0
  43. package/lib/iconfont.1783046294821.woff +0 -0
  44. package/lib/iconfont.1783046294821.woff2 +0 -0
  45. package/lib/index.css +1 -1
  46. package/lib/index.min.css +1 -1
  47. package/lib/index.umd.js +612 -226
  48. package/lib/index.umd.min.js +1 -1
  49. package/lib/locale/lang/ar-EG.js +16 -3
  50. package/lib/locale/lang/ar-EG.min.js +1 -1
  51. package/lib/locale/lang/ar-EG.umd.js +16 -3
  52. package/lib/locale/lang/de-DE.js +16 -3
  53. package/lib/locale/lang/de-DE.min.js +1 -1
  54. package/lib/locale/lang/de-DE.umd.js +16 -3
  55. package/lib/locale/lang/en-US.js +20 -7
  56. package/lib/locale/lang/en-US.min.js +1 -1
  57. package/lib/locale/lang/en-US.umd.js +20 -7
  58. package/lib/locale/lang/es-ES.js +16 -3
  59. package/lib/locale/lang/es-ES.min.js +1 -1
  60. package/lib/locale/lang/es-ES.umd.js +16 -3
  61. package/lib/locale/lang/fr-FR.js +16 -3
  62. package/lib/locale/lang/fr-FR.min.js +1 -1
  63. package/lib/locale/lang/fr-FR.umd.js +16 -3
  64. package/lib/locale/lang/hu-HU.js +16 -3
  65. package/lib/locale/lang/hu-HU.min.js +1 -1
  66. package/lib/locale/lang/hu-HU.umd.js +16 -3
  67. package/lib/locale/lang/hy-AM.js +16 -3
  68. package/lib/locale/lang/hy-AM.min.js +1 -1
  69. package/lib/locale/lang/hy-AM.umd.js +16 -3
  70. package/lib/locale/lang/id-ID.js +16 -3
  71. package/lib/locale/lang/id-ID.min.js +1 -1
  72. package/lib/locale/lang/id-ID.umd.js +16 -3
  73. package/lib/locale/lang/it-IT.js +15 -2
  74. package/lib/locale/lang/it-IT.min.js +1 -1
  75. package/lib/locale/lang/it-IT.umd.js +15 -2
  76. package/lib/locale/lang/ja-JP.js +16 -3
  77. package/lib/locale/lang/ja-JP.min.js +1 -1
  78. package/lib/locale/lang/ja-JP.umd.js +16 -3
  79. package/lib/locale/lang/ko-KR.js +16 -3
  80. package/lib/locale/lang/ko-KR.min.js +1 -1
  81. package/lib/locale/lang/ko-KR.umd.js +16 -3
  82. package/lib/locale/lang/ms-MY.js +16 -3
  83. package/lib/locale/lang/ms-MY.min.js +1 -1
  84. package/lib/locale/lang/ms-MY.umd.js +16 -3
  85. package/lib/locale/lang/nb-NO.js +16 -3
  86. package/lib/locale/lang/nb-NO.min.js +1 -1
  87. package/lib/locale/lang/nb-NO.umd.js +16 -3
  88. package/lib/locale/lang/pt-BR.js +16 -3
  89. package/lib/locale/lang/pt-BR.min.js +1 -1
  90. package/lib/locale/lang/pt-BR.umd.js +16 -3
  91. package/lib/locale/lang/ru-RU.js +16 -3
  92. package/lib/locale/lang/ru-RU.min.js +1 -1
  93. package/lib/locale/lang/ru-RU.umd.js +16 -3
  94. package/lib/locale/lang/th-TH.js +16 -3
  95. package/lib/locale/lang/th-TH.min.js +1 -1
  96. package/lib/locale/lang/th-TH.umd.js +16 -3
  97. package/lib/locale/lang/ug-CN.js +16 -3
  98. package/lib/locale/lang/ug-CN.min.js +1 -1
  99. package/lib/locale/lang/ug-CN.umd.js +16 -3
  100. package/lib/locale/lang/uk-UA.js +16 -3
  101. package/lib/locale/lang/uk-UA.min.js +1 -1
  102. package/lib/locale/lang/uk-UA.umd.js +16 -3
  103. package/lib/locale/lang/uz-UZ.js +16 -3
  104. package/lib/locale/lang/uz-UZ.min.js +1 -1
  105. package/lib/locale/lang/uz-UZ.umd.js +16 -3
  106. package/lib/locale/lang/vi-VN.js +15 -2
  107. package/lib/locale/lang/vi-VN.min.js +1 -1
  108. package/lib/locale/lang/vi-VN.umd.js +15 -2
  109. package/lib/locale/lang/zh-CHT.js +18 -5
  110. package/lib/locale/lang/zh-CHT.min.js +1 -1
  111. package/lib/locale/lang/zh-CHT.umd.js +18 -5
  112. package/lib/locale/lang/zh-CN.js +18 -5
  113. package/lib/locale/lang/zh-CN.min.js +1 -1
  114. package/lib/locale/lang/zh-CN.umd.js +18 -5
  115. package/lib/style.css +1 -1
  116. package/lib/style.min.css +1 -1
  117. package/lib/table/module/custom/mixin.js +121 -35
  118. package/lib/table/module/custom/mixin.min.js +1 -1
  119. package/lib/table/module/custom/panel.js +383 -158
  120. package/lib/table/module/custom/panel.min.js +1 -1
  121. package/lib/table/module/edit/mixin.js +12 -6
  122. package/lib/table/src/columnInfo.js +16 -6
  123. package/lib/table/src/columnInfo.min.js +1 -1
  124. package/lib/table/src/methods.js +11 -10
  125. package/lib/table/src/methods.min.js +1 -1
  126. package/lib/table/src/util.js +35 -1
  127. package/lib/table/src/util.min.js +1 -1
  128. package/lib/table/style/style.css +96 -49
  129. package/lib/table/style/style.min.css +1 -1
  130. package/lib/ui/index.js +16 -4
  131. package/lib/ui/index.min.js +1 -1
  132. package/lib/ui/src/log.js +1 -1
  133. package/lib/ui/src/log.min.js +1 -1
  134. package/lib/vxe-table/style/style.css +96 -49
  135. package/lib/vxe-table/style/style.min.css +1 -1
  136. package/package.json +2 -2
  137. package/packages/locale/lang/ar-EG.ts +16 -3
  138. package/packages/locale/lang/de-DE.ts +16 -3
  139. package/packages/locale/lang/en-US.ts +20 -7
  140. package/packages/locale/lang/es-ES.ts +16 -3
  141. package/packages/locale/lang/fr-FR.ts +16 -3
  142. package/packages/locale/lang/hu-HU.ts +16 -3
  143. package/packages/locale/lang/hy-AM.ts +16 -3
  144. package/packages/locale/lang/id-ID.ts +16 -3
  145. package/packages/locale/lang/it-IT.ts +15 -2
  146. package/packages/locale/lang/ja-JP.ts +16 -3
  147. package/packages/locale/lang/ko-KR.ts +16 -3
  148. package/packages/locale/lang/ms-MY.ts +16 -3
  149. package/packages/locale/lang/nb-NO.ts +16 -3
  150. package/packages/locale/lang/pt-BR.ts +16 -3
  151. package/packages/locale/lang/ru-RU.ts +16 -3
  152. package/packages/locale/lang/th-TH.ts +16 -3
  153. package/packages/locale/lang/ug-CN.ts +16 -3
  154. package/packages/locale/lang/uk-UA.ts +16 -3
  155. package/packages/locale/lang/uz-UZ.ts +16 -3
  156. package/packages/locale/lang/vi-VN.ts +15 -2
  157. package/packages/locale/lang/zh-CHT.ts +18 -5
  158. package/packages/locale/lang/zh-CN.ts +18 -5
  159. package/packages/table/module/custom/mixin.ts +115 -38
  160. package/packages/table/module/custom/panel.ts +545 -307
  161. package/packages/table/module/edit/mixin.ts +18 -6
  162. package/packages/table/src/columnInfo.ts +13 -7
  163. package/packages/table/src/methods.ts +120 -61
  164. package/packages/table/src/table.ts +6 -6
  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 +13 -1
  173. package/es/iconfont.1782656027274.woff +0 -0
  174. package/es/iconfont.1782656027274.woff2 +0 -0
  175. package/lib/iconfont.1782656027274.woff +0 -0
  176. package/lib/iconfont.1782656027274.woff2 +0 -0
@@ -528,7 +528,8 @@ export default {
528
528
  * @param {*} records
529
529
  */
530
530
  _insert(records) {
531
- return handleInsertRowAt(this, records, null);
531
+ const $xeTable = this;
532
+ return handleInsertRowAt($xeTable, records, null);
532
533
  },
533
534
  /**
534
535
  * 往表格指定行中插入临时数据
@@ -538,19 +539,24 @@ export default {
538
539
  * @returns
539
540
  */
540
541
  _insertAt(records, targetRowOrRowid) {
541
- return handleInsertRowAt(this, records, targetRowOrRowid);
542
+ const $xeTable = this;
543
+ return handleInsertRowAt($xeTable, records, targetRowOrRowid);
542
544
  },
543
545
  _insertNextAt(records, targetRowOrRowid) {
544
- return handleInsertRowAt(this, records, targetRowOrRowid, true);
546
+ const $xeTable = this;
547
+ return handleInsertRowAt($xeTable, records, targetRowOrRowid, true);
545
548
  },
546
549
  _insertChild(records, parentRowOrParentId) {
547
- return handleInsertChildRowAt(this, records, parentRowOrParentId, null);
550
+ const $xeTable = this;
551
+ return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, null);
548
552
  },
549
553
  _insertChildAt(records, parentRowOrParentId, targetRowOrRowid) {
550
- return handleInsertChildRowAt(this, records, parentRowOrParentId, targetRowOrRowid);
554
+ const $xeTable = this;
555
+ return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid);
551
556
  },
552
557
  _insertChildNextAt(records, parentRowOrParentId, targetRowOrRowid) {
553
- return handleInsertChildRowAt(this, records, parentRowOrParentId, targetRowOrRowid, true);
558
+ const $xeTable = this;
559
+ return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid, true);
554
560
  },
555
561
  /**
556
562
  * 删除指定行数据
@@ -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;
@@ -2892,12 +2892,16 @@ function handleTooltip($xeTable, evnt, tipOpts, type, tdEl, overflowElem, tipEle
2892
2892
  // 如果为 null 使用默认逻辑
2893
2893
  if (XEUtils.eqNull(customContent)) {
2894
2894
  isShow = isOver;
2895
+ content = cellText;
2895
2896
  }
2896
2897
  else if (customContent !== '' && customContent !== false) {
2897
2898
  // 如果为 '' | false 则不显示
2898
2899
  isShow = true;
2900
+ content = customContent;
2901
+ }
2902
+ else {
2903
+ content = cellText;
2899
2904
  }
2900
- content = cellText;
2901
2905
  }
2902
2906
  if (isShow && content) {
2903
2907
  const tipContent = formatText(content);
@@ -6393,15 +6397,19 @@ const tableMethods = {
6393
6397
  const { customConfig } = props;
6394
6398
  const tableId = $xeTable.computeTableId;
6395
6399
  const customOpts = $xeTable.computeCustomOpts;
6396
- const { storage, restoreStore, storeOptions } = customOpts;
6397
- const isAllCustom = storage === true;
6398
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
6399
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
6400
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
6401
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
6402
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
6403
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
6404
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomAggGroup || isCustomSort)) {
6400
+ const { storage, restoreStore } = customOpts;
6401
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
6402
+ if (storage &&
6403
+ (customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
6404
+ (isCustomAlign ||
6405
+ isCustomHeaderAlign ||
6406
+ isCustomFooterAlign ||
6407
+ isCustomResizable ||
6408
+ isCustomVisible ||
6409
+ isCustomFixed ||
6410
+ isCustomSort ||
6411
+ isCustomAggGroup ||
6412
+ isCustomAggFunc)) {
6405
6413
  if (!tableId) {
6406
6414
  errLog('vxe.error.reqProp', ['id']);
6407
6415
  return;
@@ -6446,6 +6454,9 @@ const tableMethods = {
6446
6454
  if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
6447
6455
  column.visible = column.defaultVisible;
6448
6456
  }
6457
+ column.align = column.defaultAlign;
6458
+ column.headerAlign = column.defaultHeaderAlign;
6459
+ column.footerAlign = column.defaultFooterAlign;
6449
6460
  column.aggFunc = column.defaultAggFunc;
6450
6461
  column.renderAggFn = column.defaultAggFunc;
6451
6462
  column.renderResizeWidth = column.renderWidth;
@@ -6491,15 +6502,11 @@ const tableMethods = {
6491
6502
  const customOpts = $xeTable.computeCustomOpts;
6492
6503
  const { isRowGroupStatus, rowGroupList } = reactData;
6493
6504
  const { fullColumnFieldData, collectColumn } = internalData;
6494
- const { storage, checkMethod, storeOptions } = customOpts;
6495
- const isAllCustom = storage === true;
6496
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
6497
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
6498
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
6499
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
6500
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
6501
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
6502
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
6505
+ const { storage, checkMethod } = customOpts;
6506
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
6507
+ const alignData = {};
6508
+ const headerAlignData = {};
6509
+ const footerAlignData = {};
6503
6510
  const resizableData = {};
6504
6511
  const sortData = [];
6505
6512
  const visibleData = {};
@@ -6507,6 +6514,9 @@ const tableMethods = {
6507
6514
  const aggGroupData = {};
6508
6515
  const aggFuncData = {};
6509
6516
  const storeData = {
6517
+ alignData: undefined,
6518
+ headerAlignData: undefined,
6519
+ footerAlignData: undefined,
6510
6520
  resizableData: undefined,
6511
6521
  sortData: undefined,
6512
6522
  visibleData: undefined,
@@ -6520,6 +6530,9 @@ const tableMethods = {
6520
6530
  }
6521
6531
  return storeData;
6522
6532
  }
6533
+ let hasAlign = 0;
6534
+ let hasHeaderAlign = 0;
6535
+ let hasFooterAlign = 0;
6523
6536
  let hasResizable = 0;
6524
6537
  let hasSort = 0;
6525
6538
  let hasFixed = 0;
@@ -6560,6 +6573,18 @@ const tableMethods = {
6560
6573
  fixedData[colKey] = column.fixed;
6561
6574
  }
6562
6575
  }
6576
+ if (isCustomAlign && column.align) {
6577
+ hasAlign = 1;
6578
+ alignData[colKey] = column.align;
6579
+ }
6580
+ if (isCustomHeaderAlign && column.headerAlign) {
6581
+ hasHeaderAlign = 1;
6582
+ headerAlignData[colKey] = column.headerAlign;
6583
+ }
6584
+ if (isCustomFooterAlign && column.footerAlign) {
6585
+ hasFooterAlign = 1;
6586
+ footerAlignData[colKey] = column.footerAlign;
6587
+ }
6563
6588
  if (isCustomResizable && column.resizeWidth) {
6564
6589
  hasResizable = 1;
6565
6590
  resizableData[colKey] = column.renderWidth;
@@ -6579,6 +6604,15 @@ const tableMethods = {
6579
6604
  aggFuncData[colKey] = column.aggFunc;
6580
6605
  }
6581
6606
  });
6607
+ if (hasAlign) {
6608
+ storeData.alignData = alignData;
6609
+ }
6610
+ if (hasHeaderAlign) {
6611
+ storeData.headerAlignData = headerAlignData;
6612
+ }
6613
+ if (hasFooterAlign) {
6614
+ storeData.footerAlignData = footerAlignData;
6615
+ }
6582
6616
  if (hasResizable) {
6583
6617
  storeData.resizableData = resizableData;
6584
6618
  }
@@ -6615,33 +6649,40 @@ const tableMethods = {
6615
6649
  const { customConfig } = props;
6616
6650
  const tableId = $xeTable.computeTableId;
6617
6651
  const customOpts = $xeTable.computeCustomOpts;
6618
- const { updateStore, storage, storeOptions } = customOpts;
6619
- const isAllCustom = storage === true;
6620
- const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
6621
- const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
6622
- const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
6623
- const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
6624
- const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
6625
- const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
6626
- const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
6652
+ const { updateStore, storage } = customOpts;
6653
+ const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
6627
6654
  if (type !== 'reset') {
6655
+ // fix:修复拖动列宽,重置按钮无法点击的问题
6628
6656
  reactData.isCustomStatus = true;
6629
6657
  }
6630
- if (storage && (customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort || isCustomAggGroup || isCustomAggFunc)) {
6658
+ if (storage &&
6659
+ (customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
6660
+ (isCustomAlign ||
6661
+ isCustomHeaderAlign ||
6662
+ isCustomFooterAlign ||
6663
+ isCustomResizable ||
6664
+ isCustomVisible ||
6665
+ isCustomFixed ||
6666
+ isCustomSort ||
6667
+ isCustomAggGroup ||
6668
+ isCustomAggFunc)) {
6631
6669
  if (!tableId) {
6632
6670
  errLog('vxe.error.reqProp', ['id']);
6633
- return this.$nextTick();
6671
+ return $xeTable.$nextTick();
6634
6672
  }
6635
6673
  const storeData = type === 'reset'
6636
6674
  ? {
6675
+ alignData: {},
6676
+ headerAlignData: {},
6677
+ footerAlignData: {},
6637
6678
  resizableData: {},
6638
- sortData: {},
6679
+ sortData: [],
6639
6680
  visibleData: {},
6640
6681
  fixedData: {},
6641
6682
  aggGroupData: {},
6642
6683
  aggFuncData: {}
6643
6684
  }
6644
- : this.getCustomStoreData();
6685
+ : $xeTable.getCustomStoreData();
6645
6686
  if (updateStore) {
6646
6687
  return updateStore({
6647
6688
  $table: $xeTable,
@@ -6654,13 +6695,17 @@ const tableMethods = {
6654
6695
  setCustomStorageMap(tableId, type === 'reset' ? null : storeData);
6655
6696
  }
6656
6697
  }
6657
- return this.$nextTick();
6698
+ return $xeTable.$nextTick();
6658
6699
  },
6659
6700
  handleUpdateDataQueue() {
6660
- this.upDataFlag++;
6701
+ const $xeTable = this;
6702
+ const reactData = $xeTable;
6703
+ reactData.upDataFlag++;
6661
6704
  },
6662
6705
  handleRefreshColumnQueue() {
6663
- this.reColumnFlag++;
6706
+ const $xeTable = this;
6707
+ const reactData = $xeTable;
6708
+ reactData.reColumnFlag++;
6664
6709
  },
6665
6710
  handleFilterOptions(column) {
6666
6711
  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
+ }