vxe-table 3.14.0-beta.9 → 3.14.0

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 +17 -11
  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 -2
  34. package/es/table/render/index.js +2 -2
  35. package/es/table/src/body.js +39 -20
  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 +761 -698
  43. package/es/table/src/props.js +4 -0
  44. package/es/table/src/table.js +85 -49
  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 +1558 -1232
  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 +19 -13
  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 +3 -3
  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 +47 -20
  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 +898 -825
  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 +93 -52
  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 +20 -14
  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 +2 -2
  190. package/packages/table/render/index.ts +2 -2
  191. package/packages/table/src/body.ts +39 -20
  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 +840 -734
  199. package/packages/table/src/props.ts +16 -12
  200. package/packages/table/src/table.ts +99 -52
  201. package/packages/table/src/util.ts +63 -21
  202. package/packages/toolbar/src/toolbar.ts +3 -3
  203. package/packages/ui/index.ts +1 -0
  204. /package/es/{iconfont.1741336976538.ttf → iconfont.1742955973002.ttf} +0 -0
  205. /package/es/{iconfont.1741336976538.woff → iconfont.1742955973002.woff} +0 -0
  206. /package/es/{iconfont.1741336976538.woff2 → iconfont.1742955973002.woff2} +0 -0
  207. /package/lib/{iconfont.1741336976538.ttf → iconfont.1742955973002.ttf} +0 -0
  208. /package/lib/{iconfont.1741336976538.woff → iconfont.1742955973002.woff} +0 -0
  209. /package/lib/{iconfont.1741336976538.woff2 → iconfont.1742955973002.woff2} +0 -0
@@ -2,7 +2,7 @@ import { PropType, CreateElement } from 'vue'
2
2
  import XEUtils from 'xe-utils'
3
3
  import { VxeUI } from '../../ui'
4
4
  import { isEnableConf, getClass } from '../../ui/src/utils'
5
- import { getOffsetSize, calcTreeLine, mergeBodyMethod, getRowid } from './util'
5
+ import { getOffsetSize, calcTreeLine, mergeBodyMethod, getRowid, createHandleGetRowId } from './util'
6
6
  import { updateCellTitle } from '../../ui/src/dom'
7
7
  import { getSlotVNs } from '../../ui/src/vn'
8
8
 
@@ -22,7 +22,7 @@ const isVMScrollProcess = ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
22
22
  return !!(isDragResize || (lastScrollTime && Date.now() < lastScrollTime + (delayHover as number)))
23
23
  }
24
24
 
25
- function renderLine (h: CreateElement, _vm: any, params: VxeTableDefines.CellRenderBodyParams, cellHeight: number) {
25
+ function renderLine (h: CreateElement, _vm: any, rowid: string, params: VxeTableDefines.CellRenderBodyParams, cellHeight: number) {
26
26
  const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
27
27
  const tableProps = $xeTable
28
28
  const tableInternalData = $xeTable as unknown as TableInternalData
@@ -36,7 +36,6 @@ function renderLine (h: CreateElement, _vm: any, params: VxeTableDefines.CellRen
36
36
  if (slots && (slots as any).line) {
37
37
  return $xeTable.callSlot((slots as any).line, params, h)
38
38
  }
39
- const rowid = getRowid($xeTable, row)
40
39
  const rest = fullAllDataRowIdData[rowid]
41
40
  let rLevel = 0
42
41
  let prevRow = null
@@ -89,10 +88,11 @@ function renderTdColumn (
89
88
  const tableProps = $xeTable
90
89
  const tableReactData = $xeTable as unknown as TableReactData
91
90
  const tableInternalData = $xeTable as unknown as TableInternalData
91
+ const $xeGrid = $xeTable.$xeGrid
92
92
 
93
- const { fullAllDataRowIdData } = tableInternalData
93
+ const { fullAllDataRowIdData, fullColumnIdData, visibleColumn } = tableInternalData
94
94
  const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps
95
- const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData
95
+ const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData
96
96
  const { afterFullData, scrollXStore, scrollYStore } = tableInternalData
97
97
  const cellOpts = $xeTable.computeCellOpts
98
98
  const validOpts = $xeTable.computeValidOpts
@@ -108,19 +108,21 @@ function renderTdColumn (
108
108
  const columnOpts = $xeTable.computeColumnOpts
109
109
  const mouseOpts = $xeTable.computeMouseOpts
110
110
  const areaOpts = $xeTable.computeAreaOpts
111
+ const cellOffsetWidth = $xeTable.computeCellOffsetWidth
111
112
  const { selectCellToRow } = areaOpts
112
113
  const { type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column
113
114
  const { verticalAlign: allVerticalAlign } = cellOpts
114
115
  const { actived } = editStore
115
- const rowRest = fullAllDataRowIdData[rowid]
116
+ const rowRest = fullAllDataRowIdData[rowid] || {}
116
117
  const colid = column.id
118
+ const colRest = fullColumnIdData[colid] || {}
117
119
  const renderOpts = editRender || cellRender
118
120
  const compConf = renderOpts ? renderer.get(renderOpts.name) : null
119
121
  const compCellClassName = compConf ? (compConf.tableCellClassName || compConf.cellClassName) : null
120
122
  const compCellStyle = compConf ? (compConf.tableCellStyle || compConf.cellStyle) : ''
121
123
  const showAllTip = tooltipOpts.showAll
122
- const columnIndex = $xeTable.getColumnIndex(column)
123
- const _columnIndex = $xeTable.getVTColumnIndex(column)
124
+ const columnIndex = colRest.index
125
+ const _columnIndex = colRest._index
124
126
  const isEdit = isEnableConf(editRender)
125
127
  const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0
126
128
  let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX
@@ -144,7 +146,7 @@ function renderTdColumn (
144
146
  $table: VxeTableConstructor<any> & VxeTablePrivateMethods
145
147
  } = {
146
148
  $table: $xeTable,
147
- $grid: $xeTable.xegrid,
149
+ $grid: $xeGrid,
148
150
  isEdit: false,
149
151
  seq,
150
152
  rowid,
@@ -277,6 +279,18 @@ function renderTdColumn (
277
279
  }
278
280
 
279
281
  const tcStyle: Record<string, string> = {}
282
+ if (hasEllipsis && resizeWidthFlag) {
283
+ let tsColspan = tdAttrs.colspan || 0
284
+ if (tsColspan > 1) {
285
+ for (let index = 1; index < tsColspan; index++) {
286
+ const nextColumn = visibleColumn[columnIndex + index]
287
+ if (nextColumn) {
288
+ tsColspan += nextColumn.renderWidth
289
+ }
290
+ }
291
+ }
292
+ tcStyle.width = `${column.renderWidth - (cellOffsetWidth * tsColspan)}px`
293
+ }
280
294
  if (scrollYLoad || hasEllipsis || isCsHeight || isRsHeight) {
281
295
  tcStyle.height = `${cellHeight}px`
282
296
  } else {
@@ -299,7 +313,7 @@ function renderTdColumn (
299
313
  } else {
300
314
  // 渲染单元格
301
315
  tdVNs.push(
302
- ...renderLine(h, _vm, cellParams, cellHeight),
316
+ ...renderLine(h, _vm, rowid, cellParams, cellHeight),
303
317
  h('div', {
304
318
  key: 'tc',
305
319
  class: ['vxe-cell', {
@@ -436,8 +450,8 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
436
450
  const tableInternalData = $xeTable as unknown as TableInternalData
437
451
 
438
452
  const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps
439
- const { hasFixedColumn, treeExpandedMaps, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, isDragColMove, rowExpandHeightFlag } = tableReactData
440
- const { fullAllDataRowIdData } = tableInternalData
453
+ const { hasFixedColumn, treeExpandedFlag, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, isDragColMove, rowExpandHeightFlag } = tableReactData
454
+ const { fullAllDataRowIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData
441
455
  const checkboxOpts = $xeTable.computeCheckboxOpts
442
456
  const radioOpts = $xeTable.computeRadioOpts
443
457
  const treeOpts = $xeTable.computeTreeOpts
@@ -448,6 +462,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
448
462
  const { transform, seqMode } = treeOpts
449
463
  const childrenField = treeOpts.children || treeOpts.childrenField
450
464
  const rows: any[] = []
465
+ const { handleGetRowId } = createHandleGetRowId($xeTable)
451
466
  tableData.forEach((row, $rowIndex) => {
452
467
  const trOn: Record<string, any> = {}
453
468
  let rowIndex = $rowIndex
@@ -468,8 +483,8 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
468
483
  $xeTable.clearHoverRow()
469
484
  }
470
485
  }
471
- const rowid = getRowid($xeTable, row)
472
- const rowRest = fullAllDataRowIdData[rowid]
486
+ const rowid = handleGetRowId(row)
487
+ const rowRest = fullAllDataRowIdData[rowid] || {}
473
488
  let rowLevel = 0
474
489
  let seq: string | number = -1
475
490
  let _rowIndex = 0
@@ -484,7 +499,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
484
499
  }
485
500
  const params = { $table: $xeTable, seq, rowid, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex, _rowIndex }
486
501
  // 行是否被展开
487
- const isExpandRow = expandColumn && !!rowExpandedMaps[rowid]
502
+ const isExpandRow = expandColumn && !!rowExpandedFlag && !!rowExpandedMaps[rowid]
488
503
  // 树节点是否被展开
489
504
  let isExpandTree = false
490
505
  let rowChildren = []
@@ -495,7 +510,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
495
510
  }
496
511
  if (treeConfig && !scrollYLoad && !transform) {
497
512
  rowChildren = row[childrenField]
498
- isExpandTree = rowChildren && rowChildren.length && !!treeExpandedMaps[rowid]
513
+ isExpandTree = !!treeExpandedFlag && rowChildren && rowChildren.length > 0 && !!treeExpandedMaps[rowid]
499
514
  }
500
515
  // 拖拽行事件
501
516
  if (rowOpts.drag && (!treeConfig || transform)) {
@@ -514,7 +529,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
514
529
  'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
515
530
  'row--radio': radioOpts.highlight && selectRadioRow === row,
516
531
  'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
517
- 'row--pending': !!pendingRowMaps[rowid]
532
+ 'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid]
518
533
  },
519
534
  rowClassName ? (XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName) : ''
520
535
  ]
@@ -670,6 +685,7 @@ export default {
670
685
  const tableProps = $xeTable
671
686
  const tableReactData = $xeTable as unknown as TableReactData
672
687
  const tableInternalData = $xeTable as unknown as TableInternalData
688
+ const $xeGrid = $xeTable.$xeGrid
673
689
 
674
690
  const { xID, $scopedSlots } = $xeTable
675
691
  const { fixedColumn, fixedType, tableColumn } = props
@@ -695,7 +711,7 @@ export default {
695
711
  }
696
712
  }
697
713
 
698
- if (fixedType || !overflowX) {
714
+ if (!isColLoading && (fixedType || !overflowX)) {
699
715
  renderColumnList = visibleColumn
700
716
  }
701
717
 
@@ -755,7 +771,7 @@ export default {
755
771
 
756
772
  let emptyContent
757
773
  if ($scopedSlots.empty) {
758
- emptyContent = $scopedSlots.empty.call(this, { $table: $xeTable, $grid: $xeTable.xegrid })
774
+ emptyContent = $scopedSlots.empty.call(this, { $table: $xeTable, $grid: $xeGrid })
759
775
  } else {
760
776
  const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null
761
777
  const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null
@@ -814,7 +830,10 @@ export default {
814
830
  attrs: {
815
831
  name: column.id
816
832
  },
817
- key: $columnIndex
833
+ key: $columnIndex,
834
+ style: {
835
+ width: `${column.renderWidth}px`
836
+ }
818
837
  })
819
838
  })),
820
839
  /**
@@ -323,7 +323,7 @@ function renderFooterHandle (h: CreateElement, params: VxeTableDefines.CellRende
323
323
  }
324
324
 
325
325
  export const Cell = {
326
- createColumn ($xetable: any, _vm: any) {
326
+ createColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, _vm: any) {
327
327
  const { type } = _vm
328
328
  const renConfs: any = {
329
329
  renderHeader: renderHeaderHandle,
@@ -333,7 +333,7 @@ export const Cell = {
333
333
  if (type === 'expand') {
334
334
  renConfs.renderData = Cell.renderExpandData
335
335
  }
336
- return createColumn($xetable, _vm, renConfs)
336
+ return createColumn($xeTable, _vm, renConfs)
337
337
  },
338
338
  /**
339
339
  * 列头标题
@@ -402,8 +402,8 @@ export const Cell = {
402
402
  const { $table, isHidden } = params
403
403
  const tableReactData = $table as unknown as TableReactData
404
404
  const tableInternalData = $table as unknown as TableInternalData
405
- const { treeExpandedMaps, treeExpandLazyLoadedMaps } = tableReactData
406
- const { fullAllDataRowIdData } = tableInternalData
405
+ const { treeExpandedFlag } = tableReactData
406
+ const { fullAllDataRowIdData, treeExpandedMaps, treeExpandLazyLoadedMaps } = tableInternalData
407
407
  const treeOpts = $table.computeTreeOpts
408
408
  const { row, column, level } = params
409
409
  const { slots } = column
@@ -423,7 +423,7 @@ export const Cell = {
423
423
  }
424
424
  if (!isHidden) {
425
425
  const rowid = getRowid($table, row)
426
- isActive = !!treeExpandedMaps[rowid]
426
+ isActive = !!treeExpandedFlag && !!treeExpandedMaps[rowid]
427
427
  if (lazy) {
428
428
  const rest = fullAllDataRowIdData[rowid]
429
429
  isLazyLoading = !!treeExpandLazyLoadedMaps[rowid]
@@ -580,7 +580,8 @@ export const Cell = {
580
580
  const headerSlot = slots ? slots.header : null
581
581
  const titleSlot = slots ? slots.title : null
582
582
  const checkboxOpts = $table.computeCheckboxOpts
583
- const headerTitle = column.getTitle()
583
+ const { checkStrictly, showHeader, headerTitle } = checkboxOpts
584
+ const colTitle = column.getTitle()
584
585
  const ons: Record<string, any> = {}
585
586
  if (!isHidden) {
586
587
  ons.click = (evnt: any) => {
@@ -593,11 +594,11 @@ export const Cell = {
593
594
  if (headerSlot) {
594
595
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)))
595
596
  }
596
- if (checkboxOpts.checkStrictly ? !checkboxOpts.showHeader : checkboxOpts.showHeader === false) {
597
+ if (checkStrictly ? !showHeader : showHeader === false) {
597
598
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [
598
599
  h('span', {
599
600
  class: 'vxe-checkbox--label'
600
- }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)
601
+ }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : colTitle)
601
602
  ]))
602
603
  }
603
604
  return renderHeaderCellBaseVNs(h, params,
@@ -609,18 +610,18 @@ export const Cell = {
609
610
  'is--indeterminate': isAllCheckboxIndeterminate
610
611
  }],
611
612
  attrs: {
612
- title: getI18n('vxe.table.allTitle')
613
+ title: XEUtils.eqNull(headerTitle) ? getI18n('vxe.table.allTitle') : `${headerTitle || ''}`
613
614
  },
614
615
  on: ons
615
616
  }, [
616
617
  h('span', {
617
618
  class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
618
619
  })
619
- ].concat(titleSlot || headerTitle
620
+ ].concat(titleSlot || colTitle
620
621
  ? [
621
622
  h('span', {
622
623
  class: 'vxe-checkbox--label'
623
- }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)
624
+ }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : colTitle)
624
625
  ]
625
626
  : []))
626
627
  ])
@@ -630,8 +631,10 @@ export const Cell = {
630
631
  const { $table, row, column, isHidden } = params
631
632
  const tableProps = $table
632
633
  const tableReactData = $table as unknown as TableReactData
634
+ const tableInternalData = $table as unknown as TableInternalData
633
635
  const { treeConfig } = tableProps
634
- const { selectCheckboxMaps, treeIndeterminateMaps } = tableReactData
636
+ const { updateCheckboxFlag } = tableReactData
637
+ const { selectCheckboxMaps, treeIndeterminateRowMaps } = tableInternalData
635
638
  const checkboxOpts = $table.computeCheckboxOpts
636
639
  const { labelField, checkMethod, visibleMethod } = checkboxOpts
637
640
  const { slots } = column
@@ -644,7 +647,7 @@ export const Cell = {
644
647
  const ons: Record<string, any> = {}
645
648
  if (!isHidden) {
646
649
  const rowid = getRowid($table, row)
647
- isChecked = !!selectCheckboxMaps[rowid]
650
+ isChecked = !!updateCheckboxFlag && !!selectCheckboxMaps[rowid]
648
651
  ons.click = (evnt: any) => {
649
652
  if (!isDisabled && isVisible) {
650
653
  $table.triggerCheckRowEvent(evnt, params, !isChecked)
@@ -654,7 +657,7 @@ export const Cell = {
654
657
  isDisabled = !checkMethod({ row })
655
658
  }
656
659
  if (treeConfig) {
657
- indeterminate = !!treeIndeterminateMaps[rowid]
660
+ indeterminate = !!treeIndeterminateRowMaps[rowid]
658
661
  }
659
662
  }
660
663
  const checkboxParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate }
@@ -695,8 +698,10 @@ export const Cell = {
695
698
  const { $table, row, column, isHidden } = params
696
699
  const tableProps = $table
697
700
  const tableReactData = $table as unknown as TableReactData
701
+ const tableInternalData = $table as unknown as TableInternalData
698
702
  const { treeConfig } = tableProps
699
- const { treeIndeterminateMaps } = tableReactData
703
+ const { updateCheckboxFlag } = tableReactData
704
+ const { treeIndeterminateRowMaps } = tableInternalData
700
705
  const checkboxOpts = $table.computeCheckboxOpts
701
706
  const { labelField, checkField, checkMethod, visibleMethod } = checkboxOpts
702
707
  const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField
@@ -710,7 +715,7 @@ export const Cell = {
710
715
  const ons: Record<string, any> = {}
711
716
  if (!isHidden) {
712
717
  const rowid = getRowid($table, row)
713
- isChecked = XEUtils.get(row, checkField)
718
+ isChecked = !!updateCheckboxFlag && XEUtils.get(row, checkField)
714
719
  ons.click = (evnt: any) => {
715
720
  if (!isDisabled && isVisible) {
716
721
  $table.triggerCheckRowEvent(evnt, params, !isChecked)
@@ -720,7 +725,7 @@ export const Cell = {
720
725
  isDisabled = !checkMethod({ row })
721
726
  }
722
727
  if (treeConfig) {
723
- isIndeterminate = !!treeIndeterminateMaps[rowid]
728
+ isIndeterminate = !!treeIndeterminateRowMaps[rowid]
724
729
  }
725
730
  }
726
731
  const checkboxParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate: isIndeterminate }
@@ -763,8 +768,8 @@ export const Cell = {
763
768
  */
764
769
  renderExpandCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
765
770
  const { $table, isHidden, row, column } = params
766
- const tableReactData = $table as unknown as TableReactData
767
- const { rowExpandedMaps, rowExpandLazyLoadedMaps } = tableReactData
771
+ const tableInternalData = $table as unknown as TableInternalData
772
+ const { rowExpandedMaps, rowExpandLazyLoadedMaps } = tableInternalData
768
773
  const expandOpts = $table.computeExpandOpts
769
774
  const { lazy, labelField, iconLoaded, showIcon, iconOpen, iconClose, visibleMethod } = expandOpts
770
775
  const { slots } = column
@@ -871,7 +876,7 @@ export const Cell = {
871
876
  renderSortIcon (h: CreateElement, params: (VxeTableDefines.CellRenderHeaderParams | VxeTableDefines.CellRenderHeaderParams) & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
872
877
  const { $table, column } = params
873
878
  const sortOpts = $table.computeSortOpts
874
- const { showIcon, allowBtn, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts
879
+ const { showIcon, allowBtn, ascTitle, descTitle, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts
875
880
  if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
876
881
  return [
877
882
  h('span', {
@@ -882,7 +887,7 @@ export const Cell = {
882
887
  'sort--active': column.order === 'asc'
883
888
  }],
884
889
  attrs: {
885
- title: getI18n('vxe.table.sortAsc')
890
+ title: XEUtils.eqNull(ascTitle) ? getI18n('vxe.table.sortAsc') : `${ascTitle || ''}`
886
891
  },
887
892
  on: allowBtn
888
893
  ? {
@@ -898,7 +903,7 @@ export const Cell = {
898
903
  'sort--active': column.order === 'desc'
899
904
  }],
900
905
  attrs: {
901
- title: getI18n('vxe.table.sortDesc')
906
+ title: XEUtils.eqNull(descTitle) ? getI18n('vxe.table.sortDesc') : `${descTitle || ''}`
902
907
  },
903
908
  on: allowBtn
904
909
  ? {
@@ -3,7 +3,7 @@ import Cell from './cell'
3
3
  import { defineVxeComponent } from '../../ui/src/comp'
4
4
  import { assembleColumn, destroyColumn } from './util'
5
5
 
6
- import type { VxeColumnPropTypes } from '../../../types'
6
+ import type { VxeColumnPropTypes, VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
7
7
 
8
8
  export const columnProps = {
9
9
  // 列唯一主键
@@ -136,13 +136,15 @@ export const columnProps = {
136
136
  export const columnWatch: Record<string, any> = {}
137
137
  Object.keys(columnProps).forEach(name => {
138
138
  columnWatch[name] = function (value: any) {
139
+ const $xeTable = this.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
140
+
139
141
  this.columnConfig.update(name, value)
140
- if (this.$xetable) {
142
+ if ($xeTable) {
141
143
  if (name === 'filters') {
142
- this.$xetable.setFilter(this.columnConfig, value)
143
- this.$xetable.handleUpdateDataQueue()
144
+ $xeTable.setFilter(this.columnConfig, value)
145
+ $xeTable.handleUpdateDataQueue()
144
146
  } else if (['visible', 'fixed', 'width', 'minWidth', 'maxWidth'].includes(name)) {
145
- this.$xetable.handleRefreshColumnQueue()
147
+ $xeTable.handleRefreshColumnQueue()
146
148
  }
147
149
  }
148
150
  }
@@ -153,21 +155,23 @@ export default /* define-vxe-component start */ defineVxeComponent({
153
155
  props: columnProps,
154
156
  provide () {
155
157
  return {
156
- $xecolumn: this,
157
- $xegrid: null
158
+ $xeColumn: this,
159
+ $xeGrid: null
158
160
  }
159
161
  },
160
162
  inject: {
161
- $xetable: {
163
+ $xeTable: {
162
164
  default: null
163
165
  },
164
- $xecolumn: {
166
+ $xeColumn: {
165
167
  default: null
166
168
  }
167
169
  },
168
170
  watch: columnWatch,
169
171
  created (this: any) {
170
- this.columnConfig = this.createColumn(this.$xetable, this)
172
+ const $xeTable = this.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
173
+
174
+ this.columnConfig = this.createColumn($xeTable, this)
171
175
  },
172
176
  mounted () {
173
177
  this.columnConfig.slots = this.$scopedSlots
@@ -4,16 +4,19 @@ import { toFilters } from './util'
4
4
  import { getFuncText } from '../../ui/src/utils'
5
5
  import { warnLog, errLog } from '../../ui/src/log'
6
6
 
7
+ import type { VxeTableConstructor, VxeTablePrivateMethods, VxeGridConstructor, GridPrivateMethods } from '../../../types'
8
+
7
9
  const { getI18n, formats } = VxeUI
8
10
 
9
11
  export class ColumnInfo {
10
12
  /* eslint-disable @typescript-eslint/no-use-before-define */
11
- constructor ($xetable: any, _vm: any, { renderHeader, renderCell, renderFooter, renderData }: any = {}) {
12
- const $xegrid = $xetable.$xegrid
13
- const proxyOpts = $xegrid ? $xegrid.proxyOpts : null
13
+ constructor ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, _vm: any, { renderHeader, renderCell, renderFooter, renderData }: any = {}) {
14
+ const tableProps = $xeTable
15
+ const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & GridPrivateMethods
16
+
17
+ const proxyOpts = $xeGrid ? $xeGrid.proxyOpts : null
14
18
  const formatter = _vm.formatter
15
19
  const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true
16
- const tableProps = $xetable
17
20
 
18
21
  const types = ['seq', 'checkbox', 'radio', 'expand', 'html']
19
22
  if (_vm.type && types.indexOf(_vm.type) === -1) {
@@ -27,7 +30,7 @@ export class ColumnInfo {
27
30
  }
28
31
  if (_vm.type === 'expand') {
29
32
  const { treeConfig } = tableProps
30
- if (treeConfig && ($xetable.treeOpts.showLine || $xetable.treeOpts.line)) {
33
+ if (treeConfig && ($xeTable.treeOpts.showLine || $xeTable.treeOpts.line)) {
31
34
  errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand'])
32
35
  }
33
36
  }
@@ -144,7 +147,7 @@ export class ColumnInfo {
144
147
  slots: _vm.slots
145
148
  })
146
149
  if (proxyOpts && proxyOpts.beforeColumn) {
147
- proxyOpts.beforeColumn({ $grid: $xegrid, column: this })
150
+ proxyOpts.beforeColumn({ $grid: $xeGrid, column: this })
148
151
  }
149
152
  }
150
153
 
@@ -31,11 +31,12 @@ function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.Co
31
31
  const tableProps = $xeTable
32
32
  const tableReactData = $xeTable as unknown as TableReactData
33
33
  const tableInternalData = $xeTable as unknown as TableInternalData
34
+ const $xeGrid = $xeTable.$xeGrid
34
35
 
35
36
  const { fixedType } = props
36
37
  const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps
37
38
  const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFooterList } = tableReactData
38
- const { scrollXStore } = tableInternalData
39
+ const { fullColumnIdData, scrollXStore } = tableInternalData
39
40
  const tooltipOpts = $xeTable.computeTooltipOpts
40
41
  const { isAllColumnDrag } = $xeTable.resizableOpts
41
42
  const columnOpts = $xeTable.computeColumnOpts
@@ -47,6 +48,7 @@ function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.Co
47
48
  return tableColumn.map((column: any, $columnIndex: any) => {
48
49
  const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column
49
50
  const colid = column.id
51
+ const colRest = fullColumnIdData[colid] || {}
50
52
  const renderOpts = editRender || cellRender
51
53
  const compConf = renderOpts ? renderer.get(renderOpts.name) : null
52
54
  const showAllTip = tooltipOpts.showAll
@@ -62,14 +64,14 @@ function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.Co
62
64
  const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable))
63
65
  const attrs: any = { colid }
64
66
  const tfOns: any = {}
65
- const columnIndex = $xeTable.getColumnIndex(column)
66
- const _columnIndex = $xeTable.getVTColumnIndex(column)
67
+ const columnIndex = colRest.index
68
+ const _columnIndex = colRest._index
67
69
  const itemIndex = _columnIndex
68
70
  const cellParams: VxeTableDefines.CellRenderFooterParams & {
69
71
  $table: VxeTableConstructor<any> & VxeTablePrivateMethods
70
72
  } = {
71
73
  $table: $xeTable,
72
- $grid: $xeTable.xegrid,
74
+ $grid: $xeGrid,
73
75
  row,
74
76
  rowIndex: _rowIndex,
75
77
  _rowIndex,
@@ -314,7 +316,7 @@ export default {
314
316
  const { fixedType, fixedColumn, tableColumn } = props
315
317
  const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps
316
318
  const { visibleColumn, fullColumnIdData } = tableInternalData
317
- const { isGroup, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData
319
+ const { isGroup, isColLoading, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData
318
320
 
319
321
  let renderColumnList = tableColumn as VxeTableDefines.ColumnInfo[]
320
322
  let isOptimizeMode = false
@@ -327,7 +329,7 @@ export default {
327
329
  }
328
330
  }
329
331
 
330
- if (fixedType || !overflowX) {
332
+ if (!isColLoading && (fixedType || !overflowX)) {
331
333
  renderColumnList = visibleColumn
332
334
  }
333
335
 
@@ -404,7 +406,10 @@ export default {
404
406
  attrs: {
405
407
  name: column.id
406
408
  },
407
- key: $columnIndex
409
+ key: $columnIndex,
410
+ style: {
411
+ width: `${column.renderWidth}px`
412
+ }
408
413
  })
409
414
  })),
410
415
  /**
@@ -3,26 +3,30 @@ import { defineVxeComponent } from '../../ui/src/comp'
3
3
  import { assembleColumn, destroyColumn } from './util'
4
4
  import { columnProps, columnWatch } from './column'
5
5
 
6
+ import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
7
+
6
8
  export default /* define-vxe-component start */ defineVxeComponent({
7
9
  name: 'VxeColgroup',
8
10
  props: columnProps,
9
11
  provide () {
10
12
  return {
11
- $xecolumn: this,
12
- $xegrid: null
13
+ $xeColumn: this,
14
+ $xeGrid: null
13
15
  }
14
16
  },
15
17
  inject: {
16
- $xetable: {
18
+ $xeTable: {
17
19
  default: null
18
20
  },
19
- $xecolumn: {
21
+ $xeColumn: {
20
22
  default: null
21
23
  }
22
24
  },
23
25
  watch: columnWatch,
24
26
  created (this: any) {
25
- this.columnConfig = this.createColumn(this.$xetable, this)
27
+ const $xeTable = this.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
28
+
29
+ this.columnConfig = this.createColumn($xeTable, this)
26
30
  },
27
31
  mounted () {
28
32
  const { $scopedSlots } = this
@@ -13,7 +13,7 @@ const cellType = 'header'
13
13
  const renderRows = (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode: boolean, cols: VxeTableDefines.ColumnInfo[], $rowIndex: number) => {
14
14
  const props = _vm
15
15
  const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
16
- const $xeGrid = $xeTable.xegrid
16
+ const $xeGrid = $xeTable.$xeGrid
17
17
  const tableProps = $xeTable
18
18
  const tableReactData = $xeTable as unknown as TableReactData
19
19
  const tableInternalData = $xeTable as unknown as TableInternalData
@@ -21,7 +21,7 @@ const renderRows = (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode
21
21
  const { fixedType } = props
22
22
  const { resizable: allResizable, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps
23
23
  const { currentColumn, dragCol, scrollXLoad, scrollYLoad, overflowX } = tableReactData
24
- const { scrollXStore } = tableInternalData
24
+ const { fullColumnIdData, scrollXStore } = tableInternalData
25
25
  const columnOpts = $xeTable.computeColumnOpts
26
26
  const columnDragOpts = $xeTable.computeColumnDragOpts
27
27
  const cellOpts = $xeTable.computeCellOpts
@@ -33,6 +33,7 @@ const renderRows = (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode
33
33
  const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column
34
34
  // const { enabled } = tooltipOpts
35
35
  const colid = column.id
36
+ const colRest = fullColumnIdData[colid] || {}
36
37
  const renderOpts = editRender || cellRender
37
38
  const compConf = renderOpts ? renderer.get(renderOpts.name) : null
38
39
  const isColGroup = column.children && column.children.length
@@ -50,8 +51,8 @@ const renderRows = (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode
50
51
  firstFilterOption = filters[0]
51
52
  hasFilter = filters.some((item: VxeColumnPropTypes.FilterItem) => item.checked)
52
53
  }
53
- const columnIndex = $xeTable.getColumnIndex(column)
54
- const _columnIndex = $xeTable.getVTColumnIndex(column)
54
+ const columnIndex = colRest.index
55
+ const _columnIndex = colRest._index
55
56
  const cellParams = { $table: $xeTable, $grid: $xeGrid, $rowIndex, column, columnIndex, $columnIndex, _columnIndex, firstFilterOption, fixed: fixedType, type: cellType, isHidden: fixedHiddenColumn, hasFilter }
56
57
  const thAttrs: Record<string, string | number | null> = {
57
58
  colid,
@@ -272,7 +273,7 @@ export default {
272
273
  const { headerColumn } = this
273
274
 
274
275
  const { mouseConfig, showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps
275
- const { isGroup, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData
276
+ const { isGroup, isColLoading, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData
276
277
  const { visibleColumn, fullColumnIdData } = tableInternalData
277
278
 
278
279
  const mouseOpts = $xeTable.computeMouseOpts
@@ -292,7 +293,7 @@ export default {
292
293
  }
293
294
  }
294
295
 
295
- if (fixedType || !overflowX) {
296
+ if (!isColLoading && (fixedType || !overflowX)) {
296
297
  renderColumnList = visibleColumn
297
298
  }
298
299
 
@@ -374,7 +375,10 @@ export default {
374
375
  attrs: {
375
376
  name: column.id
376
377
  },
377
- key: $columnIndex
378
+ key: $columnIndex,
379
+ style: {
380
+ width: `${column.renderWidth}px`
381
+ }
378
382
  })
379
383
  })),
380
384
  /**
@@ -413,8 +417,11 @@ export default {
413
417
  },
414
418
  methods: {
415
419
  uploadColumn () {
416
- const { $parent: $xetable } = this
417
- this.headerColumn = $xetable.isGroup ? convertHeaderColumnToRows(this.tableGroupColumn) : []
420
+ const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
421
+ const tableReactData = $xeTable as unknown as TableReactData
422
+
423
+ const { isGroup } = tableReactData
424
+ this.headerColumn = isGroup ? convertHeaderColumnToRows(this.tableGroupColumn) : []
418
425
  }
419
426
  } as any
420
427
  } as any