tomtaw-vxe-table 3.25.20 → 3.25.21

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 (40) hide show
  1. package/es/colgroup/index.d.ts +2 -0
  2. package/es/column/index.d.ts +2 -0
  3. package/es/table/src/body.js +58 -13
  4. package/es/table/src/column.d.ts +2 -0
  5. package/es/table/src/column.js +2 -0
  6. package/es/table/src/columnInfo.js +1 -0
  7. package/es/table/src/group.d.ts +1 -0
  8. package/es/table/src/header.d.ts +3 -1
  9. package/es/table/src/header.js +49 -12
  10. package/es/table/src/methods.js +82 -65
  11. package/es/table/src/table.js +4 -13
  12. package/es/table/src/util.js +4 -2
  13. package/es/ui/index.js +1 -1
  14. package/es/ui/src/log.js +1 -1
  15. package/lib/index.umd.js +205 -113
  16. package/lib/index.umd.min.js +3 -3
  17. package/lib/table/src/body.js +58 -13
  18. package/lib/table/src/column.js +2 -0
  19. package/lib/table/src/columnInfo.js +1 -0
  20. package/lib/table/src/header.js +48 -11
  21. package/lib/table/src/methods.js +82 -65
  22. package/lib/table/src/table.js +4 -13
  23. package/lib/table/src/util.js +4 -2
  24. package/lib/ui/index.js +1 -1
  25. package/lib/ui/src/log.js +1 -1
  26. package/package.json +1 -1
  27. package/packages/table/src/body.ts +42 -13
  28. package/packages/table/src/column.ts +2 -0
  29. package/packages/table/src/columnInfo.ts +1 -0
  30. package/packages/table/src/header.ts +53 -13
  31. package/packages/table/src/methods.ts +102 -65
  32. package/packages/table/src/table.ts +8 -16
  33. package/packages/table/src/util.ts +4 -2
  34. package/types/all.d.ts +21 -1
  35. /package/es/{iconfont.1795759903178.ttf → iconfont.1795761876277.ttf} +0 -0
  36. /package/es/{iconfont.1795759903178.woff → iconfont.1795761876277.woff} +0 -0
  37. /package/es/{iconfont.1795759903178.woff2 → iconfont.1795761876277.woff2} +0 -0
  38. /package/lib/{iconfont.1795759903178.ttf → iconfont.1795761876277.ttf} +0 -0
  39. /package/lib/{iconfont.1795759903178.woff → iconfont.1795761876277.woff} +0 -0
  40. /package/lib/{iconfont.1795759903178.woff2 → iconfont.1795761876277.woff2} +0 -0
@@ -51,6 +51,7 @@ const supportMaxRow = 5e6;
51
51
  const customStorageKey = "VXE_CUSTOM_STORE";
52
52
  const maxXWidth = 5e6;
53
53
  const sourceType = "table";
54
+ const filteredRowModels = /* @__PURE__ */ new WeakMap();
54
55
  const customStorageQueues = /* @__PURE__ */ new WeakMap();
55
56
  const pendingExpandOffsetUpdates = /* @__PURE__ */ new WeakMap();
56
57
  const expandHeightCaches = /* @__PURE__ */ new WeakMap();
@@ -748,7 +749,7 @@ function handleVirtualTreeToList($xeTable) {
748
749
  }
749
750
  return internalData.afterFullData;
750
751
  }
751
- function updateAfterFullData($xeTable) {
752
+ function updateAfterFullData($xeTable, reason) {
752
753
  const props = $xeTable;
753
754
  const reactData = $xeTable;
754
755
  const internalData = $xeTable;
@@ -766,6 +767,8 @@ function updateAfterFullData($xeTable) {
766
767
  const { remote: allRemoteSort, sortMethod: allSortMethod, multiple: sortMultiple, chronological, isDeep: isSortDeep } = sortOpts;
767
768
  let tableData = [];
768
769
  let tableTree = [];
770
+ const previousFilter = reason === "sort" ? filteredRowModels.get($xeTable) : void 0;
771
+ filteredRowModels.delete($xeTable);
769
772
  if (!allRemoteFilter || !allRemoteSort) {
770
773
  const filterColumns = [];
771
774
  let orderColumns = [];
@@ -828,7 +831,19 @@ function updateAfterFullData($xeTable) {
828
831
  });
829
832
  tableData = tableTree;
830
833
  } else {
831
- tableData = treeConfig ? tableFullTreeData.filter(handleFilter) : tableFullData.filter(handleFilter);
834
+ if (!treeConfig && filterOpts.cacheOnSort === true) {
835
+ const keys = [allFilterMethod, rendererOpts];
836
+ for (const { column, itemList } of filterColumns) {
837
+ keys.push(column, column.field, column.filterMethod, column.filterRender, itemList.length);
838
+ for (const item of itemList) keys.push(item, item.value, item.data);
839
+ }
840
+ const reuse = previousFilter && previousFilter.source === tableFullData && previousFilter.length === tableFullData.length && keys.length === previousFilter.keys.length && keys.every((value, index) => value === previousFilter.keys[index]);
841
+ const rows = reuse ? previousFilter.rows : tableFullData.filter(handleFilter);
842
+ filteredRowModels.set($xeTable, { source: tableFullData, length: tableFullData.length, keys, rows });
843
+ tableData = rows.slice();
844
+ } else {
845
+ tableData = treeConfig ? tableFullTreeData.filter(handleFilter) : tableFullData.filter(handleFilter);
846
+ }
832
847
  tableTree = tableData;
833
848
  }
834
849
  } else {
@@ -1112,7 +1127,7 @@ function updateStyle($xeTable) {
1112
1127
  if (layout === "header") {
1113
1128
  let renderColumnList = tableColumn;
1114
1129
  const isOptimizeMode = isHeaderRenderOptimize;
1115
- if (isGroup) {
1130
+ if (isGroup && !isOptimizeMode) {
1116
1131
  renderColumnList = visibleColumn;
1117
1132
  } else {
1118
1133
  if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
@@ -1125,22 +1140,9 @@ function updateStyle($xeTable) {
1125
1140
  }
1126
1141
  }
1127
1142
  const tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0);
1128
- if (fixedType) {
1129
- if (isGroup) {
1130
- if (wrapperElem) {
1131
- wrapperElem.style.width = scrollXWidth ? `${scrollXWidth}px` : "";
1132
- }
1133
- } else {
1134
- if (isOptimizeMode) {
1135
- if (wrapperElem) {
1136
- wrapperElem.style.width = tWidth ? `${tWidth}px` : "";
1137
- }
1138
- } else {
1139
- if (wrapperElem) {
1140
- wrapperElem.style.width = scrollXWidth ? `${scrollXWidth}px` : "";
1141
- }
1142
- }
1143
- }
1143
+ if (fixedType && wrapperElem) {
1144
+ const width = isOptimizeMode ? tWidth : scrollXWidth;
1145
+ wrapperElem.style.width = width ? `${width}px` : "";
1144
1146
  }
1145
1147
  if (currScrollElem) {
1146
1148
  currScrollElem.style.height = `${tHeaderHeight}px`;
@@ -1392,7 +1394,7 @@ function updateStyleWithDedupe($xeTable) {
1392
1394
  if (layout === "header") {
1393
1395
  let renderColumnList = tableColumn;
1394
1396
  const isOptimizeMode = isHeaderRenderOptimize;
1395
- if (isGroup) {
1397
+ if (isGroup && !isOptimizeMode) {
1396
1398
  renderColumnList = visibleColumn;
1397
1399
  } else {
1398
1400
  if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
@@ -1405,22 +1407,9 @@ function updateStyleWithDedupe($xeTable) {
1405
1407
  }
1406
1408
  }
1407
1409
  const tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0);
1408
- if (fixedType) {
1409
- if (isGroup) {
1410
- if (wrapperElem) {
1411
- setLayoutStyle(wrapperElem, "width", scrollXWidth ? `${scrollXWidth}px` : "");
1412
- }
1413
- } else {
1414
- if (isOptimizeMode) {
1415
- if (wrapperElem) {
1416
- setLayoutStyle(wrapperElem, "width", tWidth ? `${tWidth}px` : "");
1417
- }
1418
- } else {
1419
- if (wrapperElem) {
1420
- setLayoutStyle(wrapperElem, "width", scrollXWidth ? `${scrollXWidth}px` : "");
1421
- }
1422
- }
1423
- }
1410
+ if (fixedType && wrapperElem) {
1411
+ const width = isOptimizeMode ? tWidth : scrollXWidth;
1412
+ setLayoutStyle(wrapperElem, "width", width ? `${width}px` : "");
1424
1413
  }
1425
1414
  if (currScrollElem) {
1426
1415
  setLayoutStyle(currScrollElem, "height", `${tHeaderHeight}px`);
@@ -1517,7 +1506,7 @@ function updateStyleWithDedupe($xeTable) {
1517
1506
  }
1518
1507
  return $xeTable.$nextTick();
1519
1508
  }
1520
- function updateScrollXSpaceWithDedupe($xeTable) {
1509
+ function updateScrollXSpaceWithDedupe($xeTable, beforeWindowCommit) {
1521
1510
  const reactData = $xeTable;
1522
1511
  const internalData = $xeTable;
1523
1512
  const { scrollXLoad, overflowX, scrollXWidth } = reactData;
@@ -1593,6 +1582,7 @@ function updateScrollXSpaceWithDedupe($xeTable) {
1593
1582
  if (scrollXSpaceEl) {
1594
1583
  setLayoutStyle(scrollXSpaceEl, "width", `${ySpaceWidth}px`);
1595
1584
  }
1585
+ if (beforeWindowCommit) return;
1596
1586
  calcScrollbar($xeTable);
1597
1587
  if (isScrollXBig && mouseOpts.area) {
1598
1588
  errLog("vxe.error.notProp", ["mouse-config.area"]);
@@ -2562,7 +2552,7 @@ function handleSortEvent($xeTable, evnt, sortConfs, isUpdate) {
2562
2552
  }
2563
2553
  if (isUpdate) {
2564
2554
  if (!remote) {
2565
- $xeTable.handleTableData(true);
2555
+ $xeTable.handleTableData(true, false, "sort");
2566
2556
  }
2567
2557
  }
2568
2558
  if (evnt) {
@@ -3954,12 +3944,12 @@ function handleLoadDefaults($xeTable) {
3954
3944
  function handleInitDefaults($xeTable) {
3955
3945
  handleDefaultSort($xeTable);
3956
3946
  }
3957
- function getVirtualWindowSlice(source, previous, start, end) {
3947
+ function matchesVirtualWindow(source, previous, start, end) {
3958
3948
  const size = Math.max(0, Math.min(end, source.length) - start);
3959
- if (start >= 0 && end >= 0 && Number.isInteger(start) && Number.isInteger(end) && previous.length === size && previous.every((item, index) => item === source[start + index])) {
3960
- return previous;
3961
- }
3962
- return source.slice(start, end);
3949
+ return start >= 0 && end >= 0 && Number.isInteger(start) && Number.isInteger(end) && previous.length === size && previous.every((item, index) => item === source[start + index]);
3950
+ }
3951
+ function getVirtualWindowSlice(source, previous, start, end) {
3952
+ return matchesVirtualWindow(source, previous, start, end) ? previous : source.slice(start, end);
3963
3953
  }
3964
3954
  function handleTableColumn($xeTable, reuseWindow = false) {
3965
3955
  const reactData = $xeTable;
@@ -4008,7 +3998,7 @@ function loadScrollXData($xeTable) {
4008
3998
  if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
4009
3999
  scrollXStore.startIndex = offsetStartIndex;
4010
4000
  scrollXStore.endIndex = offsetEndIndex;
4011
- $xeTable.updateScrollXData();
4001
+ $xeTable.updateScrollXData(true);
4012
4002
  }
4013
4003
  }
4014
4004
  $xeTable.closeTooltip();
@@ -4176,6 +4166,14 @@ function buildColumnInfo($xeTable) {
4176
4166
  if (props.showCustomHeader && reactData.isGroup && (columnOpts.resizable || props.resizable)) {
4177
4167
  warnLog("vxe.error.notConflictProp", ["show-custom-header & colgroup", "column-config.resizable=false"]);
4178
4168
  }
4169
+ if (reactData.scrollXLoad && !reactData.overflowX && reactData.tableColumn.length < internalData.visibleColumn.length && !$xeTable.computeAutoWidthColumnList.length) {
4170
+ const body = getRefElem(internalData.elemStore["main-body-wrapper"]);
4171
+ if (body && body.clientWidth) {
4172
+ $xeTable.analyColumnWidth();
4173
+ autoCellWidth($xeTable);
4174
+ reactData.overflowX = reactData.scrollXWidth > body.clientWidth;
4175
+ }
4176
+ }
4179
4177
  reactData.isColLoading = false;
4180
4178
  return handleLazyRecalculate($xeTable, false, true, true);
4181
4179
  });
@@ -4317,10 +4315,12 @@ function handleSyncScroll($xeTable, isRollX, isRollY, syncGuard) {
4317
4315
  }
4318
4316
  let xRest = null;
4319
4317
  let yRest = null;
4320
- if (!isAllOverflow) {
4318
+ const { startIndex, endIndex } = internalData.scrollYStore;
4319
+ const measureAfterCommit = !isAllOverflow && !!syncGuard && isRollY && !isRollX && scrollYLoad && !reactData.expandColumn && !autoWidthColumnList.length && matchesVirtualWindow(internalData.afterFullData, reactData.tableData, startIndex, endIndex);
4320
+ if (!isAllOverflow && !measureAfterCommit) {
4321
4321
  measureScrollRowOffsets($xeTable);
4322
4322
  }
4323
- if (syncGuard) syncGuard.markMeasured();
4323
+ if (syncGuard && !measureAfterCommit) syncGuard.markMeasured();
4324
4324
  if (isRollX && scrollXLoad) {
4325
4325
  xRest = $xeTable.updateScrollXData();
4326
4326
  }
@@ -4336,8 +4336,8 @@ function handleSyncScroll($xeTable, isRollX, isRollY, syncGuard) {
4336
4336
  }
4337
4337
  if (!isAllOverflow) {
4338
4338
  measureScrollRowOffsets($xeTable);
4339
+ if (syncGuard) syncGuard.markMeasured();
4339
4340
  }
4340
- if (syncGuard) syncGuard.markMeasured();
4341
4341
  return $xeTable.updateScrollYSpace();
4342
4342
  });
4343
4343
  }
@@ -4557,7 +4557,18 @@ function handleUpdateColResize($xeTable, evnt, params) {
4557
4557
  });
4558
4558
  $xeTable.dispatchEvent("column-resizable-change", params, evnt);
4559
4559
  $xeTable.dispatchEvent("resizable-change", params, evnt);
4560
- setTimeout(() => $xeTable.recalculate(true), 300);
4560
+ const internalData = $xeTable;
4561
+ const reactData = $xeTable;
4562
+ const fixedGeometry = getUniformRowHeight($xeTable) && ($xeTable.computeCellOpts.height || $xeTable.computeRowOpts.height) && !$xeTable.treeConfig && !internalData.xeGanttView && !$xeTable.computeAutoWidthColumnList.length && !reactData.isGroup && !reactData.isRowGroupStatus && !$xeTable.headerRowStyle && !$xeTable.headerCellStyle && !$xeTable.showFooter && $xeTable.showHeaderOverflow && !internalData.visibleColumn.some((column) => column.showHeaderOverflow === false);
4563
+ const root = $xeTable.$refs.refElem;
4564
+ const width = fixedGeometry && root ? root.clientWidth : 0;
4565
+ const height = fixedGeometry && root ? root.clientHeight : 0;
4566
+ setTimeout(() => {
4567
+ if (isTableDestroyed($xeTable)) return;
4568
+ if (!fixedGeometry || !root || root.clientWidth !== width || root.clientHeight !== height) {
4569
+ $xeTable.recalculate(true);
4570
+ }
4571
+ }, 300);
4561
4572
  });
4562
4573
  }
4563
4574
  function handleUpdateRowResize($xeTable, evnt, params) {
@@ -4601,8 +4612,12 @@ function updateRowOffsetTop($xeTable, dirtyIndex = 0) {
4601
4612
  const rowOpts = $xeTable.computeRowOpts;
4602
4613
  const cellOpts = $xeTable.computeCellOpts;
4603
4614
  const defaultRowHeight = $xeTable.computeDefaultRowHeight;
4604
- const { handleGetRowId } = createHandleGetRowId($xeTable);
4605
4615
  const previous = rowOffsetIndexes.get($xeTable);
4616
+ const uniformHeight = cellOpts.height || rowOpts.height ? getUniformRowHeight($xeTable) : 0;
4617
+ if (uniformHeight && previous && previous.uniformHeight === uniformHeight && previous.rows === afterFullData && previous.rowOrder === internalData.afterFullRowMaps && previous.cache === fullAllDataRowIdData && previous.length === afterFullData.length) {
4618
+ return;
4619
+ }
4620
+ const { handleGetRowId } = createHandleGetRowId($xeTable);
4606
4621
  let startIndex = previous && previous.rows === afterFullData && previous.cache === fullAllDataRowIdData ? Math.max(0, Math.min(dirtyIndex, afterFullData.length)) : 0;
4607
4622
  const firstRow = afterFullData[startIndex];
4608
4623
  const firstRest = firstRow ? fullAllDataRowIdData[handleGetRowId(firstRow)] : null;
@@ -4630,6 +4645,7 @@ function updateRowOffsetTop($xeTable, dirtyIndex = 0) {
4630
4645
  cellOpts,
4631
4646
  defaultRowHeight,
4632
4647
  hasExpandColumn: !!expandColumn,
4648
+ uniformHeight,
4633
4649
  heightFlag: reactData.calcCellHeightFlag,
4634
4650
  firstChangedIndex: Infinity,
4635
4651
  resizeFlag: reactData.resizeHeightFlag
@@ -5135,7 +5151,10 @@ const tableMethods = {
5135
5151
  const rest = fullDataRowIdData[id];
5136
5152
  if (rest && rest.row === row) {
5137
5153
  rest.formatData = void 0;
5138
- if (visibleDataRowIdData[id] === row) hasVisibleRow = true;
5154
+ if (visibleDataRowIdData[id] === row) {
5155
+ rest.contentVersion = (rest.contentVersion || 0) + 1;
5156
+ hasVisibleRow = true;
5157
+ }
5139
5158
  } else {
5140
5159
  staleRow = true;
5141
5160
  }
@@ -5179,7 +5198,7 @@ const tableMethods = {
5179
5198
  setTimeout(() => handleLazyRecalculate($xeTable, false, true, true), 50);
5180
5199
  });
5181
5200
  },
5182
- handleTableData(force, reuseWindow = false) {
5201
+ handleTableData(force, reuseWindow = false, reason) {
5183
5202
  const $xeTable = this;
5184
5203
  const reactData = $xeTable;
5185
5204
  const internalData = $xeTable;
@@ -5188,7 +5207,7 @@ const tableMethods = {
5188
5207
  const $xeGanttView = internalData.xeGanttView;
5189
5208
  let fullList = internalData.afterFullData;
5190
5209
  if (force) {
5191
- updateAfterFullData($xeTable);
5210
+ updateAfterFullData($xeTable, reason);
5192
5211
  fullList = handleVirtualTreeToList($xeTable);
5193
5212
  internalData.mergeHeaderRowMaps = {};
5194
5213
  internalData.mergeHeaderColMaps = {};
@@ -7356,12 +7375,7 @@ const tableMethods = {
7356
7375
  evnt.preventDefault();
7357
7376
  const { fullColumnIdData } = internalData;
7358
7377
  const { column } = params;
7359
- let resizeColumn = column;
7360
- if (column.children && column.children.length) {
7361
- XEUtils.eachTree(column.children, (childColumn) => {
7362
- resizeColumn = childColumn;
7363
- });
7364
- }
7378
+ const resizeColumn = getLastChildColumn(column);
7365
7379
  const colid = resizeColumn.id;
7366
7380
  const colRest = fullColumnIdData[colid];
7367
7381
  const dragBtnElem = evnt.target;
@@ -11390,7 +11404,7 @@ const tableMethods = {
11390
11404
  }
11391
11405
  });
11392
11406
  if (!remote || firstSortColumn && firstSortColumn.remoteSort) {
11393
- $xeTable.handleTableData(true);
11407
+ $xeTable.handleTableData(true, false, "sort");
11394
11408
  }
11395
11409
  return $xeTable.$nextTick().then(() => {
11396
11410
  updateRowOffsetTop($xeTable);
@@ -11425,7 +11439,7 @@ const tableMethods = {
11425
11439
  clearAllSort($xeTable);
11426
11440
  }
11427
11441
  if (!sortOpts.remote) {
11428
- $xeTable.handleTableData(true);
11442
+ $xeTable.handleTableData(true, false, "sort");
11429
11443
  }
11430
11444
  return $xeTable.$nextTick().then(() => {
11431
11445
  updateRowOffsetTop($xeTable);
@@ -11455,7 +11469,7 @@ const tableMethods = {
11455
11469
  });
11456
11470
  }
11457
11471
  if (!sortOpts.remote) {
11458
- $xeTable.handleTableData(true);
11472
+ $xeTable.handleTableData(true, false, "sort");
11459
11473
  }
11460
11474
  if (!multiple) {
11461
11475
  column = sortCols[0];
@@ -12855,12 +12869,14 @@ const tableMethods = {
12855
12869
  fixed: ""
12856
12870
  });
12857
12871
  },
12858
- updateScrollXData() {
12872
+ updateScrollXData(fromScroll = false) {
12859
12873
  const $xeTable = this;
12860
12874
  const reactData = $xeTable;
12861
12875
  const { isAllOverflow } = reactData;
12876
+ const internalData = $xeTable;
12877
+ const deferLayout = fromScroll && isAllOverflow && reactData.overflowX && reactData.scrollXWidth < maxXWidth && !reactData.expandColumn && !internalData.xeGanttView && !$xeTable.computeAutoWidthColumnList.length;
12862
12878
  handleTableColumn($xeTable);
12863
- $xeTable.updateScrollXSpace();
12879
+ $xeTable.updateScrollXSpace(deferLayout);
12864
12880
  return $xeTable.$nextTick().then(() => {
12865
12881
  handleTableColumn($xeTable, true);
12866
12882
  $xeTable.updateScrollXSpace();
@@ -12870,9 +12886,9 @@ const tableMethods = {
12870
12886
  });
12871
12887
  },
12872
12888
  // 更新横向 X 可视渲染上下剩余空间大小
12873
- updateScrollXSpace() {
12889
+ updateScrollXSpace(beforeWindowCommit = false) {
12874
12890
  if (this.computeVirtualXOpts.experimentalSkipUnchangedStyle === true) {
12875
- return updateScrollXSpaceWithDedupe(this);
12891
+ return updateScrollXSpaceWithDedupe(this, beforeWindowCommit);
12876
12892
  }
12877
12893
  const $xeTable = this;
12878
12894
  const reactData = $xeTable;
@@ -12950,6 +12966,7 @@ const tableMethods = {
12950
12966
  if (scrollXSpaceEl) {
12951
12967
  scrollXSpaceEl.style.width = `${ySpaceWidth}px`;
12952
12968
  }
12969
+ if (beforeWindowCommit) return;
12953
12970
  calcScrollbar($xeTable);
12954
12971
  if (isScrollXBig && mouseOpts.area) {
12955
12972
  errLog("vxe.error.notProp", ["mouse-config.area"]);
@@ -1327,19 +1327,10 @@ var table_default = {
1327
1327
  const $xeTable = this;
1328
1328
  const props = $xeTable;
1329
1329
  const reactData = $xeTable;
1330
- const { spanMethod, footerSpanMethod, showHeaderOverflow: allColumnHeaderOverflow } = props;
1331
- const { isGroup, scrollXLoad } = reactData;
1332
- let isOptimizeMode = false;
1333
- if (isGroup) {
1334
- } else {
1335
- if (scrollXLoad && allColumnHeaderOverflow) {
1336
- if (spanMethod || footerSpanMethod) {
1337
- } else {
1338
- isOptimizeMode = true;
1339
- }
1340
- }
1341
- }
1342
- return isOptimizeMode;
1330
+ if (!reactData.scrollXLoad || !props.showHeaderOverflow || props.spanMethod || props.footerSpanMethod) return false;
1331
+ if (!reactData.isGroup) return true;
1332
+ const internalData = $xeTable;
1333
+ return !!(reactData.overflowX && !props.showCustomHeader && !props.headerRowStyle && !props.headerCellStyle && !$xeTable.computeColumnOpts.drag && !$xeTable.computeMouseOpts.area && !(reactData.mergeHeadFlag && internalData.mergeHeaderList.length) && !XEUtils.findTree(reactData.tableGroupColumn, (column) => column.visible && (column.showHeaderOverflow === false || column.width === "auto" || column.minWidth === "auto")));
1343
1334
  },
1344
1335
  computeIsBodyRenderOptimize() {
1345
1336
  const $xeTable = this;
@@ -860,8 +860,10 @@ function getFirstChildColumn(column) {
860
860
  }
861
861
  function getLastChildColumn(column) {
862
862
  const { children } = column;
863
- if (children && children.length) {
864
- return getFirstChildColumn(XEUtils.last(children));
863
+ if (children) {
864
+ for (let i = children.length - 1; i >= 0; i--) {
865
+ if (children[i].visible !== false) return getLastChildColumn(children[i]);
866
+ }
865
867
  }
866
868
  return column;
867
869
  }
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from "@vxe-ui/core";
2
2
  import { getFuncText } from "./src/utils";
3
- const version = "3.25.20";
3
+ const version = "3.25.21";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from "@vxe-ui/core";
2
2
  const { log } = VxeUI;
3
- const tableVersion = `table v${"3.25.20"}`;
3
+ const tableVersion = `table v${"3.25.21"}`;
4
4
  function createComponentLog(name) {
5
5
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : "";
6
6
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : "";