vxe-table 3.19.9 → 3.19.10

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.
@@ -4387,7 +4387,7 @@ const Methods = {
4387
4387
  const internalData = $xeTable;
4388
4388
  const { treeConfig } = props;
4389
4389
  const { isRowGroupStatus } = reactData;
4390
- const { currKeyField, fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps } = internalData;
4390
+ const { currKeyField, fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps, rowExpandedMaps, selectCheckboxMaps } = internalData;
4391
4391
  const fullAllDataRowIdMaps = isReset ? {} : Object.assign({}, fullAllDataRowIdData); // 存在已删除数据
4392
4392
  const fullDataRowIdMaps = {};
4393
4393
  const idMaps = {};
@@ -4408,6 +4408,13 @@ const Methods = {
4408
4408
  rowRest.level = level;
4409
4409
  rowRest.index = currIndex;
4410
4410
  rowRest.treeIndex = index;
4411
+ // 更新缓存
4412
+ if (selectCheckboxMaps[rowid]) {
4413
+ selectCheckboxMaps[rowid] = row;
4414
+ }
4415
+ if (rowExpandedMaps[rowid]) {
4416
+ rowExpandedMaps[rowid] = row;
4417
+ }
4411
4418
  idMaps[rowid] = true;
4412
4419
  fullDataRowIdMaps[rowid] = rowRest;
4413
4420
  fullAllDataRowIdMaps[rowid] = rowRest;
@@ -11327,22 +11334,27 @@ const Methods = {
11327
11334
  }
11328
11335
  else {
11329
11336
  const firstRow = afterFullData[startIndex];
11330
- let rowid = getRowid($xeTable, firstRow);
11331
- let rowRest = fullAllDataRowIdData[rowid] || {};
11332
- ySpaceTop = (rowRest.oTop || 0);
11333
- const lastRow = afterFullData[afterFullData.length - 1];
11334
- rowid = getRowid($xeTable, lastRow);
11335
- rowRest = fullAllDataRowIdData[rowid] || {};
11336
- // 如果为空时还没计算完数据,保持原高度不变
11337
- if (rowRest.oTop) {
11338
- sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
11339
- // 是否展开行
11340
- if (expandColumn && rowExpandedMaps[rowid]) {
11341
- sYHeight += rowRest.expandHeight || expandOpts.height || 0;
11337
+ if (firstRow) {
11338
+ let rowid = getRowid($xeTable, firstRow);
11339
+ let rowRest = fullAllDataRowIdData[rowid] || {};
11340
+ ySpaceTop = (rowRest.oTop || 0);
11341
+ const lastRow = afterFullData[afterFullData.length - 1];
11342
+ rowid = getRowid($xeTable, lastRow);
11343
+ rowRest = fullAllDataRowIdData[rowid] || {};
11344
+ // 如果为空时还没计算完数据,保持原高度不变
11345
+ if (rowRest.oTop) {
11346
+ sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
11347
+ // 是否展开行
11348
+ if (expandColumn && rowExpandedMaps[rowid]) {
11349
+ sYHeight += rowRest.expandHeight || expandOpts.height || 0;
11350
+ }
11351
+ }
11352
+ if (sYHeight > maxYHeight) {
11353
+ isScrollYBig = true;
11342
11354
  }
11343
11355
  }
11344
- if (sYHeight > maxYHeight) {
11345
- isScrollYBig = true;
11356
+ else {
11357
+ sYHeight = bodyTableElem ? bodyTableElem.clientHeight : 0;
11346
11358
  }
11347
11359
  }
11348
11360
  }
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
- export const version = "3.19.9";
3
+ export const version = "3.19.10";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.19.9"}`;
3
+ const version = `table v${"3.19.10"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
2005
2005
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2006
2006
 
2007
2007
 
2008
- const version = "3.19.9";
2008
+ const version = "3.19.10";
2009
2009
  core_.VxeUI.version = version;
2010
2010
  core_.VxeUI.tableVersion = version;
2011
2011
  core_.VxeUI.setConfig({
@@ -2713,7 +2713,7 @@ function isNodeElement(elem) {
2713
2713
  const {
2714
2714
  log: log_log
2715
2715
  } = core_.VxeUI;
2716
- const log_version = `table v${"3.19.9"}`;
2716
+ const log_version = `table v${"3.19.10"}`;
2717
2717
  const warnLog = log_log.create('warn', log_version);
2718
2718
  const errLog = log_log.create('error', log_version);
2719
2719
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -11047,7 +11047,9 @@ const Methods = {
11047
11047
  tableFullData,
11048
11048
  tableFullTreeData,
11049
11049
  tableFullGroupData,
11050
- treeExpandedMaps
11050
+ treeExpandedMaps,
11051
+ rowExpandedMaps,
11052
+ selectCheckboxMaps
11051
11053
  } = internalData;
11052
11054
  const fullAllDataRowIdMaps = isReset ? {} : {
11053
11055
  ...fullAllDataRowIdData
@@ -11089,6 +11091,13 @@ const Methods = {
11089
11091
  rowRest.level = level;
11090
11092
  rowRest.index = currIndex;
11091
11093
  rowRest.treeIndex = index;
11094
+ // 更新缓存
11095
+ if (selectCheckboxMaps[rowid]) {
11096
+ selectCheckboxMaps[rowid] = row;
11097
+ }
11098
+ if (rowExpandedMaps[rowid]) {
11099
+ rowExpandedMaps[rowid] = row;
11100
+ }
11092
11101
  idMaps[rowid] = true;
11093
11102
  fullDataRowIdMaps[rowid] = rowRest;
11094
11103
  fullAllDataRowIdMaps[rowid] = rowRest;
@@ -19122,22 +19131,26 @@ const Methods = {
19122
19131
  ySpaceTop = Math.max(0, startIndex * defaultRowHeight);
19123
19132
  } else {
19124
19133
  const firstRow = afterFullData[startIndex];
19125
- let rowid = getRowid($xeTable, firstRow);
19126
- let rowRest = fullAllDataRowIdData[rowid] || {};
19127
- ySpaceTop = rowRest.oTop || 0;
19128
- const lastRow = afterFullData[afterFullData.length - 1];
19129
- rowid = getRowid($xeTable, lastRow);
19130
- rowRest = fullAllDataRowIdData[rowid] || {};
19131
- // 如果为空时还没计算完数据,保持原高度不变
19132
- if (rowRest.oTop) {
19133
- sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
19134
- // 是否展开行
19135
- if (expandColumn && rowExpandedMaps[rowid]) {
19136
- sYHeight += rowRest.expandHeight || expandOpts.height || 0;
19134
+ if (firstRow) {
19135
+ let rowid = getRowid($xeTable, firstRow);
19136
+ let rowRest = fullAllDataRowIdData[rowid] || {};
19137
+ ySpaceTop = rowRest.oTop || 0;
19138
+ const lastRow = afterFullData[afterFullData.length - 1];
19139
+ rowid = getRowid($xeTable, lastRow);
19140
+ rowRest = fullAllDataRowIdData[rowid] || {};
19141
+ // 如果为空时还没计算完数据,保持原高度不变
19142
+ if (rowRest.oTop) {
19143
+ sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
19144
+ // 是否展开行
19145
+ if (expandColumn && rowExpandedMaps[rowid]) {
19146
+ sYHeight += rowRest.expandHeight || expandOpts.height || 0;
19147
+ }
19137
19148
  }
19138
- }
19139
- if (sYHeight > maxYHeight) {
19140
- isScrollYBig = true;
19149
+ if (sYHeight > maxYHeight) {
19150
+ isScrollYBig = true;
19151
+ }
19152
+ } else {
19153
+ sYHeight = bodyTableElem ? bodyTableElem.clientHeight : 0;
19141
19154
  }
19142
19155
  }
19143
19156
  } else {