vxe-table 3.12.10-beta.20 → 3.12.10-beta.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 (44) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/src/body.js +1 -1
  6. package/es/table/src/methods.js +149 -106
  7. package/es/table/style.css +2 -8
  8. package/es/table/style.min.css +1 -1
  9. package/es/ui/index.js +3 -3
  10. package/es/ui/src/log.js +1 -1
  11. package/es/vxe-table/style.css +2 -8
  12. package/es/vxe-table/style.min.css +1 -1
  13. package/lib/index.css +1 -1
  14. package/lib/index.min.css +1 -1
  15. package/lib/index.umd.js +164 -116
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/style.css +1 -1
  18. package/lib/style.min.css +1 -1
  19. package/lib/table/src/body.js +1 -1
  20. package/lib/table/src/body.min.js +1 -1
  21. package/lib/table/src/methods.js +159 -111
  22. package/lib/table/src/methods.min.js +1 -1
  23. package/lib/table/style/style.css +2 -8
  24. package/lib/table/style/style.min.css +1 -1
  25. package/lib/ui/index.js +3 -3
  26. package/lib/ui/index.min.js +1 -1
  27. package/lib/ui/src/log.js +1 -1
  28. package/lib/ui/src/log.min.js +1 -1
  29. package/lib/vxe-table/style/style.css +2 -8
  30. package/lib/vxe-table/style/style.min.css +1 -1
  31. package/package.json +1 -1
  32. package/packages/table/src/body.ts +1 -1
  33. package/packages/table/src/methods.ts +152 -106
  34. package/packages/ui/index.ts +2 -2
  35. package/styles/components/table.scss +2 -22
  36. package/styles/theme/dark.scss +1 -0
  37. package/styles/theme/light.scss +1 -0
  38. package/styles/variable.scss +1 -0
  39. /package/es/{iconfont.1737108347221.ttf → iconfont.1737182271148.ttf} +0 -0
  40. /package/es/{iconfont.1737108347221.woff → iconfont.1737182271148.woff} +0 -0
  41. /package/es/{iconfont.1737108347221.woff2 → iconfont.1737182271148.woff2} +0 -0
  42. /package/lib/{iconfont.1737108347221.ttf → iconfont.1737182271148.ttf} +0 -0
  43. /package/lib/{iconfont.1737108347221.woff → iconfont.1737182271148.woff} +0 -0
  44. /package/lib/{iconfont.1737108347221.woff2 → iconfont.1737182271148.woff2} +0 -0
@@ -391,13 +391,15 @@ function updateStyle($xeTable) {
391
391
  const reactData = $xeTable;
392
392
  const internalData = $xeTable;
393
393
  const { border, showOverflow: allColumnOverflow, showHeaderOverflow: allColumnHeaderOverflow, showFooterOverflow: allColumnFooterOverflow, mouseConfig, spanMethod, footerSpanMethod } = props;
394
- const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, scrollbarWidth, scrollbarHeight, columnStore, editStore, isAllOverflow, expandColumn } = reactData;
394
+ const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, columnStore, editStore, isAllOverflow, expandColumn } = reactData;
395
395
  const { visibleColumn, fullColumnIdData, tableHeight, tableWidth, headerHeight, footerHeight, elemStore, customHeight, customMinHeight, customMaxHeight } = internalData;
396
396
  const el = $xeTable.$refs.refElem;
397
397
  if (!el) {
398
398
  return;
399
399
  }
400
400
  const containerList = ['main', 'left', 'right'];
401
+ const osbWidth = overflowY ? scrollbarWidth : 0;
402
+ const osbHeight = overflowX ? scrollbarHeight : 0;
401
403
  const emptyPlaceholderElem = $xeTable.$refs.refEmptyPlaceholder;
402
404
  const cellOffsetWidth = $xeTable.computeCellOffsetWidth;
403
405
  const mouseOpts = $xeTable.computeMouseOpts;
@@ -405,16 +407,16 @@ function updateStyle($xeTable) {
405
407
  const bodyTableElem = getRefElem(elemStore['main-body-table']);
406
408
  if (emptyPlaceholderElem) {
407
409
  emptyPlaceholderElem.style.top = `${headerHeight}px`;
408
- emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - scrollbarHeight}px` : '';
410
+ emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - osbHeight}px` : '';
409
411
  }
410
412
  let bodyHeight = 0;
411
413
  let bodyMaxHeight = 0;
412
- const bodyMinHeight = customMinHeight - headerHeight - footerHeight - scrollbarHeight;
414
+ const bodyMinHeight = customMinHeight - headerHeight - footerHeight - osbHeight;
413
415
  if (customMaxHeight) {
414
- bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight - headerHeight - footerHeight - scrollbarHeight);
416
+ bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight - headerHeight - footerHeight - osbHeight);
415
417
  }
416
418
  if (customHeight) {
417
- bodyHeight = customHeight - headerHeight - footerHeight - scrollbarHeight;
419
+ bodyHeight = customHeight - headerHeight - footerHeight - osbHeight;
418
420
  }
419
421
  if (!bodyHeight) {
420
422
  if (bodyTableElem) {
@@ -432,27 +434,27 @@ function updateStyle($xeTable) {
432
434
  const scrollbarXToTop = $xeTable.computeScrollbarXToTop;
433
435
  const scrollXVirtualEl = $xeTable.$refs.refScrollXVirtualElem;
434
436
  if (scrollXVirtualEl) {
435
- scrollXVirtualEl.style.height = `${scrollbarHeight}px`;
436
- scrollXVirtualEl.style.visibility = scrollbarHeight ? 'visible' : 'hidden';
437
+ scrollXVirtualEl.style.height = `${osbHeight}px`;
438
+ scrollXVirtualEl.style.visibility = overflowX ? 'visible' : 'hidden';
437
439
  }
438
440
  const xWrapperEl = $xeTable.$refs.refScrollXWrapperElem;
439
441
  if (xWrapperEl) {
440
- xWrapperEl.style.left = scrollbarXToTop ? `${scrollbarWidth}px` : '';
441
- xWrapperEl.style.width = `${el.clientWidth - scrollbarWidth}px`;
442
+ xWrapperEl.style.left = scrollbarXToTop ? `${osbWidth}px` : '';
443
+ xWrapperEl.style.width = `${el.clientWidth - osbWidth}px`;
442
444
  }
443
445
  if (xLeftCornerEl) {
444
- xLeftCornerEl.style.width = scrollbarXToTop ? `${scrollbarWidth}px` : '';
445
- xLeftCornerEl.style.display = scrollbarXToTop ? (scrollbarWidth && scrollbarHeight ? 'block' : '') : '';
446
+ xLeftCornerEl.style.width = scrollbarXToTop ? `${osbWidth}px` : '';
447
+ xLeftCornerEl.style.display = scrollbarXToTop ? (osbWidth && osbHeight ? 'block' : '') : '';
446
448
  }
447
449
  if (xRightCornerEl) {
448
- xRightCornerEl.style.width = scrollbarXToTop ? '' : `${scrollbarWidth}px`;
449
- xRightCornerEl.style.display = scrollbarXToTop ? '' : (scrollbarWidth && scrollbarHeight ? 'block' : '');
450
+ xRightCornerEl.style.width = scrollbarXToTop ? '' : `${osbWidth}px`;
451
+ xRightCornerEl.style.display = scrollbarXToTop ? '' : (osbWidth && osbHeight ? 'block' : '');
450
452
  }
451
453
  const scrollYVirtualEl = $xeTable.$refs.refScrollYVirtualElem;
452
454
  if (scrollYVirtualEl) {
453
- scrollYVirtualEl.style.width = `${scrollbarWidth}px`;
455
+ scrollYVirtualEl.style.width = `${osbWidth}px`;
454
456
  scrollYVirtualEl.style.height = `${bodyHeight + headerHeight + footerHeight}px`;
455
- scrollYVirtualEl.style.visibility = scrollbarWidth ? 'visible' : 'hidden';
457
+ scrollYVirtualEl.style.visibility = overflowY ? 'visible' : 'hidden';
456
458
  }
457
459
  const yTopCornerEl = $xeTable.$refs.refScrollYTopCornerElem;
458
460
  if (yTopCornerEl) {
@@ -570,7 +572,7 @@ function updateStyle($xeTable) {
570
572
  if (wrapperElem) {
571
573
  wrapperElem.style.top = `${headerHeight}px`;
572
574
  }
573
- fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : (tableHeight + headerHeight + footerHeight + scrollbarHeight)}px`;
575
+ fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : (tableHeight + headerHeight + footerHeight + osbHeight)}px`;
574
576
  fixedWrapperElem.style.width = `${fixedColumn.reduce((previous, column) => previous + column.renderWidth, 0)}px`;
575
577
  }
576
578
  let tWidth = tableWidth;
@@ -600,7 +602,7 @@ function updateStyle($xeTable) {
600
602
  if (tableElem) {
601
603
  tableElem.style.width = tWidth ? `${tWidth}px` : '';
602
604
  // 兼容性处理
603
- tableElem.style.paddingRight = scrollbarWidth && fixedType && (browse['-moz'] || browse.safari) ? `${scrollbarWidth}px` : '';
605
+ tableElem.style.paddingRight = osbWidth && fixedType && (browse['-moz'] || browse.safari) ? `${osbWidth}px` : '';
604
606
  }
605
607
  const emptyBlockElem = getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);
606
608
  if (emptyBlockElem) {
@@ -637,7 +639,7 @@ function updateStyle($xeTable) {
637
639
  // 如果是固定列
638
640
  if (fixedWrapperElem) {
639
641
  if (wrapperElem) {
640
- wrapperElem.style.top = `${customHeight > 0 ? customHeight - footerHeight - scrollbarHeight : tableHeight + headerHeight}px`;
642
+ wrapperElem.style.top = `${customHeight > 0 ? customHeight - footerHeight - osbHeight : tableHeight + headerHeight}px`;
641
643
  }
642
644
  }
643
645
  }
@@ -1013,7 +1015,7 @@ function autoCellWidth($xeTable) {
1013
1015
  }
1014
1016
  const tableHeight = bodyElem.offsetHeight;
1015
1017
  const overflowY = yHandleEl.scrollHeight > yHandleEl.clientHeight;
1016
- reactData.scrollbarWidth = overflowY ? Math.max(scrollbarOpts.width || 0, yHandleEl.offsetWidth - yHandleEl.clientWidth) : 0;
1018
+ reactData.scrollbarWidth = Math.max(scrollbarOpts.width || 0, yHandleEl.offsetWidth - yHandleEl.clientWidth);
1017
1019
  reactData.overflowY = overflowY;
1018
1020
  internalData.tableWidth = tableWidth;
1019
1021
  internalData.tableHeight = tableHeight;
@@ -1022,7 +1024,7 @@ function autoCellWidth($xeTable) {
1022
1024
  const headerHeight = headerTableElem ? headerTableElem.clientHeight : 0;
1023
1025
  const overflowX = tableWidth > bodyWidth;
1024
1026
  const footerHeight = footerTableElem ? footerTableElem.clientHeight : 0;
1025
- reactData.scrollbarHeight = overflowX ? Math.max(scrollbarOpts.height || 0, xHandleEl.offsetHeight - xHandleEl.clientHeight) : 0;
1027
+ reactData.scrollbarHeight = Math.max(scrollbarOpts.height || 0, xHandleEl.offsetHeight - xHandleEl.clientHeight);
1026
1028
  internalData.headerHeight = headerHeight;
1027
1029
  internalData.footerHeight = footerHeight;
1028
1030
  reactData.overflowX = overflowX;
@@ -1202,9 +1204,11 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
1202
1204
  if (!el) {
1203
1205
  return;
1204
1206
  }
1205
- const { scrollbarWidth, scrollbarHeight } = reactData;
1207
+ const { overflowX, scrollbarWidth, overflowY, scrollbarHeight } = reactData;
1206
1208
  const { prevDragToChild } = internalData;
1207
1209
  const wrapperRect = el.getBoundingClientRect();
1210
+ const osbWidth = overflowY ? scrollbarWidth : 0;
1211
+ const osbHeight = overflowX ? scrollbarHeight : 0;
1208
1212
  const tableWidth = el.clientWidth;
1209
1213
  const tableHeight = el.clientHeight;
1210
1214
  if (trEl) {
@@ -1215,14 +1219,14 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
1215
1219
  const trRect = trEl.getBoundingClientRect();
1216
1220
  let trHeight = trEl.clientHeight;
1217
1221
  const offsetTop = Math.max(1, trRect.y - wrapperRect.y);
1218
- if (offsetTop + trHeight > tableHeight - scrollbarHeight) {
1219
- trHeight = tableHeight - offsetTop - scrollbarHeight;
1222
+ if (offsetTop + trHeight > tableHeight - osbHeight) {
1223
+ trHeight = tableHeight - offsetTop - osbHeight;
1220
1224
  }
1221
1225
  rdLineEl.style.display = 'block';
1222
- rdLineEl.style.left = `${scrollbarYToLeft ? scrollbarWidth : 0}px`;
1226
+ rdLineEl.style.left = `${scrollbarYToLeft ? osbWidth : 0}px`;
1223
1227
  rdLineEl.style.top = `${offsetTop}px`;
1224
1228
  rdLineEl.style.height = `${trHeight}px`;
1225
- rdLineEl.style.width = `${tableWidth - scrollbarWidth}px`;
1229
+ rdLineEl.style.width = `${tableWidth - osbWidth}px`;
1226
1230
  rdLineEl.setAttribute('drag-pos', dragPos);
1227
1231
  rdLineEl.setAttribute('drag-to-child', prevDragToChild ? 'y' : 'n');
1228
1232
  }
@@ -1249,7 +1253,7 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
1249
1253
  thWidth -= startX - offsetLeft;
1250
1254
  offsetLeft = startX;
1251
1255
  }
1252
- const endX = tableWidth - rightContainerWidth - (rightContainerWidth ? 0 : scrollbarWidth);
1256
+ const endX = tableWidth - rightContainerWidth - (rightContainerWidth ? 0 : osbWidth);
1253
1257
  if (offsetLeft + thWidth > endX) {
1254
1258
  thWidth = endX - offsetLeft;
1255
1259
  }
@@ -1261,7 +1265,7 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
1261
1265
  cdLineEl.style.height = `${thRect.height}px`;
1262
1266
  }
1263
1267
  else {
1264
- cdLineEl.style.height = `${tableHeight - offsetTop - (scrollbarXToTop ? 0 : scrollbarHeight)}px`;
1268
+ cdLineEl.style.height = `${tableHeight - offsetTop - (scrollbarXToTop ? 0 : osbHeight)}px`;
1265
1269
  }
1266
1270
  cdLineEl.setAttribute('drag-pos', dragPos);
1267
1271
  cdLineEl.setAttribute('drag-to-child', prevDragToChild ? 'y' : 'n');
@@ -1300,6 +1304,9 @@ function hideDropTip($xeTable) {
1300
1304
  */
1301
1305
  function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
1302
1306
  const reactData = $xeTable;
1307
+ if (!overflowElem) {
1308
+ return $xeTable.$nextTick();
1309
+ }
1303
1310
  params.cell = tdEl;
1304
1311
  const { tooltipStore } = reactData;
1305
1312
  const tooltipOpts = $xeTable.computeTooltipOpts;
@@ -1674,6 +1681,42 @@ function loadScrollYData($xeTable, scrollTop) {
1674
1681
  }
1675
1682
  }
1676
1683
  }
1684
+ function lazyScrollXData($xeTable) {
1685
+ const internalData = $xeTable;
1686
+ const { lxTimeout, lxRunTime, scrollXStore } = internalData;
1687
+ const { visibleSize } = scrollXStore;
1688
+ const fpsTime = Math.max(5, Math.min(10, Math.floor(visibleSize / 3)));
1689
+ if (lxTimeout) {
1690
+ clearTimeout(lxTimeout);
1691
+ }
1692
+ if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
1693
+ internalData.lxRunTime = Date.now();
1694
+ loadScrollXData($xeTable);
1695
+ }
1696
+ internalData.lxTimeout = setTimeout(() => {
1697
+ internalData.lxTimeout = undefined;
1698
+ internalData.lxRunTime = undefined;
1699
+ loadScrollXData($xeTable);
1700
+ }, fpsTime);
1701
+ }
1702
+ function lazyScrollYData($xeTable) {
1703
+ const internalData = $xeTable;
1704
+ const { lyTimeout, lyRunTime, scrollYStore } = internalData;
1705
+ const { visibleSize } = scrollYStore;
1706
+ const fpsTime = Math.floor(Math.max(4, Math.min(10, visibleSize / 3)));
1707
+ if (lyTimeout) {
1708
+ clearTimeout(lyTimeout);
1709
+ }
1710
+ if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
1711
+ internalData.lyRunTime = Date.now();
1712
+ loadScrollYData($xeTable);
1713
+ }
1714
+ internalData.lyTimeout = setTimeout(() => {
1715
+ internalData.lyTimeout = undefined;
1716
+ internalData.lyRunTime = undefined;
1717
+ loadScrollYData($xeTable);
1718
+ }, fpsTime);
1719
+ }
1677
1720
  function checkLastSyncScroll($xeTable, isRollX, isRollY) {
1678
1721
  const reactData = $xeTable;
1679
1722
  const internalData = $xeTable;
@@ -1705,6 +1748,48 @@ function checkLastSyncScroll($xeTable, isRollX, isRollY) {
1705
1748
  $xeTable.updateCellAreas();
1706
1749
  }, 200);
1707
1750
  }
1751
+ const getWheelSpeed = (lastScrollTime) => {
1752
+ let multiple = 1;
1753
+ const currTime = Date.now();
1754
+ if (lastScrollTime + 25 > currTime) {
1755
+ multiple = 1.18;
1756
+ }
1757
+ else if (lastScrollTime + 30 > currTime) {
1758
+ multiple = 1.15;
1759
+ }
1760
+ else if (lastScrollTime + 40 > currTime) {
1761
+ multiple = 1.12;
1762
+ }
1763
+ else if (lastScrollTime + 55 > currTime) {
1764
+ multiple = 1.09;
1765
+ }
1766
+ else if (lastScrollTime + 75 > currTime) {
1767
+ multiple = 1.06;
1768
+ }
1769
+ else if (lastScrollTime + 100 > currTime) {
1770
+ multiple = 1.03;
1771
+ }
1772
+ return multiple;
1773
+ };
1774
+ const wheelScrollTo = (diffNum, cb) => {
1775
+ const duration = Math.abs(diffNum);
1776
+ const startTime = performance.now();
1777
+ let countTop = 0;
1778
+ const step = (timestamp) => {
1779
+ let progress = (timestamp - startTime) / duration;
1780
+ if (progress > 1) {
1781
+ progress = 1;
1782
+ }
1783
+ const easedProgress = Math.pow(progress, 2);
1784
+ const offsetTop = Math.floor((diffNum * easedProgress)) - countTop;
1785
+ countTop += offsetTop;
1786
+ cb(offsetTop);
1787
+ if (progress < 1) {
1788
+ requestAnimationFrame(step);
1789
+ }
1790
+ };
1791
+ requestAnimationFrame(step);
1792
+ };
1708
1793
  function updateHeight($xeTable) {
1709
1794
  const internalData = $xeTable;
1710
1795
  internalData.customHeight = calcTableHeight($xeTable, 'height');
@@ -3527,9 +3612,10 @@ const Methods = {
3527
3612
  evnt.stopPropagation();
3528
3613
  evnt.preventDefault();
3529
3614
  const { column } = params;
3530
- const { scrollbarHeight } = reactData;
3615
+ const { overflowX, scrollbarHeight } = reactData;
3531
3616
  const { elemStore, visibleColumn } = internalData;
3532
3617
  const resizableOpts = $xeTable.computeResizableOpts;
3618
+ const osbHeight = overflowX ? scrollbarHeight : 0;
3533
3619
  const tableEl = $xeTable.$refs.refElem;
3534
3620
  const leftContainerElem = $xeTable.$refs.refLeftContainer;
3535
3621
  const rightContainerElem = $xeTable.$refs.refRightContainer;
@@ -3605,8 +3691,8 @@ const Methods = {
3605
3691
  dragLeft = Math.max(left, dragMinLeft);
3606
3692
  const resizeBarLeft = Math.max(1, dragLeft - scrollLeft);
3607
3693
  resizeBarElem.style.left = `${resizeBarLeft}px`;
3608
- resizeBarElem.style.top = `${scrollbarXToTop ? scrollbarHeight : 0}px`;
3609
- resizeBarElem.style.height = `${scrollbarXToTop ? tableHeight - scrollbarHeight : tableHeight}px`;
3694
+ resizeBarElem.style.top = `${scrollbarXToTop ? osbHeight : 0}px`;
3695
+ resizeBarElem.style.height = `${scrollbarXToTop ? tableHeight - osbHeight : tableHeight}px`;
3610
3696
  if (resizableOpts.showDragTip && resizeTipElem) {
3611
3697
  resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)]);
3612
3698
  const tableWidth = tableEl.clientWidth;
@@ -3708,8 +3794,10 @@ const Methods = {
3708
3794
  evnt.stopPropagation();
3709
3795
  evnt.preventDefault();
3710
3796
  const { row } = params;
3711
- const { scrollbarWidth, scrollbarHeight } = reactData;
3797
+ const { overflowX, scrollbarWidth, overflowY, scrollbarHeight } = reactData;
3712
3798
  const { elemStore, fullAllDataRowIdData } = internalData;
3799
+ const osbWidth = overflowY ? scrollbarWidth : 0;
3800
+ const osbHeight = overflowX ? scrollbarHeight : 0;
3713
3801
  const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
3714
3802
  const resizableOpts = $xeTable.computeResizableOpts;
3715
3803
  const rowOpts = $xeTable.computeRowOpts;
@@ -3750,8 +3838,8 @@ const Methods = {
3750
3838
  const updateEvent = (evnt) => {
3751
3839
  evnt.stopPropagation();
3752
3840
  evnt.preventDefault();
3753
- const tableWidth = tableEl.clientWidth - scrollbarWidth;
3754
- const tableHeight = tableEl.clientHeight - scrollbarHeight;
3841
+ const tableWidth = tableEl.clientWidth - osbWidth;
3842
+ const tableHeight = tableEl.clientHeight - osbHeight;
3755
3843
  let dragTop = evnt.clientY - tableRect.y - targetOffsetY;
3756
3844
  if (dragTop < minTop) {
3757
3845
  dragTop = minTop;
@@ -3759,7 +3847,7 @@ const Methods = {
3759
3847
  else {
3760
3848
  resizeHeight = Math.max(cellMinHeight, currCellHeight + evnt.clientY - dragClientY);
3761
3849
  }
3762
- resizeBarElem.style.left = `${scrollbarYToLeft ? scrollbarWidth : 0}px`;
3850
+ resizeBarElem.style.left = `${scrollbarYToLeft ? osbWidth : 0}px`;
3763
3851
  resizeBarElem.style.top = `${dragTop}px`;
3764
3852
  resizeBarElem.style.width = `${tableWidth}px`;
3765
3853
  if (resizableOpts.showDragTip && resizeTipElem) {
@@ -7582,46 +7670,6 @@ const Methods = {
7582
7670
  }
7583
7671
  $xeTable.dispatchEvent('scroll', evntParams, evnt);
7584
7672
  },
7585
- lazyScrollXData() {
7586
- const $xeTable = this;
7587
- const internalData = $xeTable;
7588
- const { lxTimeout, lxRunTime, scrollXStore } = internalData;
7589
- const { visibleSize } = scrollXStore;
7590
- const fpsTime = Math.max(5, Math.min(80, Math.floor(visibleSize * 3)));
7591
- if (lxTimeout) {
7592
- clearTimeout(lxTimeout);
7593
- }
7594
- if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
7595
- internalData.lxRunTime = Date.now();
7596
- loadScrollXData($xeTable);
7597
- }
7598
- internalData.lxTimeout = setTimeout(() => {
7599
- internalData.lxTimeout = undefined;
7600
- internalData.lxRunTime = undefined;
7601
- loadScrollXData($xeTable);
7602
- }, fpsTime);
7603
- },
7604
- lazyScrollYData() {
7605
- const $xeTable = this;
7606
- const props = $xeTable;
7607
- const internalData = $xeTable;
7608
- const { showOverflow } = props;
7609
- const { lyTimeout, lyRunTime, scrollYStore } = internalData;
7610
- const { visibleSize } = scrollYStore;
7611
- const fpsTime = showOverflow ? 5 : Math.max(5, Math.min(80, Math.floor(visibleSize / 2)));
7612
- if (lyTimeout) {
7613
- clearTimeout(lyTimeout);
7614
- }
7615
- if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
7616
- internalData.lyRunTime = Date.now();
7617
- loadScrollYData($xeTable);
7618
- }
7619
- internalData.lyTimeout = setTimeout(() => {
7620
- internalData.lyTimeout = undefined;
7621
- internalData.lyRunTime = undefined;
7622
- loadScrollYData($xeTable);
7623
- }, fpsTime);
7624
- },
7625
7673
  /**
7626
7674
  * 横向 X 可视渲染事件处理
7627
7675
  */
@@ -7632,7 +7680,7 @@ const Methods = {
7632
7680
  loadScrollXData($xeTable);
7633
7681
  }
7634
7682
  else {
7635
- $xeTable.lazyScrollXData();
7683
+ lazyScrollXData($xeTable);
7636
7684
  }
7637
7685
  },
7638
7686
  /**
@@ -7645,7 +7693,7 @@ const Methods = {
7645
7693
  loadScrollYData($xeTable);
7646
7694
  }
7647
7695
  else {
7648
- $xeTable.lazyScrollYData();
7696
+ lazyScrollYData($xeTable);
7649
7697
  }
7650
7698
  },
7651
7699
  triggerBodyScrollEvent(evnt, fixedType) {
@@ -7821,27 +7869,9 @@ const Methods = {
7821
7869
  if (!bodyScrollElem) {
7822
7870
  return;
7823
7871
  }
7824
- let multiple = 1;
7825
- if (reactData.lastScrollTime + 25 > Date.now()) {
7826
- multiple = 1.18;
7827
- }
7828
- else if (reactData.lastScrollTime + 30 > Date.now()) {
7829
- multiple = 1.15;
7830
- }
7831
- else if (reactData.lastScrollTime + 40 > Date.now()) {
7832
- multiple = 1.12;
7833
- }
7834
- else if (reactData.lastScrollTime + 55 > Date.now()) {
7835
- multiple = 1.09;
7836
- }
7837
- else if (reactData.lastScrollTime + 75 > Date.now()) {
7838
- multiple = 1.06;
7839
- }
7840
- else if (reactData.lastScrollTime + 100 > Date.now()) {
7841
- multiple = 1.03;
7842
- }
7843
- const deltaTop = deltaY * multiple;
7844
- const deltaLeft = deltaX * multiple;
7872
+ const wheelSpeed = getWheelSpeed(reactData.lastScrollTime);
7873
+ const deltaTop = deltaY * wheelSpeed;
7874
+ const deltaLeft = deltaX * wheelSpeed;
7845
7875
  const isTopWheel = deltaTop < 0;
7846
7876
  const currScrollTop = bodyScrollElem.scrollTop;
7847
7877
  // 如果滚动位置已经是顶部或底部,则不需要触发
@@ -7858,16 +7888,29 @@ const Methods = {
7858
7888
  if (rowOpts.isHover || highlightHoverRow) {
7859
7889
  $xeTable.clearHoverRow();
7860
7890
  }
7861
- internalData.inWheelScroll = true;
7862
- setScrollTop(yHandleEl, scrollTop);
7863
- setScrollTop(bodyScrollElem, scrollTop);
7864
- setScrollTop(leftScrollElem, scrollTop);
7865
- setScrollTop(rightScrollElem, scrollTop);
7866
- loadScrollYData($xeTable, scrollTop);
7867
- $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
7868
- type: 'footer',
7869
- fixed: ''
7891
+ wheelScrollTo(scrollTop - bodyScrollElem.scrollTop, (offsetTop) => {
7892
+ const currTopNum = bodyScrollElem.scrollTop + offsetTop;
7893
+ internalData.inWheelScroll = true;
7894
+ setScrollTop(yHandleEl, currTopNum);
7895
+ setScrollTop(bodyScrollElem, currTopNum);
7896
+ setScrollTop(leftScrollElem, currTopNum);
7897
+ setScrollTop(rightScrollElem, currTopNum);
7898
+ $xeTable.triggerScrollYEvent(evnt);
7899
+ $xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, scrollLeft, {
7900
+ type: 'table',
7901
+ fixed: ''
7902
+ });
7870
7903
  });
7904
+ // internalData.inWheelScroll = true
7905
+ // setScrollTop(yHandleEl, scrollTop)
7906
+ // setScrollTop(bodyScrollElem, scrollTop)
7907
+ // setScrollTop(leftScrollElem, scrollTop)
7908
+ // setScrollTop(rightScrollElem, scrollTop)
7909
+ // loadScrollYData($xeTable, scrollTop)
7910
+ // $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
7911
+ // type: 'footer',
7912
+ // fixed: ''
7913
+ // })
7871
7914
  }
7872
7915
  },
7873
7916
  triggerVirtualScrollXEvent(evnt) {
@@ -2037,12 +2037,6 @@
2037
2037
  }
2038
2038
 
2039
2039
  /*scroll*/
2040
- .vxe-table.is--scroll-x:hover > .vxe-table--scroll-x-virtual .vxe-table--scroll-x-handle {
2041
- overflow-x: scroll;
2042
- }
2043
- .vxe-table.is--scroll-y:hover > .vxe-table--layout-wrapper > .vxe-table--scroll-y-virtual .vxe-table--scroll-y-handle {
2044
- overflow-y: scroll;
2045
- }
2046
2040
  .vxe-table.is--loading > .vxe-table--scroll-x-virtual {
2047
2041
  visibility: hidden;
2048
2042
  }
@@ -2080,7 +2074,7 @@
2080
2074
  }
2081
2075
  .vxe-table .vxe-table--scroll-x-handle {
2082
2076
  overflow-y: hidden;
2083
- overflow-x: auto;
2077
+ overflow-x: scroll;
2084
2078
  height: 18px;
2085
2079
  }
2086
2080
  .vxe-table .vxe-table--scroll-x-wrapper {
@@ -2094,7 +2088,7 @@
2094
2088
  top: 0;
2095
2089
  }
2096
2090
  .vxe-table .vxe-table--scroll-y-handle {
2097
- overflow-y: auto;
2091
+ overflow-y: scroll;
2098
2092
  overflow-x: hidden;
2099
2093
  width: 18px;
2100
2094
  height: 100%;