vxe-table 3.15.15 → 3.15.17

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.
@@ -2682,7 +2682,7 @@ function loadTableData($xeTable, datas, isReset) {
2682
2682
  // }
2683
2683
  // }
2684
2684
  if (!(props.height || props.maxHeight)) {
2685
- errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
2685
+ errLog('vxe.error.reqProp', ['height | max-height | virtual-y-config={enabled: false}']);
2686
2686
  }
2687
2687
  // if (!props.showOverflow) {
2688
2688
  // warnLog('vxe.error.reqProp', ['table.show-overflow'])
@@ -3164,10 +3164,15 @@ const wheelScrollTopTo = (diffNum, cb) => {
3164
3164
  requestAnimationFrame(step);
3165
3165
  };
3166
3166
  function updateHeight($xeTable) {
3167
+ const reactData = $xeTable;
3167
3168
  const internalData = $xeTable;
3168
3169
  internalData.customHeight = calcTableHeight($xeTable, 'height');
3169
3170
  internalData.customMinHeight = calcTableHeight($xeTable, 'minHeight');
3170
3171
  internalData.customMaxHeight = calcTableHeight($xeTable, 'maxHeight');
3172
+ // 如果启用虚拟滚动,默认高度
3173
+ if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight)) {
3174
+ internalData.customHeight = 300;
3175
+ }
3171
3176
  }
3172
3177
  function calcColumnAutoWidth(column, wrapperEl) {
3173
3178
  const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[colid="${column.id}"]`);
@@ -4365,16 +4370,10 @@ const Methods = {
4365
4370
  }
4366
4371
  }
4367
4372
  else {
4373
+ const currMaps = isFull || (treeConfig && !transform) ? fullDataRowIdData : afterFullRowMaps;
4368
4374
  XEUtils.each(selectCheckboxMaps, (row, rowid) => {
4369
- if (isFull) {
4370
- if (fullDataRowIdData[rowid]) {
4371
- rowList.push(fullDataRowIdData[rowid].row);
4372
- }
4373
- }
4374
- else {
4375
- if (afterFullRowMaps[rowid]) {
4376
- rowList.push(afterFullRowMaps[rowid]);
4377
- }
4375
+ if (currMaps[rowid]) {
4376
+ rowList.push(fullDataRowIdData[rowid].row);
4378
4377
  }
4379
4378
  });
4380
4379
  }
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.15.15";
3
+ export const version = "3.15.17";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
@@ -201,16 +201,16 @@ VxeUI.setConfig({
201
201
  isReplace: true
202
202
  },
203
203
  virtualXConfig: {
204
- enabled: true,
204
+ enabled: false,
205
205
  gt: 24,
206
206
  preSize: 0,
207
- oSize: 1
207
+ oSize: 0
208
208
  },
209
209
  virtualYConfig: {
210
- enabled: true,
210
+ enabled: false,
211
211
  gt: 100,
212
212
  preSize: 1,
213
- oSize: 2
213
+ oSize: 0
214
214
  },
215
215
  scrollbarConfig: {
216
216
  // width: 14,
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.15.15"}`;
3
+ const version = `table v${"3.15.17"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.15.15";
2223
+ const version = "3.15.17";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2421,16 +2421,16 @@ core_.VxeUI.setConfig({
2421
2421
  isReplace: true
2422
2422
  },
2423
2423
  virtualXConfig: {
2424
- enabled: true,
2424
+ enabled: false,
2425
2425
  gt: 24,
2426
2426
  preSize: 0,
2427
- oSize: 1
2427
+ oSize: 0
2428
2428
  },
2429
2429
  virtualYConfig: {
2430
- enabled: true,
2430
+ enabled: false,
2431
2431
  gt: 100,
2432
2432
  preSize: 1,
2433
- oSize: 2
2433
+ oSize: 0
2434
2434
  },
2435
2435
  scrollbarConfig: {
2436
2436
  // width: 14,
@@ -2858,7 +2858,7 @@ function isNodeElement(elem) {
2858
2858
  const {
2859
2859
  log: log_log
2860
2860
  } = core_.VxeUI;
2861
- const log_version = `table v${"3.15.15"}`;
2861
+ const log_version = `table v${"3.15.17"}`;
2862
2862
  const warnLog = log_log.create('warn', log_version);
2863
2863
  const errLog = log_log.create('error', log_version);
2864
2864
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -8471,7 +8471,7 @@ function loadTableData($xeTable, datas, isReset) {
8471
8471
  // }
8472
8472
  // }
8473
8473
  if (!(props.height || props.maxHeight)) {
8474
- errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
8474
+ errLog('vxe.error.reqProp', ['height | max-height | virtual-y-config={enabled: false}']);
8475
8475
  }
8476
8476
  // if (!props.showOverflow) {
8477
8477
  // warnLog('vxe.error.reqProp', ['table.show-overflow'])
@@ -9015,10 +9015,15 @@ const wheelScrollTopTo = (diffNum, cb) => {
9015
9015
  requestAnimationFrame(step);
9016
9016
  };
9017
9017
  function updateHeight($xeTable) {
9018
+ const reactData = $xeTable;
9018
9019
  const internalData = $xeTable;
9019
9020
  internalData.customHeight = calcTableHeight($xeTable, 'height');
9020
9021
  internalData.customMinHeight = calcTableHeight($xeTable, 'minHeight');
9021
9022
  internalData.customMaxHeight = calcTableHeight($xeTable, 'maxHeight');
9023
+ // 如果启用虚拟滚动,默认高度
9024
+ if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight)) {
9025
+ internalData.customHeight = 300;
9026
+ }
9022
9027
  }
9023
9028
  function calcColumnAutoWidth(column, wrapperEl) {
9024
9029
  const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[colid="${column.id}"]`);
@@ -10405,15 +10410,10 @@ const Methods = {
10405
10410
  rowList = currTableData.filter(row => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField));
10406
10411
  }
10407
10412
  } else {
10413
+ const currMaps = isFull || treeConfig && !transform ? fullDataRowIdData : afterFullRowMaps;
10408
10414
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectCheckboxMaps, (row, rowid) => {
10409
- if (isFull) {
10410
- if (fullDataRowIdData[rowid]) {
10411
- rowList.push(fullDataRowIdData[rowid].row);
10412
- }
10413
- } else {
10414
- if (afterFullRowMaps[rowid]) {
10415
- rowList.push(afterFullRowMaps[rowid]);
10416
- }
10415
+ if (currMaps[rowid]) {
10416
+ rowList.push(fullDataRowIdData[rowid].row);
10417
10417
  }
10418
10418
  });
10419
10419
  }