vxe-table 3.14.0-beta.9 → 3.14.1

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 (209) hide show
  1. package/es/grid/src/grid.js +62 -42
  2. package/es/locale/lang/ar-EG.js +7 -1
  3. package/es/locale/lang/de-DE.js +7 -1
  4. package/es/locale/lang/en-US.js +7 -1
  5. package/es/locale/lang/es-ES.js +7 -1
  6. package/es/locale/lang/fr-FR.js +7 -1
  7. package/es/locale/lang/hu-HU.js +7 -1
  8. package/es/locale/lang/hy-AM.js +7 -1
  9. package/es/locale/lang/id-ID.js +7 -1
  10. package/es/locale/lang/it-IT.js +7 -1
  11. package/es/locale/lang/ja-JP.js +7 -1
  12. package/es/locale/lang/ko-KR.js +7 -1
  13. package/es/locale/lang/nb-NO.js +7 -1
  14. package/es/locale/lang/pt-BR.js +7 -1
  15. package/es/locale/lang/ru-RU.js +7 -1
  16. package/es/locale/lang/th-TH.js +7 -1
  17. package/es/locale/lang/ug-CN.js +7 -1
  18. package/es/locale/lang/uk-UA.js +7 -1
  19. package/es/locale/lang/vi-VN.js +7 -1
  20. package/es/locale/lang/zh-CHT.js +7 -1
  21. package/es/locale/lang/zh-CN.js +7 -1
  22. package/es/style.css +1 -1
  23. package/es/table/module/custom/mixin.js +4 -2
  24. package/es/table/module/custom/panel.js +24 -23
  25. package/es/table/module/edit/mixin.js +103 -68
  26. package/es/table/module/export/export-panel.js +5 -4
  27. package/es/table/module/export/import-panel.js +8 -7
  28. package/es/table/module/export/mixin.js +30 -27
  29. package/es/table/module/filter/panel.js +21 -10
  30. package/es/table/module/keyboard/mixin.js +141 -41
  31. package/es/table/module/menu/mixin.js +6 -3
  32. package/es/table/module/menu/panel.js +7 -7
  33. package/es/table/module/validator/mixin.js +2 -5
  34. package/es/table/render/index.js +2 -2
  35. package/es/table/src/body.js +43 -25
  36. package/es/table/src/cell.js +27 -22
  37. package/es/table/src/column.js +11 -9
  38. package/es/table/src/columnInfo.js +6 -6
  39. package/es/table/src/footer.js +12 -7
  40. package/es/table/src/group.js +6 -5
  41. package/es/table/src/header.js +15 -9
  42. package/es/table/src/methods.js +1047 -971
  43. package/es/table/src/props.js +4 -0
  44. package/es/table/src/table.js +100 -64
  45. package/es/table/src/util.js +55 -20
  46. package/es/toolbar/src/toolbar.js +3 -3
  47. package/es/ui/index.js +2 -1
  48. package/es/ui/src/log.js +1 -1
  49. package/helper/vetur/attributes.json +1 -1
  50. package/helper/vetur/tags.json +1 -1
  51. package/lib/grid/src/grid.js +69 -59
  52. package/lib/grid/src/grid.min.js +1 -1
  53. package/lib/index.umd.js +2006 -1686
  54. package/lib/index.umd.min.js +1 -1
  55. package/lib/locale/lang/ar-EG.js +7 -1
  56. package/lib/locale/lang/ar-EG.min.js +1 -1
  57. package/lib/locale/lang/de-DE.js +7 -1
  58. package/lib/locale/lang/de-DE.min.js +1 -1
  59. package/lib/locale/lang/en-US.js +7 -1
  60. package/lib/locale/lang/en-US.min.js +1 -1
  61. package/lib/locale/lang/en-US.umd.js +7 -1
  62. package/lib/locale/lang/es-ES.js +7 -1
  63. package/lib/locale/lang/es-ES.min.js +1 -1
  64. package/lib/locale/lang/es-ES.umd.js +7 -1
  65. package/lib/locale/lang/fr-FR.js +7 -1
  66. package/lib/locale/lang/fr-FR.min.js +1 -1
  67. package/lib/locale/lang/hu-HU.js +7 -1
  68. package/lib/locale/lang/hu-HU.min.js +1 -1
  69. package/lib/locale/lang/hu-HU.umd.js +7 -1
  70. package/lib/locale/lang/hy-AM.js +7 -1
  71. package/lib/locale/lang/hy-AM.min.js +1 -1
  72. package/lib/locale/lang/id-ID.js +7 -1
  73. package/lib/locale/lang/id-ID.min.js +1 -1
  74. package/lib/locale/lang/it-IT.js +7 -1
  75. package/lib/locale/lang/it-IT.min.js +1 -1
  76. package/lib/locale/lang/ja-JP.js +7 -1
  77. package/lib/locale/lang/ja-JP.min.js +1 -1
  78. package/lib/locale/lang/ja-JP.umd.js +7 -1
  79. package/lib/locale/lang/ko-KR.js +7 -1
  80. package/lib/locale/lang/ko-KR.min.js +1 -1
  81. package/lib/locale/lang/ko-KR.umd.js +7 -1
  82. package/lib/locale/lang/nb-NO.js +7 -1
  83. package/lib/locale/lang/nb-NO.min.js +1 -1
  84. package/lib/locale/lang/pt-BR.js +7 -1
  85. package/lib/locale/lang/pt-BR.min.js +1 -1
  86. package/lib/locale/lang/pt-BR.umd.js +7 -1
  87. package/lib/locale/lang/ru-RU.js +7 -1
  88. package/lib/locale/lang/ru-RU.min.js +1 -1
  89. package/lib/locale/lang/ru-RU.umd.js +7 -1
  90. package/lib/locale/lang/th-TH.js +7 -1
  91. package/lib/locale/lang/th-TH.min.js +1 -1
  92. package/lib/locale/lang/ug-CN.js +7 -1
  93. package/lib/locale/lang/ug-CN.min.js +1 -1
  94. package/lib/locale/lang/uk-UA.js +7 -1
  95. package/lib/locale/lang/uk-UA.min.js +1 -1
  96. package/lib/locale/lang/uk-UA.umd.js +7 -1
  97. package/lib/locale/lang/vi-VN.js +7 -1
  98. package/lib/locale/lang/vi-VN.min.js +1 -1
  99. package/lib/locale/lang/zh-CHT.js +7 -1
  100. package/lib/locale/lang/zh-CHT.min.js +1 -1
  101. package/lib/locale/lang/zh-CHT.umd.js +7 -1
  102. package/lib/locale/lang/zh-CN.js +7 -1
  103. package/lib/locale/lang/zh-CN.min.js +1 -1
  104. package/lib/locale/lang/zh-CN.umd.js +7 -1
  105. package/lib/style.css +1 -1
  106. package/lib/table/module/custom/mixin.js +5 -3
  107. package/lib/table/module/custom/mixin.min.js +1 -1
  108. package/lib/table/module/custom/panel.js +22 -29
  109. package/lib/table/module/custom/panel.min.js +1 -1
  110. package/lib/table/module/edit/mixin.js +119 -105
  111. package/lib/table/module/edit/mixin.min.js +1 -1
  112. package/lib/table/module/export/export-panel.js +5 -4
  113. package/lib/table/module/export/export-panel.min.js +1 -1
  114. package/lib/table/module/export/import-panel.js +8 -7
  115. package/lib/table/module/export/import-panel.min.js +1 -1
  116. package/lib/table/module/export/mixin.js +35 -34
  117. package/lib/table/module/export/mixin.min.js +1 -1
  118. package/lib/table/module/filter/panel.js +16 -16
  119. package/lib/table/module/filter/panel.min.js +1 -1
  120. package/lib/table/module/keyboard/mixin.js +149 -47
  121. package/lib/table/module/keyboard/mixin.min.js +1 -1
  122. package/lib/table/module/menu/mixin.js +6 -3
  123. package/lib/table/module/menu/mixin.min.js +1 -1
  124. package/lib/table/module/menu/panel.js +7 -7
  125. package/lib/table/module/menu/panel.min.js +1 -1
  126. package/lib/table/module/validator/mixin.js +4 -10
  127. package/lib/table/module/validator/mixin.min.js +1 -1
  128. package/lib/table/render/index.js +3 -2
  129. package/lib/table/render/index.min.js +1 -1
  130. package/lib/table/src/body.js +51 -25
  131. package/lib/table/src/body.min.js +1 -1
  132. package/lib/table/src/cell.js +39 -23
  133. package/lib/table/src/cell.min.js +1 -1
  134. package/lib/table/src/column.js +11 -9
  135. package/lib/table/src/column.min.js +1 -1
  136. package/lib/table/src/columnInfo.js +6 -6
  137. package/lib/table/src/columnInfo.min.js +1 -1
  138. package/lib/table/src/footer.js +12 -5
  139. package/lib/table/src/footer.min.js +1 -1
  140. package/lib/table/src/group.js +6 -5
  141. package/lib/table/src/group.min.js +1 -1
  142. package/lib/table/src/header.js +16 -8
  143. package/lib/table/src/header.min.js +1 -1
  144. package/lib/table/src/methods.js +1219 -1151
  145. package/lib/table/src/methods.min.js +1 -1
  146. package/lib/table/src/props.js +4 -0
  147. package/lib/table/src/props.min.js +1 -1
  148. package/lib/table/src/table.js +108 -67
  149. package/lib/table/src/table.min.js +1 -1
  150. package/lib/table/src/util.js +62 -21
  151. package/lib/table/src/util.min.js +1 -1
  152. package/lib/toolbar/src/toolbar.js +3 -3
  153. package/lib/ui/index.js +2 -1
  154. package/lib/ui/index.min.js +1 -1
  155. package/lib/ui/src/log.js +1 -1
  156. package/lib/ui/src/log.min.js +1 -1
  157. package/package.json +2 -2
  158. package/packages/grid/src/grid.ts +75 -51
  159. package/packages/locale/lang/ar-EG.ts +7 -1
  160. package/packages/locale/lang/de-DE.ts +7 -1
  161. package/packages/locale/lang/en-US.ts +7 -1
  162. package/packages/locale/lang/es-ES.ts +7 -1
  163. package/packages/locale/lang/fr-FR.ts +7 -1
  164. package/packages/locale/lang/hu-HU.ts +7 -1
  165. package/packages/locale/lang/hy-AM.ts +7 -1
  166. package/packages/locale/lang/id-ID.ts +7 -1
  167. package/packages/locale/lang/it-IT.ts +7 -1
  168. package/packages/locale/lang/ja-JP.ts +7 -1
  169. package/packages/locale/lang/ko-KR.ts +7 -1
  170. package/packages/locale/lang/nb-NO.ts +7 -1
  171. package/packages/locale/lang/pt-BR.ts +7 -1
  172. package/packages/locale/lang/ru-RU.ts +7 -1
  173. package/packages/locale/lang/th-TH.ts +7 -1
  174. package/packages/locale/lang/ug-CN.ts +7 -1
  175. package/packages/locale/lang/uk-UA.ts +7 -1
  176. package/packages/locale/lang/vi-VN.ts +7 -1
  177. package/packages/locale/lang/zh-CHT.ts +7 -1
  178. package/packages/locale/lang/zh-CN.ts +7 -1
  179. package/packages/table/module/custom/mixin.ts +6 -3
  180. package/packages/table/module/custom/panel.ts +42 -37
  181. package/packages/table/module/edit/mixin.ts +139 -95
  182. package/packages/table/module/export/export-panel.ts +8 -5
  183. package/packages/table/module/export/import-panel.ts +11 -7
  184. package/packages/table/module/export/mixin.ts +37 -32
  185. package/packages/table/module/filter/panel.ts +25 -10
  186. package/packages/table/module/keyboard/mixin.ts +155 -49
  187. package/packages/table/module/menu/mixin.ts +12 -6
  188. package/packages/table/module/menu/panel.ts +10 -7
  189. package/packages/table/module/validator/mixin.ts +3 -6
  190. package/packages/table/render/index.ts +2 -2
  191. package/packages/table/src/body.ts +43 -25
  192. package/packages/table/src/cell.ts +27 -22
  193. package/packages/table/src/column.ts +14 -10
  194. package/packages/table/src/columnInfo.ts +9 -6
  195. package/packages/table/src/footer.ts +12 -7
  196. package/packages/table/src/group.ts +9 -5
  197. package/packages/table/src/header.ts +16 -9
  198. package/packages/table/src/methods.ts +1174 -1027
  199. package/packages/table/src/props.ts +16 -12
  200. package/packages/table/src/table.ts +117 -70
  201. package/packages/table/src/util.ts +65 -23
  202. package/packages/toolbar/src/toolbar.ts +3 -3
  203. package/packages/ui/index.ts +1 -0
  204. /package/es/{iconfont.1741336976538.ttf → iconfont.1743045564244.ttf} +0 -0
  205. /package/es/{iconfont.1741336976538.woff → iconfont.1743045564244.woff} +0 -0
  206. /package/es/{iconfont.1741336976538.woff2 → iconfont.1743045564244.woff2} +0 -0
  207. /package/lib/{iconfont.1741336976538.ttf → iconfont.1743045564244.ttf} +0 -0
  208. /package/lib/{iconfont.1741336976538.woff → iconfont.1743045564244.woff} +0 -0
  209. /package/lib/{iconfont.1741336976538.woff2 → iconfont.1743045564244.woff2} +0 -0
@@ -1,7 +1,7 @@
1
1
  import XEUtils from 'xe-utils';
2
2
  import { VxeUI } from '../../ui';
3
3
  import { isEnableConf, getClass } from '../../ui/src/utils';
4
- import { getOffsetSize, calcTreeLine, mergeBodyMethod, getRowid } from './util';
4
+ import { getOffsetSize, calcTreeLine, mergeBodyMethod, getRowid, createHandleGetRowId } from './util';
5
5
  import { updateCellTitle } from '../../ui/src/dom';
6
6
  import { getSlotVNs } from '../../ui/src/vn';
7
7
  const { getI18n, renderer, renderEmptyElement } = VxeUI;
@@ -14,7 +14,7 @@ const isVMScrollProcess = ($xeTable) => {
14
14
  const { lastScrollTime, isDragResize } = tableReactData;
15
15
  return !!(isDragResize || (lastScrollTime && Date.now() < lastScrollTime + delayHover));
16
16
  };
17
- function renderLine(h, _vm, params, cellHeight) {
17
+ function renderLine(h, _vm, rowid, params, cellHeight) {
18
18
  const $xeTable = _vm.$parent;
19
19
  const tableProps = $xeTable;
20
20
  const tableInternalData = $xeTable;
@@ -27,7 +27,6 @@ function renderLine(h, _vm, params, cellHeight) {
27
27
  if (slots && slots.line) {
28
28
  return $xeTable.callSlot(slots.line, params, h);
29
29
  }
30
- const rowid = getRowid($xeTable, row);
31
30
  const rest = fullAllDataRowIdData[rowid];
32
31
  let rLevel = 0;
33
32
  let prevRow = null;
@@ -63,9 +62,10 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
63
62
  const tableProps = $xeTable;
64
63
  const tableReactData = $xeTable;
65
64
  const tableInternalData = $xeTable;
66
- const { fullAllDataRowIdData } = tableInternalData;
65
+ const $xeGrid = $xeTable.$xeGrid;
66
+ const { fullAllDataRowIdData, fullColumnIdData, visibleColumn } = tableInternalData;
67
67
  const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
68
- const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData;
68
+ const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData;
69
69
  const { afterFullData, scrollXStore, scrollYStore } = tableInternalData;
70
70
  const cellOpts = $xeTable.computeCellOpts;
71
71
  const validOpts = $xeTable.computeValidOpts;
@@ -81,19 +81,21 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
81
81
  const columnOpts = $xeTable.computeColumnOpts;
82
82
  const mouseOpts = $xeTable.computeMouseOpts;
83
83
  const areaOpts = $xeTable.computeAreaOpts;
84
+ const cellOffsetWidth = $xeTable.computeCellOffsetWidth;
84
85
  const { selectCellToRow } = areaOpts;
85
86
  const { type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column;
86
87
  const { verticalAlign: allVerticalAlign } = cellOpts;
87
88
  const { actived } = editStore;
88
- const rowRest = fullAllDataRowIdData[rowid];
89
+ const rowRest = fullAllDataRowIdData[rowid] || {};
89
90
  const colid = column.id;
91
+ const colRest = fullColumnIdData[colid] || {};
90
92
  const renderOpts = editRender || cellRender;
91
93
  const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
92
94
  const compCellClassName = compConf ? (compConf.tableCellClassName || compConf.cellClassName) : null;
93
95
  const compCellStyle = compConf ? (compConf.tableCellStyle || compConf.cellStyle) : '';
94
96
  const showAllTip = tooltipOpts.showAll;
95
- const columnIndex = $xeTable.getColumnIndex(column);
96
- const _columnIndex = $xeTable.getVTColumnIndex(column);
97
+ const columnIndex = colRest.index;
98
+ const _columnIndex = colRest._index;
97
99
  const isEdit = isEnableConf(editRender);
98
100
  const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
99
101
  let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
@@ -115,7 +117,7 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
115
117
  const tdAttrs = { colid };
116
118
  const cellParams = {
117
119
  $table: $xeTable,
118
- $grid: $xeTable.xegrid,
120
+ $grid: $xeGrid,
119
121
  isEdit: false,
120
122
  seq,
121
123
  rowid,
@@ -247,6 +249,18 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
247
249
  }
248
250
  }
249
251
  const tcStyle = {};
252
+ if (hasEllipsis && resizeWidthFlag) {
253
+ let tsColspan = tdAttrs.colspan || 0;
254
+ if (tsColspan > 1) {
255
+ for (let index = 1; index < tsColspan; index++) {
256
+ const nextColumn = visibleColumn[columnIndex + index];
257
+ if (nextColumn) {
258
+ tsColspan += nextColumn.renderWidth;
259
+ }
260
+ }
261
+ }
262
+ tcStyle.width = `${column.renderWidth - (cellOffsetWidth * tsColspan)}px`;
263
+ }
250
264
  if (scrollYLoad || hasEllipsis || isCsHeight || isRsHeight) {
251
265
  tcStyle.height = `${cellHeight}px`;
252
266
  }
@@ -267,7 +281,7 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
267
281
  }
268
282
  else {
269
283
  // 渲染单元格
270
- tdVNs.push(...renderLine(h, _vm, cellParams, cellHeight), h('div', {
284
+ tdVNs.push(...renderLine(h, _vm, rowid, cellParams, cellHeight), h('div', {
271
285
  key: 'tc',
272
286
  class: ['vxe-cell', {
273
287
  'c--title': showTitle,
@@ -388,8 +402,8 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
388
402
  const tableReactData = $xeTable;
389
403
  const tableInternalData = $xeTable;
390
404
  const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
391
- const { hasFixedColumn, treeExpandedMaps, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, isDragColMove, rowExpandHeightFlag } = tableReactData;
392
- const { fullAllDataRowIdData } = tableInternalData;
405
+ const { hasFixedColumn, treeExpandedFlag, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, isDragColMove, rowExpandHeightFlag } = tableReactData;
406
+ const { fullAllDataRowIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData;
393
407
  const checkboxOpts = $xeTable.computeCheckboxOpts;
394
408
  const radioOpts = $xeTable.computeRadioOpts;
395
409
  const treeOpts = $xeTable.computeTreeOpts;
@@ -400,11 +414,15 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
400
414
  const { transform, seqMode } = treeOpts;
401
415
  const childrenField = treeOpts.children || treeOpts.childrenField;
402
416
  const rows = [];
417
+ const { handleGetRowId } = createHandleGetRowId($xeTable);
403
418
  tableData.forEach((row, $rowIndex) => {
404
419
  const trOn = {};
420
+ const rowid = handleGetRowId(row);
421
+ const rowRest = fullAllDataRowIdData[rowid] || {};
405
422
  let rowIndex = $rowIndex;
406
- // 确保任何情况下 rowIndex 都精准指向真实 data 索引
407
- rowIndex = $xeTable.getRowIndex(row);
423
+ let rowLevel = 0;
424
+ let seq = -1;
425
+ let _rowIndex = -1;
408
426
  // 当前行事件
409
427
  if (rowOpts.isHover || highlightHoverRow) {
410
428
  trOn.mouseenter = (evnt) => {
@@ -420,11 +438,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
420
438
  $xeTable.clearHoverRow();
421
439
  };
422
440
  }
423
- const rowid = getRowid($xeTable, row);
424
- const rowRest = fullAllDataRowIdData[rowid];
425
- let rowLevel = 0;
426
- let seq = -1;
427
- let _rowIndex = 0;
428
441
  if (rowRest) {
429
442
  rowLevel = rowRest.level;
430
443
  if (treeConfig && transform && seqMode === 'increasing') {
@@ -433,11 +446,12 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
433
446
  else {
434
447
  seq = rowRest.seq;
435
448
  }
449
+ rowIndex = rowRest.index;
436
450
  _rowIndex = rowRest._index;
437
451
  }
438
452
  const params = { $table: $xeTable, seq, rowid, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex, _rowIndex };
439
453
  // 行是否被展开
440
- const isExpandRow = expandColumn && !!rowExpandedMaps[rowid];
454
+ const isExpandRow = expandColumn && !!rowExpandedFlag && !!rowExpandedMaps[rowid];
441
455
  // 树节点是否被展开
442
456
  let isExpandTree = false;
443
457
  let rowChildren = [];
@@ -448,7 +462,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
448
462
  }
449
463
  if (treeConfig && !scrollYLoad && !transform) {
450
464
  rowChildren = row[childrenField];
451
- isExpandTree = rowChildren && rowChildren.length && !!treeExpandedMaps[rowid];
465
+ isExpandTree = !!treeExpandedFlag && rowChildren && rowChildren.length > 0 && !!treeExpandedMaps[rowid];
452
466
  }
453
467
  // 拖拽行事件
454
468
  if (rowOpts.drag && (!treeConfig || transform)) {
@@ -467,7 +481,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
467
481
  'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
468
482
  'row--radio': radioOpts.highlight && selectRadioRow === row,
469
483
  'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
470
- 'row--pending': !!pendingRowMaps[rowid]
484
+ 'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid]
471
485
  },
472
486
  rowClassName ? (XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName) : ''
473
487
  ];
@@ -615,6 +629,7 @@ export default {
615
629
  const tableProps = $xeTable;
616
630
  const tableReactData = $xeTable;
617
631
  const tableInternalData = $xeTable;
632
+ const $xeGrid = $xeTable.$xeGrid;
618
633
  const { xID, $scopedSlots } = $xeTable;
619
634
  const { fixedColumn, fixedType, tableColumn } = props;
620
635
  const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
@@ -637,7 +652,7 @@ export default {
637
652
  isOptimizeMode = true;
638
653
  }
639
654
  }
640
- if (fixedType || !overflowX) {
655
+ if (!isColLoading && (fixedType || !overflowX)) {
641
656
  renderColumnList = visibleColumn;
642
657
  }
643
658
  if (fixedType) {
@@ -695,7 +710,7 @@ export default {
695
710
  }
696
711
  let emptyContent;
697
712
  if ($scopedSlots.empty) {
698
- emptyContent = $scopedSlots.empty.call(this, { $table: $xeTable, $grid: $xeTable.xegrid });
713
+ emptyContent = $scopedSlots.empty.call(this, { $table: $xeTable, $grid: $xeGrid });
699
714
  }
700
715
  else {
701
716
  const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null;
@@ -754,7 +769,10 @@ export default {
754
769
  attrs: {
755
770
  name: column.id
756
771
  },
757
- key: $columnIndex
772
+ key: $columnIndex,
773
+ style: {
774
+ width: `${column.renderWidth}px`
775
+ }
758
776
  });
759
777
  })),
760
778
  /**
@@ -304,7 +304,7 @@ function renderFooterHandle(h, params) {
304
304
  return Cell.renderDefaultFooter(h, params);
305
305
  }
306
306
  export const Cell = {
307
- createColumn($xetable, _vm) {
307
+ createColumn($xeTable, _vm) {
308
308
  const { type } = _vm;
309
309
  const renConfs = {
310
310
  renderHeader: renderHeaderHandle,
@@ -314,7 +314,7 @@ export const Cell = {
314
314
  if (type === 'expand') {
315
315
  renConfs.renderData = Cell.renderExpandData;
316
316
  }
317
- return createColumn($xetable, _vm, renConfs);
317
+ return createColumn($xeTable, _vm, renConfs);
318
318
  },
319
319
  /**
320
320
  * 列头标题
@@ -382,8 +382,8 @@ export const Cell = {
382
382
  const { $table, isHidden } = params;
383
383
  const tableReactData = $table;
384
384
  const tableInternalData = $table;
385
- const { treeExpandedMaps, treeExpandLazyLoadedMaps } = tableReactData;
386
- const { fullAllDataRowIdData } = tableInternalData;
385
+ const { treeExpandedFlag } = tableReactData;
386
+ const { fullAllDataRowIdData, treeExpandedMaps, treeExpandLazyLoadedMaps } = tableInternalData;
387
387
  const treeOpts = $table.computeTreeOpts;
388
388
  const { row, column, level } = params;
389
389
  const { slots } = column;
@@ -403,7 +403,7 @@ export const Cell = {
403
403
  }
404
404
  if (!isHidden) {
405
405
  const rowid = getRowid($table, row);
406
- isActive = !!treeExpandedMaps[rowid];
406
+ isActive = !!treeExpandedFlag && !!treeExpandedMaps[rowid];
407
407
  if (lazy) {
408
408
  const rest = fullAllDataRowIdData[rowid];
409
409
  isLazyLoading = !!treeExpandLazyLoadedMaps[rowid];
@@ -551,7 +551,8 @@ export const Cell = {
551
551
  const headerSlot = slots ? slots.header : null;
552
552
  const titleSlot = slots ? slots.title : null;
553
553
  const checkboxOpts = $table.computeCheckboxOpts;
554
- const headerTitle = column.getTitle();
554
+ const { checkStrictly, showHeader, headerTitle } = checkboxOpts;
555
+ const colTitle = column.getTitle();
555
556
  const ons = {};
556
557
  if (!isHidden) {
557
558
  ons.click = (evnt) => {
@@ -564,11 +565,11 @@ export const Cell = {
564
565
  if (headerSlot) {
565
566
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)));
566
567
  }
567
- if (checkboxOpts.checkStrictly ? !checkboxOpts.showHeader : checkboxOpts.showHeader === false) {
568
+ if (checkStrictly ? !showHeader : showHeader === false) {
568
569
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [
569
570
  h('span', {
570
571
  class: 'vxe-checkbox--label'
571
- }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)
572
+ }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : colTitle)
572
573
  ]));
573
574
  }
574
575
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [
@@ -579,18 +580,18 @@ export const Cell = {
579
580
  'is--indeterminate': isAllCheckboxIndeterminate
580
581
  }],
581
582
  attrs: {
582
- title: getI18n('vxe.table.allTitle')
583
+ title: XEUtils.eqNull(headerTitle) ? getI18n('vxe.table.allTitle') : `${headerTitle || ''}`
583
584
  },
584
585
  on: ons
585
586
  }, [
586
587
  h('span', {
587
588
  class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
588
589
  })
589
- ].concat(titleSlot || headerTitle
590
+ ].concat(titleSlot || colTitle
590
591
  ? [
591
592
  h('span', {
592
593
  class: 'vxe-checkbox--label'
593
- }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)
594
+ }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : colTitle)
594
595
  ]
595
596
  : []))
596
597
  ]));
@@ -599,8 +600,10 @@ export const Cell = {
599
600
  const { $table, row, column, isHidden } = params;
600
601
  const tableProps = $table;
601
602
  const tableReactData = $table;
603
+ const tableInternalData = $table;
602
604
  const { treeConfig } = tableProps;
603
- const { selectCheckboxMaps, treeIndeterminateMaps } = tableReactData;
605
+ const { updateCheckboxFlag } = tableReactData;
606
+ const { selectCheckboxMaps, treeIndeterminateRowMaps } = tableInternalData;
604
607
  const checkboxOpts = $table.computeCheckboxOpts;
605
608
  const { labelField, checkMethod, visibleMethod } = checkboxOpts;
606
609
  const { slots } = column;
@@ -613,7 +616,7 @@ export const Cell = {
613
616
  const ons = {};
614
617
  if (!isHidden) {
615
618
  const rowid = getRowid($table, row);
616
- isChecked = !!selectCheckboxMaps[rowid];
619
+ isChecked = !!updateCheckboxFlag && !!selectCheckboxMaps[rowid];
617
620
  ons.click = (evnt) => {
618
621
  if (!isDisabled && isVisible) {
619
622
  $table.triggerCheckRowEvent(evnt, params, !isChecked);
@@ -623,7 +626,7 @@ export const Cell = {
623
626
  isDisabled = !checkMethod({ row });
624
627
  }
625
628
  if (treeConfig) {
626
- indeterminate = !!treeIndeterminateMaps[rowid];
629
+ indeterminate = !!treeIndeterminateRowMaps[rowid];
627
630
  }
628
631
  }
629
632
  const checkboxParams = Object.assign(Object.assign({}, params), { checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate });
@@ -660,8 +663,10 @@ export const Cell = {
660
663
  const { $table, row, column, isHidden } = params;
661
664
  const tableProps = $table;
662
665
  const tableReactData = $table;
666
+ const tableInternalData = $table;
663
667
  const { treeConfig } = tableProps;
664
- const { treeIndeterminateMaps } = tableReactData;
668
+ const { updateCheckboxFlag } = tableReactData;
669
+ const { treeIndeterminateRowMaps } = tableInternalData;
665
670
  const checkboxOpts = $table.computeCheckboxOpts;
666
671
  const { labelField, checkField, checkMethod, visibleMethod } = checkboxOpts;
667
672
  const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
@@ -675,7 +680,7 @@ export const Cell = {
675
680
  const ons = {};
676
681
  if (!isHidden) {
677
682
  const rowid = getRowid($table, row);
678
- isChecked = XEUtils.get(row, checkField);
683
+ isChecked = !!updateCheckboxFlag && XEUtils.get(row, checkField);
679
684
  ons.click = (evnt) => {
680
685
  if (!isDisabled && isVisible) {
681
686
  $table.triggerCheckRowEvent(evnt, params, !isChecked);
@@ -685,7 +690,7 @@ export const Cell = {
685
690
  isDisabled = !checkMethod({ row });
686
691
  }
687
692
  if (treeConfig) {
688
- isIndeterminate = !!treeIndeterminateMaps[rowid];
693
+ isIndeterminate = !!treeIndeterminateRowMaps[rowid];
689
694
  }
690
695
  }
691
696
  const checkboxParams = Object.assign(Object.assign({}, params), { checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate: isIndeterminate });
@@ -723,8 +728,8 @@ export const Cell = {
723
728
  */
724
729
  renderExpandCell(h, params) {
725
730
  const { $table, isHidden, row, column } = params;
726
- const tableReactData = $table;
727
- const { rowExpandedMaps, rowExpandLazyLoadedMaps } = tableReactData;
731
+ const tableInternalData = $table;
732
+ const { rowExpandedMaps, rowExpandLazyLoadedMaps } = tableInternalData;
728
733
  const expandOpts = $table.computeExpandOpts;
729
734
  const { lazy, labelField, iconLoaded, showIcon, iconOpen, iconClose, visibleMethod } = expandOpts;
730
735
  const { slots } = column;
@@ -820,7 +825,7 @@ export const Cell = {
820
825
  renderSortIcon(h, params) {
821
826
  const { $table, column } = params;
822
827
  const sortOpts = $table.computeSortOpts;
823
- const { showIcon, allowBtn, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
828
+ const { showIcon, allowBtn, ascTitle, descTitle, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
824
829
  if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
825
830
  return [
826
831
  h('span', {
@@ -831,7 +836,7 @@ export const Cell = {
831
836
  'sort--active': column.order === 'asc'
832
837
  }],
833
838
  attrs: {
834
- title: getI18n('vxe.table.sortAsc')
839
+ title: XEUtils.eqNull(ascTitle) ? getI18n('vxe.table.sortAsc') : `${ascTitle || ''}`
835
840
  },
836
841
  on: allowBtn
837
842
  ? {
@@ -847,7 +852,7 @@ export const Cell = {
847
852
  'sort--active': column.order === 'desc'
848
853
  }],
849
854
  attrs: {
850
- title: getI18n('vxe.table.sortDesc')
855
+ title: XEUtils.eqNull(descTitle) ? getI18n('vxe.table.sortDesc') : `${descTitle || ''}`
851
856
  },
852
857
  on: allowBtn
853
858
  ? {
@@ -131,14 +131,15 @@ export const columnProps = {
131
131
  export const columnWatch = {};
132
132
  Object.keys(columnProps).forEach(name => {
133
133
  columnWatch[name] = function (value) {
134
+ const $xeTable = this.$xeTable;
134
135
  this.columnConfig.update(name, value);
135
- if (this.$xetable) {
136
+ if ($xeTable) {
136
137
  if (name === 'filters') {
137
- this.$xetable.setFilter(this.columnConfig, value);
138
- this.$xetable.handleUpdateDataQueue();
138
+ $xeTable.setFilter(this.columnConfig, value);
139
+ $xeTable.handleUpdateDataQueue();
139
140
  }
140
141
  else if (['visible', 'fixed', 'width', 'minWidth', 'maxWidth'].includes(name)) {
141
- this.$xetable.handleRefreshColumnQueue();
142
+ $xeTable.handleRefreshColumnQueue();
142
143
  }
143
144
  }
144
145
  };
@@ -148,21 +149,22 @@ export default {
148
149
  props: columnProps,
149
150
  provide() {
150
151
  return {
151
- $xecolumn: this,
152
- $xegrid: null
152
+ $xeColumn: this,
153
+ $xeGrid: null
153
154
  };
154
155
  },
155
156
  inject: {
156
- $xetable: {
157
+ $xeTable: {
157
158
  default: null
158
159
  },
159
- $xecolumn: {
160
+ $xeColumn: {
160
161
  default: null
161
162
  }
162
163
  },
163
164
  watch: columnWatch,
164
165
  created() {
165
- this.columnConfig = this.createColumn(this.$xetable, this);
166
+ const $xeTable = this.$xeTable;
167
+ this.columnConfig = this.createColumn($xeTable, this);
166
168
  },
167
169
  mounted() {
168
170
  this.columnConfig.slots = this.$scopedSlots;
@@ -6,12 +6,12 @@ import { warnLog, errLog } from '../../ui/src/log';
6
6
  const { getI18n, formats } = VxeUI;
7
7
  export class ColumnInfo {
8
8
  /* eslint-disable @typescript-eslint/no-use-before-define */
9
- constructor($xetable, _vm, { renderHeader, renderCell, renderFooter, renderData } = {}) {
10
- const $xegrid = $xetable.$xegrid;
11
- const proxyOpts = $xegrid ? $xegrid.proxyOpts : null;
9
+ constructor($xeTable, _vm, { renderHeader, renderCell, renderFooter, renderData } = {}) {
10
+ const tableProps = $xeTable;
11
+ const $xeGrid = $xeTable.$xeGrid;
12
+ const proxyOpts = $xeGrid ? $xeGrid.proxyOpts : null;
12
13
  const formatter = _vm.formatter;
13
14
  const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true;
14
- const tableProps = $xetable;
15
15
  const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
16
16
  if (_vm.type && types.indexOf(_vm.type) === -1) {
17
17
  warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
@@ -24,7 +24,7 @@ export class ColumnInfo {
24
24
  }
25
25
  if (_vm.type === 'expand') {
26
26
  const { treeConfig } = tableProps;
27
- if (treeConfig && ($xetable.treeOpts.showLine || $xetable.treeOpts.line)) {
27
+ if (treeConfig && ($xeTable.treeOpts.showLine || $xeTable.treeOpts.line)) {
28
28
  errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand']);
29
29
  }
30
30
  }
@@ -136,7 +136,7 @@ export class ColumnInfo {
136
136
  slots: _vm.slots
137
137
  });
138
138
  if (proxyOpts && proxyOpts.beforeColumn) {
139
- proxyOpts.beforeColumn({ $grid: $xegrid, column: this });
139
+ proxyOpts.beforeColumn({ $grid: $xeGrid, column: this });
140
140
  }
141
141
  }
142
142
  getTitle() {
@@ -24,10 +24,11 @@ function renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIn
24
24
  const tableProps = $xeTable;
25
25
  const tableReactData = $xeTable;
26
26
  const tableInternalData = $xeTable;
27
+ const $xeGrid = $xeTable.$xeGrid;
27
28
  const { fixedType } = props;
28
29
  const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps;
29
30
  const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFooterList } = tableReactData;
30
- const { scrollXStore } = tableInternalData;
31
+ const { fullColumnIdData, scrollXStore } = tableInternalData;
31
32
  const tooltipOpts = $xeTable.computeTooltipOpts;
32
33
  const { isAllColumnDrag } = $xeTable.resizableOpts;
33
34
  const columnOpts = $xeTable.computeColumnOpts;
@@ -38,6 +39,7 @@ function renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIn
38
39
  return tableColumn.map((column, $columnIndex) => {
39
40
  const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column;
40
41
  const colid = column.id;
42
+ const colRest = fullColumnIdData[colid] || {};
41
43
  const renderOpts = editRender || cellRender;
42
44
  const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
43
45
  const showAllTip = tooltipOpts.showAll;
@@ -53,12 +55,12 @@ function renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIn
53
55
  const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
54
56
  const attrs = { colid };
55
57
  const tfOns = {};
56
- const columnIndex = $xeTable.getColumnIndex(column);
57
- const _columnIndex = $xeTable.getVTColumnIndex(column);
58
+ const columnIndex = colRest.index;
59
+ const _columnIndex = colRest._index;
58
60
  const itemIndex = _columnIndex;
59
61
  const cellParams = {
60
62
  $table: $xeTable,
61
- $grid: $xeTable.xegrid,
63
+ $grid: $xeGrid,
62
64
  row,
63
65
  rowIndex: _rowIndex,
64
66
  _rowIndex,
@@ -293,7 +295,7 @@ export default {
293
295
  const { fixedType, fixedColumn, tableColumn } = props;
294
296
  const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps;
295
297
  const { visibleColumn, fullColumnIdData } = tableInternalData;
296
- const { isGroup, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
298
+ const { isGroup, isColLoading, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
297
299
  let renderColumnList = tableColumn;
298
300
  let isOptimizeMode = false;
299
301
  // 如果是使用优化模式
@@ -305,7 +307,7 @@ export default {
305
307
  isOptimizeMode = true;
306
308
  }
307
309
  }
308
- if (fixedType || !overflowX) {
310
+ if (!isColLoading && (fixedType || !overflowX)) {
309
311
  renderColumnList = visibleColumn;
310
312
  }
311
313
  if (fixedType) {
@@ -380,7 +382,10 @@ export default {
380
382
  attrs: {
381
383
  name: column.id
382
384
  },
383
- key: $columnIndex
385
+ key: $columnIndex,
386
+ style: {
387
+ width: `${column.renderWidth}px`
388
+ }
384
389
  });
385
390
  })),
386
391
  /**
@@ -7,21 +7,22 @@ export default {
7
7
  props: columnProps,
8
8
  provide() {
9
9
  return {
10
- $xecolumn: this,
11
- $xegrid: null
10
+ $xeColumn: this,
11
+ $xeGrid: null
12
12
  };
13
13
  },
14
14
  inject: {
15
- $xetable: {
15
+ $xeTable: {
16
16
  default: null
17
17
  },
18
- $xecolumn: {
18
+ $xeColumn: {
19
19
  default: null
20
20
  }
21
21
  },
22
22
  watch: columnWatch,
23
23
  created() {
24
- this.columnConfig = this.createColumn(this.$xetable, this);
24
+ const $xeTable = this.$xeTable;
25
+ this.columnConfig = this.createColumn($xeTable, this);
25
26
  },
26
27
  mounted() {
27
28
  const { $scopedSlots } = this;
@@ -7,14 +7,14 @@ const cellType = 'header';
7
7
  const renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) => {
8
8
  const props = _vm;
9
9
  const $xeTable = _vm.$parent;
10
- const $xeGrid = $xeTable.xegrid;
10
+ const $xeGrid = $xeTable.$xeGrid;
11
11
  const tableProps = $xeTable;
12
12
  const tableReactData = $xeTable;
13
13
  const tableInternalData = $xeTable;
14
14
  const { fixedType } = props;
15
15
  const { resizable: allResizable, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps;
16
16
  const { currentColumn, dragCol, scrollXLoad, scrollYLoad, overflowX } = tableReactData;
17
- const { scrollXStore } = tableInternalData;
17
+ const { fullColumnIdData, scrollXStore } = tableInternalData;
18
18
  const columnOpts = $xeTable.computeColumnOpts;
19
19
  const columnDragOpts = $xeTable.computeColumnDragOpts;
20
20
  const cellOpts = $xeTable.computeCellOpts;
@@ -26,6 +26,7 @@ const renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) => {
26
26
  const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column;
27
27
  // const { enabled } = tooltipOpts
28
28
  const colid = column.id;
29
+ const colRest = fullColumnIdData[colid] || {};
29
30
  const renderOpts = editRender || cellRender;
30
31
  const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
31
32
  const isColGroup = column.children && column.children.length;
@@ -43,8 +44,8 @@ const renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) => {
43
44
  firstFilterOption = filters[0];
44
45
  hasFilter = filters.some((item) => item.checked);
45
46
  }
46
- const columnIndex = $xeTable.getColumnIndex(column);
47
- const _columnIndex = $xeTable.getVTColumnIndex(column);
47
+ const columnIndex = colRest.index;
48
+ const _columnIndex = colRest._index;
48
49
  const cellParams = { $table: $xeTable, $grid: $xeGrid, $rowIndex, column, columnIndex, $columnIndex, _columnIndex, firstFilterOption, fixed: fixedType, type: cellType, isHidden: fixedHiddenColumn, hasFilter };
49
50
  const thAttrs = {
50
51
  colid,
@@ -252,7 +253,7 @@ export default {
252
253
  const { fixedType, fixedColumn, tableColumn } = props;
253
254
  const { headerColumn } = this;
254
255
  const { mouseConfig, showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps;
255
- const { isGroup, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
256
+ const { isGroup, isColLoading, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
256
257
  const { visibleColumn, fullColumnIdData } = tableInternalData;
257
258
  const mouseOpts = $xeTable.computeMouseOpts;
258
259
  let renderHeaderList = headerColumn;
@@ -271,7 +272,7 @@ export default {
271
272
  isOptimizeMode = true;
272
273
  }
273
274
  }
274
- if (fixedType || !overflowX) {
275
+ if (!isColLoading && (fixedType || !overflowX)) {
275
276
  renderColumnList = visibleColumn;
276
277
  }
277
278
  if (fixedType) {
@@ -351,7 +352,10 @@ export default {
351
352
  attrs: {
352
353
  name: column.id
353
354
  },
354
- key: $columnIndex
355
+ key: $columnIndex,
356
+ style: {
357
+ width: `${column.renderWidth}px`
358
+ }
355
359
  });
356
360
  })),
357
361
  /**
@@ -390,8 +394,10 @@ export default {
390
394
  },
391
395
  methods: {
392
396
  uploadColumn() {
393
- const { $parent: $xetable } = this;
394
- this.headerColumn = $xetable.isGroup ? convertHeaderColumnToRows(this.tableGroupColumn) : [];
397
+ const $xeTable = this.$parent;
398
+ const tableReactData = $xeTable;
399
+ const { isGroup } = tableReactData;
400
+ this.headerColumn = isGroup ? convertHeaderColumnToRows(this.tableGroupColumn) : [];
395
401
  }
396
402
  }
397
403
  };