vxe-table 4.10.6 → 4.10.8

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 (33) hide show
  1. package/es/style.css +1 -1
  2. package/es/table/module/keyboard/hook.js +2 -2
  3. package/es/table/src/body.js +2 -14
  4. package/es/table/src/table.js +7 -7
  5. package/es/table/src/util.js +3 -3
  6. package/es/ui/index.js +1 -1
  7. package/es/ui/src/log.js +1 -1
  8. package/lib/index.umd.js +16 -27
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/style.css +1 -1
  11. package/lib/table/module/keyboard/hook.js +2 -2
  12. package/lib/table/module/keyboard/hook.min.js +1 -1
  13. package/lib/table/src/body.js +2 -13
  14. package/lib/table/src/body.min.js +1 -1
  15. package/lib/table/src/table.js +7 -7
  16. package/lib/table/src/table.min.js +1 -1
  17. package/lib/table/src/util.js +3 -3
  18. package/lib/table/src/util.min.js +1 -1
  19. package/lib/ui/index.js +1 -1
  20. package/lib/ui/index.min.js +1 -1
  21. package/lib/ui/src/log.js +1 -1
  22. package/lib/ui/src/log.min.js +1 -1
  23. package/package.json +1 -1
  24. package/packages/table/module/keyboard/hook.ts +2 -2
  25. package/packages/table/src/body.ts +2 -13
  26. package/packages/table/src/table.ts +7 -7
  27. package/packages/table/src/util.ts +3 -3
  28. /package/es/{iconfont.1738985856004.ttf → iconfont.1739010729902.ttf} +0 -0
  29. /package/es/{iconfont.1738985856004.woff → iconfont.1739010729902.woff} +0 -0
  30. /package/es/{iconfont.1738985856004.woff2 → iconfont.1739010729902.woff2} +0 -0
  31. /package/lib/{iconfont.1738985856004.ttf → iconfont.1739010729902.ttf} +0 -0
  32. /package/lib/{iconfont.1738985856004.woff → iconfont.1739010729902.woff} +0 -0
  33. /package/lib/{iconfont.1738985856004.woff2 → iconfont.1739010729902.woff2} +0 -0
@@ -244,7 +244,7 @@ export default defineComponent({
244
244
  isFooter: false
245
245
  },
246
246
  scrollVMLoading: false,
247
- calcCellHeightFlag: 0,
247
+ calcCellHeightFlag: 1,
248
248
  resizeHeightFlag: 0,
249
249
  isCustomStatus: false,
250
250
  isDragRowMove: false,
@@ -893,7 +893,7 @@ export default defineComponent({
893
893
  const row = afterFullData[rIndex];
894
894
  const rowid = getRowid($xeTable, row);
895
895
  const rowRest = fullAllDataRowIdData[rowid] || {};
896
- offsetTop += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
896
+ offsetTop += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
897
897
  if (toVisibleIndex === -1 && scrollTop < offsetTop) {
898
898
  toVisibleIndex = rIndex;
899
899
  }
@@ -4150,7 +4150,7 @@ export default defineComponent({
4150
4150
  if (rowRest) {
4151
4151
  const resizeHeight = rowRest.resizeHeight;
4152
4152
  if (resizeHeight || isFull) {
4153
- const currCellHeight = resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
4153
+ const currCellHeight = resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
4154
4154
  rest[rowid] = currCellHeight;
4155
4155
  }
4156
4156
  }
@@ -4196,7 +4196,7 @@ export default defineComponent({
4196
4196
  const rowid = XEUtils.isString(rowOrId) || XEUtils.isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId);
4197
4197
  const rowRest = fullAllDataRowIdData[rowid];
4198
4198
  if (rowRest) {
4199
- return rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
4199
+ return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
4200
4200
  }
4201
4201
  return 0;
4202
4202
  },
@@ -6851,7 +6851,7 @@ export default defineComponent({
6851
6851
  return;
6852
6852
  }
6853
6853
  const defaultRowHeight = computeDefaultRowHeight.value;
6854
- const currCellHeight = rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
6854
+ const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
6855
6855
  const tableRect = tableEl.getBoundingClientRect();
6856
6856
  const trRect = trEl.getBoundingClientRect();
6857
6857
  const targetOffsetY = dragClientY - trRect.y - trEl.clientHeight;
@@ -8860,13 +8860,13 @@ export default defineComponent({
8860
8860
  const row = afterFullData[i];
8861
8861
  const rowid = getRowid($xeTable, row);
8862
8862
  const rowRest = fullAllDataRowIdData[rowid] || {};
8863
- ySpaceHeight += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
8863
+ ySpaceHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
8864
8864
  }
8865
8865
  for (let i = 0; i < startIndex; i++) {
8866
8866
  const row = afterFullData[i];
8867
8867
  const rowid = getRowid($xeTable, row);
8868
8868
  const rowRest = fullAllDataRowIdData[rowid] || {};
8869
- topSpaceHeight += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
8869
+ topSpaceHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
8870
8870
  }
8871
8871
  }
8872
8872
  }
@@ -338,7 +338,7 @@ export function calcTreeLine(params, prevRow) {
338
338
  const defaultRowHeight = computeDefaultRowHeight.value;
339
339
  const rowid = getRowid($table, row);
340
340
  const rowRest = fullAllDataRowIdData[rowid];
341
- const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight;
341
+ const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
342
342
  let expandSize = 1;
343
343
  if (prevRow) {
344
344
  expandSize = countTreeExpand(prevRow, params);
@@ -437,7 +437,7 @@ export function rowToVisible($xeTable, row) {
437
437
  }
438
438
  let scrollTop = 0;
439
439
  const rowRest = fullAllDataRowIdData[rowid] || {};
440
- const rHeight = rowRest ? (rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight) : defaultRowHeight;
440
+ const rHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
441
441
  for (let i = 0; i < afterFullData.length; i++) {
442
442
  const currRow = afterFullData[i];
443
443
  const currRowid = getRowid($xeTable, currRow);
@@ -445,7 +445,7 @@ export function rowToVisible($xeTable, row) {
445
445
  break;
446
446
  }
447
447
  const currRowRest = fullAllDataRowIdData[currRowid] || {};
448
- scrollTop += currRowRest.resizeHeight || currRowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
448
+ scrollTop += currRowRest.resizeHeight || cellOpts.height || rowOpts.height || currRowRest.height || defaultRowHeight;
449
449
  }
450
450
  if (scrollTop < bodyScrollTop) {
451
451
  return $xeTable.scrollTo(null, scrollTop - leftFixedWidth - 1);
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 = "4.10.6";
3
+ export const version = "4.10.8";
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${"4.10.6"}`;
3
+ const version = `table v${"4.10.8"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
3138
3138
  ;// ./packages/ui/index.ts
3139
3139
 
3140
3140
 
3141
- const version = "4.10.6";
3141
+ const version = "4.10.8";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3583,7 +3583,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3583
3583
  const {
3584
3584
  log: log_log
3585
3585
  } = core_.VxeUI;
3586
- const log_version = `table v${"4.10.6"}`;
3586
+ const log_version = `table v${"4.10.8"}`;
3587
3587
  const warnLog = log_log.create('warn', log_version);
3588
3588
  const errLog = log_log.create('error', log_version);
3589
3589
  ;// ./packages/table/src/columnInfo.ts
@@ -4369,7 +4369,7 @@ function calcTreeLine(params, prevRow) {
4369
4369
  const defaultRowHeight = computeDefaultRowHeight.value;
4370
4370
  const rowid = getRowid($table, row);
4371
4371
  const rowRest = fullAllDataRowIdData[rowid];
4372
- const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight;
4372
+ const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
4373
4373
  let expandSize = 1;
4374
4374
  if (prevRow) {
4375
4375
  expandSize = countTreeExpand(prevRow, params);
@@ -4495,7 +4495,7 @@ function rowToVisible($xeTable, row) {
4495
4495
  }
4496
4496
  let scrollTop = 0;
4497
4497
  const rowRest = fullAllDataRowIdData[rowid] || {};
4498
- const rHeight = rowRest ? rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight : defaultRowHeight;
4498
+ const rHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
4499
4499
  for (let i = 0; i < afterFullData.length; i++) {
4500
4500
  const currRow = afterFullData[i];
4501
4501
  const currRowid = getRowid($xeTable, currRow);
@@ -4503,7 +4503,7 @@ function rowToVisible($xeTable, row) {
4503
4503
  break;
4504
4504
  }
4505
4505
  const currRowRest = fullAllDataRowIdData[currRowid] || {};
4506
- scrollTop += currRowRest.resizeHeight || currRowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
4506
+ scrollTop += currRowRest.resizeHeight || cellOpts.height || rowOpts.height || currRowRest.height || defaultRowHeight;
4507
4507
  }
4508
4508
  if (scrollTop < bodyScrollTop) {
4509
4509
  return $xeTable.scrollTo(null, scrollTop - leftFixedWidth - 1);
@@ -6319,8 +6319,7 @@ const renderType = 'body';
6319
6319
  const rowOpts = computeRowOpts.value;
6320
6320
  const rowDragOpts = computeRowDragOpts.value;
6321
6321
  const defaultRowHeight = computeDefaultRowHeight.value;
6322
- const customCellHeight = cellOpts.height || rowOpts.height;
6323
- const currCellHeight = customCellHeight || defaultRowHeight;
6322
+ const customCellHeight = calcCellHeightFlag ? cellOpts.height || rowOpts.height : 0;
6324
6323
  const {
6325
6324
  disabledMethod: dragDisabledMethod,
6326
6325
  isCrossDrag,
@@ -6505,17 +6504,7 @@ const renderType = 'body';
6505
6504
  isDirty = $xeTable.isUpdateByRow(row, column.field);
6506
6505
  }
6507
6506
  const isVNAutoHeight = scrollYLoad && !hasEllipsis;
6508
- let cellHeight = currCellHeight;
6509
- const vnHeight = calcCellHeightFlag ? rowRest.height : 0;
6510
- if (resizeHeight) {
6511
- cellHeight = resizeHeight;
6512
- } else {
6513
- if (scrollYLoad) {
6514
- if (!hasEllipsis) {
6515
- cellHeight = vnHeight || currCellHeight;
6516
- }
6517
- }
6518
- }
6507
+ const cellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
6519
6508
  const isLastColumn = $columnIndex === columns.length - 1;
6520
6509
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
6521
6510
  let isVNPreEmptyStatus = false;
@@ -10551,7 +10540,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
10551
10540
  isFooter: false
10552
10541
  },
10553
10542
  scrollVMLoading: false,
10554
- calcCellHeightFlag: 0,
10543
+ calcCellHeightFlag: 1,
10555
10544
  resizeHeightFlag: 0,
10556
10545
  isCustomStatus: false,
10557
10546
  isDragRowMove: false,
@@ -11280,7 +11269,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
11280
11269
  const row = afterFullData[rIndex];
11281
11270
  const rowid = getRowid($xeTable, row);
11282
11271
  const rowRest = fullAllDataRowIdData[rowid] || {};
11283
- offsetTop += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
11272
+ offsetTop += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
11284
11273
  if (toVisibleIndex === -1 && scrollTop < offsetTop) {
11285
11274
  toVisibleIndex = rIndex;
11286
11275
  }
@@ -15107,7 +15096,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
15107
15096
  if (rowRest) {
15108
15097
  const resizeHeight = rowRest.resizeHeight;
15109
15098
  if (resizeHeight || isFull) {
15110
- const currCellHeight = resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
15099
+ const currCellHeight = resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
15111
15100
  rest[rowid] = currCellHeight;
15112
15101
  }
15113
15102
  }
@@ -15159,7 +15148,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
15159
15148
  const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrId) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId);
15160
15149
  const rowRest = fullAllDataRowIdData[rowid];
15161
15150
  if (rowRest) {
15162
- return rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
15151
+ return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
15163
15152
  }
15164
15153
  return 0;
15165
15154
  },
@@ -18198,7 +18187,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
18198
18187
  return;
18199
18188
  }
18200
18189
  const defaultRowHeight = computeDefaultRowHeight.value;
18201
- const currCellHeight = rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
18190
+ const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
18202
18191
  const tableRect = tableEl.getBoundingClientRect();
18203
18192
  const trRect = trEl.getBoundingClientRect();
18204
18193
  const targetOffsetY = dragClientY - trRect.y - trEl.clientHeight;
@@ -20592,13 +20581,13 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
20592
20581
  const row = afterFullData[i];
20593
20582
  const rowid = getRowid($xeTable, row);
20594
20583
  const rowRest = fullAllDataRowIdData[rowid] || {};
20595
- ySpaceHeight += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
20584
+ ySpaceHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
20596
20585
  }
20597
20586
  for (let i = 0; i < startIndex; i++) {
20598
20587
  const row = afterFullData[i];
20599
20588
  const rowid = getRowid($xeTable, row);
20600
20589
  const rowRest = fullAllDataRowIdData[rowid] || {};
20601
- topSpaceHeight += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
20590
+ topSpaceHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
20602
20591
  }
20603
20592
  }
20604
20593
  } else {
@@ -25660,7 +25649,7 @@ keyboard_hook_hooks.add('tableKeyboardModule', {
25660
25649
  const item = afterFullData[i];
25661
25650
  const rowid = $xeTable.getRowid(item);
25662
25651
  const rowRest = fullAllDataRowIdData[rowid] || {};
25663
- countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight;
25652
+ countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
25664
25653
  rangeRows.push(item);
25665
25654
  if (countHeight > moveSize) {
25666
25655
  return rangeRows;
@@ -25671,7 +25660,7 @@ keyboard_hook_hooks.add('tableKeyboardModule', {
25671
25660
  const item = afterFullData[len];
25672
25661
  const rowid = $xeTable.getRowid(item);
25673
25662
  const rowRest = fullAllDataRowIdData[rowid] || {};
25674
- countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight;
25663
+ countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
25675
25664
  rangeRows.push(item);
25676
25665
  if (countHeight > moveSize) {
25677
25666
  return rangeRows;