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.
@@ -5159,7 +5159,9 @@ const Methods = {
5159
5159
  tableFullData,
5160
5160
  tableFullTreeData,
5161
5161
  tableFullGroupData,
5162
- treeExpandedMaps
5162
+ treeExpandedMaps,
5163
+ rowExpandedMaps,
5164
+ selectCheckboxMaps
5163
5165
  } = internalData;
5164
5166
  const fullAllDataRowIdMaps = isReset ? {} : Object.assign({}, fullAllDataRowIdData); // 存在已删除数据
5165
5167
  const fullDataRowIdMaps = {};
@@ -5199,6 +5201,13 @@ const Methods = {
5199
5201
  rowRest.level = level;
5200
5202
  rowRest.index = currIndex;
5201
5203
  rowRest.treeIndex = index;
5204
+ // 更新缓存
5205
+ if (selectCheckboxMaps[rowid]) {
5206
+ selectCheckboxMaps[rowid] = row;
5207
+ }
5208
+ if (rowExpandedMaps[rowid]) {
5209
+ rowExpandedMaps[rowid] = row;
5210
+ }
5202
5211
  idMaps[rowid] = true;
5203
5212
  fullDataRowIdMaps[rowid] = rowRest;
5204
5213
  fullAllDataRowIdMaps[rowid] = rowRest;
@@ -13224,22 +13233,26 @@ const Methods = {
13224
13233
  ySpaceTop = Math.max(0, startIndex * defaultRowHeight);
13225
13234
  } else {
13226
13235
  const firstRow = afterFullData[startIndex];
13227
- let rowid = (0, _util.getRowid)($xeTable, firstRow);
13228
- let rowRest = fullAllDataRowIdData[rowid] || {};
13229
- ySpaceTop = rowRest.oTop || 0;
13230
- const lastRow = afterFullData[afterFullData.length - 1];
13231
- rowid = (0, _util.getRowid)($xeTable, lastRow);
13232
- rowRest = fullAllDataRowIdData[rowid] || {};
13233
- // 如果为空时还没计算完数据,保持原高度不变
13234
- if (rowRest.oTop) {
13235
- sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
13236
- // 是否展开行
13237
- if (expandColumn && rowExpandedMaps[rowid]) {
13238
- sYHeight += rowRest.expandHeight || expandOpts.height || 0;
13236
+ if (firstRow) {
13237
+ let rowid = (0, _util.getRowid)($xeTable, firstRow);
13238
+ let rowRest = fullAllDataRowIdData[rowid] || {};
13239
+ ySpaceTop = rowRest.oTop || 0;
13240
+ const lastRow = afterFullData[afterFullData.length - 1];
13241
+ rowid = (0, _util.getRowid)($xeTable, lastRow);
13242
+ rowRest = fullAllDataRowIdData[rowid] || {};
13243
+ // 如果为空时还没计算完数据,保持原高度不变
13244
+ if (rowRest.oTop) {
13245
+ sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight);
13246
+ // 是否展开行
13247
+ if (expandColumn && rowExpandedMaps[rowid]) {
13248
+ sYHeight += rowRest.expandHeight || expandOpts.height || 0;
13249
+ }
13239
13250
  }
13240
- }
13241
- if (sYHeight > maxYHeight) {
13242
- isScrollYBig = true;
13251
+ if (sYHeight > maxYHeight) {
13252
+ isScrollYBig = true;
13253
+ }
13254
+ } else {
13255
+ sYHeight = bodyTableElem ? bodyTableElem.clientHeight : 0;
13243
13256
  }
13244
13257
  }
13245
13258
  } else {