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
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.12.10-beta.20";
2223
+ const version = "3.12.10-beta.21";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2413,8 +2413,8 @@ core_.VxeUI.setConfig({
2413
2413
  oSize: 2
2414
2414
  },
2415
2415
  scrollbarConfig: {
2416
- width: 10,
2417
- height: 10
2416
+ // width: 0,
2417
+ // height: 0
2418
2418
  }
2419
2419
  },
2420
2420
  // export: {
@@ -2834,7 +2834,7 @@ function isNodeElement(elem) {
2834
2834
  const {
2835
2835
  log: log_log
2836
2836
  } = core_.VxeUI;
2837
- const log_version = `table v${"3.12.10-beta.20"}`;
2837
+ const log_version = `table v${"3.12.10-beta.21"}`;
2838
2838
  const warnLog = log_log.create('warn', log_version);
2839
2839
  const errLog = log_log.create('error', log_version);
2840
2840
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -5560,7 +5560,9 @@ function updateStyle($xeTable) {
5560
5560
  tableColumn,
5561
5561
  scrollXLoad,
5562
5562
  scrollYLoad,
5563
+ overflowX,
5563
5564
  scrollbarWidth,
5565
+ overflowY,
5564
5566
  scrollbarHeight,
5565
5567
  columnStore,
5566
5568
  editStore,
@@ -5584,6 +5586,8 @@ function updateStyle($xeTable) {
5584
5586
  return;
5585
5587
  }
5586
5588
  const containerList = ['main', 'left', 'right'];
5589
+ const osbWidth = overflowY ? scrollbarWidth : 0;
5590
+ const osbHeight = overflowX ? scrollbarHeight : 0;
5587
5591
  const emptyPlaceholderElem = $xeTable.$refs.refEmptyPlaceholder;
5588
5592
  const cellOffsetWidth = $xeTable.computeCellOffsetWidth;
5589
5593
  const mouseOpts = $xeTable.computeMouseOpts;
@@ -5591,16 +5595,16 @@ function updateStyle($xeTable) {
5591
5595
  const bodyTableElem = getRefElem(elemStore['main-body-table']);
5592
5596
  if (emptyPlaceholderElem) {
5593
5597
  emptyPlaceholderElem.style.top = `${headerHeight}px`;
5594
- emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - scrollbarHeight}px` : '';
5598
+ emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - osbHeight}px` : '';
5595
5599
  }
5596
5600
  let bodyHeight = 0;
5597
5601
  let bodyMaxHeight = 0;
5598
- const bodyMinHeight = customMinHeight - headerHeight - footerHeight - scrollbarHeight;
5602
+ const bodyMinHeight = customMinHeight - headerHeight - footerHeight - osbHeight;
5599
5603
  if (customMaxHeight) {
5600
- bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight - headerHeight - footerHeight - scrollbarHeight);
5604
+ bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight - headerHeight - footerHeight - osbHeight);
5601
5605
  }
5602
5606
  if (customHeight) {
5603
- bodyHeight = customHeight - headerHeight - footerHeight - scrollbarHeight;
5607
+ bodyHeight = customHeight - headerHeight - footerHeight - osbHeight;
5604
5608
  }
5605
5609
  if (!bodyHeight) {
5606
5610
  if (bodyTableElem) {
@@ -5618,27 +5622,27 @@ function updateStyle($xeTable) {
5618
5622
  const scrollbarXToTop = $xeTable.computeScrollbarXToTop;
5619
5623
  const scrollXVirtualEl = $xeTable.$refs.refScrollXVirtualElem;
5620
5624
  if (scrollXVirtualEl) {
5621
- scrollXVirtualEl.style.height = `${scrollbarHeight}px`;
5622
- scrollXVirtualEl.style.visibility = scrollbarHeight ? 'visible' : 'hidden';
5625
+ scrollXVirtualEl.style.height = `${osbHeight}px`;
5626
+ scrollXVirtualEl.style.visibility = overflowX ? 'visible' : 'hidden';
5623
5627
  }
5624
5628
  const xWrapperEl = $xeTable.$refs.refScrollXWrapperElem;
5625
5629
  if (xWrapperEl) {
5626
- xWrapperEl.style.left = scrollbarXToTop ? `${scrollbarWidth}px` : '';
5627
- xWrapperEl.style.width = `${el.clientWidth - scrollbarWidth}px`;
5630
+ xWrapperEl.style.left = scrollbarXToTop ? `${osbWidth}px` : '';
5631
+ xWrapperEl.style.width = `${el.clientWidth - osbWidth}px`;
5628
5632
  }
5629
5633
  if (xLeftCornerEl) {
5630
- xLeftCornerEl.style.width = scrollbarXToTop ? `${scrollbarWidth}px` : '';
5631
- xLeftCornerEl.style.display = scrollbarXToTop ? scrollbarWidth && scrollbarHeight ? 'block' : '' : '';
5634
+ xLeftCornerEl.style.width = scrollbarXToTop ? `${osbWidth}px` : '';
5635
+ xLeftCornerEl.style.display = scrollbarXToTop ? osbWidth && osbHeight ? 'block' : '' : '';
5632
5636
  }
5633
5637
  if (xRightCornerEl) {
5634
- xRightCornerEl.style.width = scrollbarXToTop ? '' : `${scrollbarWidth}px`;
5635
- xRightCornerEl.style.display = scrollbarXToTop ? '' : scrollbarWidth && scrollbarHeight ? 'block' : '';
5638
+ xRightCornerEl.style.width = scrollbarXToTop ? '' : `${osbWidth}px`;
5639
+ xRightCornerEl.style.display = scrollbarXToTop ? '' : osbWidth && osbHeight ? 'block' : '';
5636
5640
  }
5637
5641
  const scrollYVirtualEl = $xeTable.$refs.refScrollYVirtualElem;
5638
5642
  if (scrollYVirtualEl) {
5639
- scrollYVirtualEl.style.width = `${scrollbarWidth}px`;
5643
+ scrollYVirtualEl.style.width = `${osbWidth}px`;
5640
5644
  scrollYVirtualEl.style.height = `${bodyHeight + headerHeight + footerHeight}px`;
5641
- scrollYVirtualEl.style.visibility = scrollbarWidth ? 'visible' : 'hidden';
5645
+ scrollYVirtualEl.style.visibility = overflowY ? 'visible' : 'hidden';
5642
5646
  }
5643
5647
  const yTopCornerEl = $xeTable.$refs.refScrollYTopCornerElem;
5644
5648
  if (yTopCornerEl) {
@@ -5757,7 +5761,7 @@ function updateStyle($xeTable) {
5757
5761
  if (wrapperElem) {
5758
5762
  wrapperElem.style.top = `${headerHeight}px`;
5759
5763
  }
5760
- fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : tableHeight + headerHeight + footerHeight + scrollbarHeight}px`;
5764
+ fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : tableHeight + headerHeight + footerHeight + osbHeight}px`;
5761
5765
  fixedWrapperElem.style.width = `${fixedColumn.reduce((previous, column) => previous + column.renderWidth, 0)}px`;
5762
5766
  }
5763
5767
  let tWidth = tableWidth;
@@ -5786,7 +5790,7 @@ function updateStyle($xeTable) {
5786
5790
  if (tableElem) {
5787
5791
  tableElem.style.width = tWidth ? `${tWidth}px` : '';
5788
5792
  // 兼容性处理
5789
- tableElem.style.paddingRight = scrollbarWidth && fixedType && (browse['-moz'] || browse.safari) ? `${scrollbarWidth}px` : '';
5793
+ tableElem.style.paddingRight = osbWidth && fixedType && (browse['-moz'] || browse.safari) ? `${osbWidth}px` : '';
5790
5794
  }
5791
5795
  const emptyBlockElem = getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);
5792
5796
  if (emptyBlockElem) {
@@ -5821,7 +5825,7 @@ function updateStyle($xeTable) {
5821
5825
  // 如果是固定列
5822
5826
  if (fixedWrapperElem) {
5823
5827
  if (wrapperElem) {
5824
- wrapperElem.style.top = `${customHeight > 0 ? customHeight - footerHeight - scrollbarHeight : tableHeight + headerHeight}px`;
5828
+ wrapperElem.style.top = `${customHeight > 0 ? customHeight - footerHeight - osbHeight : tableHeight + headerHeight}px`;
5825
5829
  }
5826
5830
  }
5827
5831
  }
@@ -6242,7 +6246,7 @@ function autoCellWidth($xeTable) {
6242
6246
  }
6243
6247
  const tableHeight = bodyElem.offsetHeight;
6244
6248
  const overflowY = yHandleEl.scrollHeight > yHandleEl.clientHeight;
6245
- reactData.scrollbarWidth = overflowY ? Math.max(scrollbarOpts.width || 0, yHandleEl.offsetWidth - yHandleEl.clientWidth) : 0;
6249
+ reactData.scrollbarWidth = Math.max(scrollbarOpts.width || 0, yHandleEl.offsetWidth - yHandleEl.clientWidth);
6246
6250
  reactData.overflowY = overflowY;
6247
6251
  internalData.tableWidth = tableWidth;
6248
6252
  internalData.tableHeight = tableHeight;
@@ -6251,7 +6255,7 @@ function autoCellWidth($xeTable) {
6251
6255
  const headerHeight = headerTableElem ? headerTableElem.clientHeight : 0;
6252
6256
  const overflowX = tableWidth > bodyWidth;
6253
6257
  const footerHeight = footerTableElem ? footerTableElem.clientHeight : 0;
6254
- reactData.scrollbarHeight = overflowX ? Math.max(scrollbarOpts.height || 0, xHandleEl.offsetHeight - xHandleEl.clientHeight) : 0;
6258
+ reactData.scrollbarHeight = Math.max(scrollbarOpts.height || 0, xHandleEl.offsetHeight - xHandleEl.clientHeight);
6255
6259
  internalData.headerHeight = headerHeight;
6256
6260
  internalData.footerHeight = footerHeight;
6257
6261
  reactData.overflowX = overflowX;
@@ -6453,13 +6457,17 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
6453
6457
  return;
6454
6458
  }
6455
6459
  const {
6460
+ overflowX,
6456
6461
  scrollbarWidth,
6462
+ overflowY,
6457
6463
  scrollbarHeight
6458
6464
  } = reactData;
6459
6465
  const {
6460
6466
  prevDragToChild
6461
6467
  } = internalData;
6462
6468
  const wrapperRect = el.getBoundingClientRect();
6469
+ const osbWidth = overflowY ? scrollbarWidth : 0;
6470
+ const osbHeight = overflowX ? scrollbarHeight : 0;
6463
6471
  const tableWidth = el.clientWidth;
6464
6472
  const tableHeight = el.clientHeight;
6465
6473
  if (trEl) {
@@ -6470,14 +6478,14 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
6470
6478
  const trRect = trEl.getBoundingClientRect();
6471
6479
  let trHeight = trEl.clientHeight;
6472
6480
  const offsetTop = Math.max(1, trRect.y - wrapperRect.y);
6473
- if (offsetTop + trHeight > tableHeight - scrollbarHeight) {
6474
- trHeight = tableHeight - offsetTop - scrollbarHeight;
6481
+ if (offsetTop + trHeight > tableHeight - osbHeight) {
6482
+ trHeight = tableHeight - offsetTop - osbHeight;
6475
6483
  }
6476
6484
  rdLineEl.style.display = 'block';
6477
- rdLineEl.style.left = `${scrollbarYToLeft ? scrollbarWidth : 0}px`;
6485
+ rdLineEl.style.left = `${scrollbarYToLeft ? osbWidth : 0}px`;
6478
6486
  rdLineEl.style.top = `${offsetTop}px`;
6479
6487
  rdLineEl.style.height = `${trHeight}px`;
6480
- rdLineEl.style.width = `${tableWidth - scrollbarWidth}px`;
6488
+ rdLineEl.style.width = `${tableWidth - osbWidth}px`;
6481
6489
  rdLineEl.setAttribute('drag-pos', dragPos);
6482
6490
  rdLineEl.setAttribute('drag-to-child', prevDragToChild ? 'y' : 'n');
6483
6491
  } else {
@@ -6502,7 +6510,7 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
6502
6510
  thWidth -= startX - offsetLeft;
6503
6511
  offsetLeft = startX;
6504
6512
  }
6505
- const endX = tableWidth - rightContainerWidth - (rightContainerWidth ? 0 : scrollbarWidth);
6513
+ const endX = tableWidth - rightContainerWidth - (rightContainerWidth ? 0 : osbWidth);
6506
6514
  if (offsetLeft + thWidth > endX) {
6507
6515
  thWidth = endX - offsetLeft;
6508
6516
  }
@@ -6513,7 +6521,7 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
6513
6521
  if (prevDragToChild) {
6514
6522
  cdLineEl.style.height = `${thRect.height}px`;
6515
6523
  } else {
6516
- cdLineEl.style.height = `${tableHeight - offsetTop - (scrollbarXToTop ? 0 : scrollbarHeight)}px`;
6524
+ cdLineEl.style.height = `${tableHeight - offsetTop - (scrollbarXToTop ? 0 : osbHeight)}px`;
6517
6525
  }
6518
6526
  cdLineEl.setAttribute('drag-pos', dragPos);
6519
6527
  cdLineEl.setAttribute('drag-to-child', prevDragToChild ? 'y' : 'n');
@@ -6551,6 +6559,9 @@ function hideDropTip($xeTable) {
6551
6559
  */
6552
6560
  function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
6553
6561
  const reactData = $xeTable;
6562
+ if (!overflowElem) {
6563
+ return $xeTable.$nextTick();
6564
+ }
6554
6565
  params.cell = tdEl;
6555
6566
  const {
6556
6567
  tooltipStore
@@ -6994,6 +7005,54 @@ function loadScrollYData($xeTable, scrollTop) {
6994
7005
  }
6995
7006
  }
6996
7007
  }
7008
+ function lazyScrollXData($xeTable) {
7009
+ const internalData = $xeTable;
7010
+ const {
7011
+ lxTimeout,
7012
+ lxRunTime,
7013
+ scrollXStore
7014
+ } = internalData;
7015
+ const {
7016
+ visibleSize
7017
+ } = scrollXStore;
7018
+ const fpsTime = Math.max(5, Math.min(10, Math.floor(visibleSize / 3)));
7019
+ if (lxTimeout) {
7020
+ clearTimeout(lxTimeout);
7021
+ }
7022
+ if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
7023
+ internalData.lxRunTime = Date.now();
7024
+ loadScrollXData($xeTable);
7025
+ }
7026
+ internalData.lxTimeout = setTimeout(() => {
7027
+ internalData.lxTimeout = undefined;
7028
+ internalData.lxRunTime = undefined;
7029
+ loadScrollXData($xeTable);
7030
+ }, fpsTime);
7031
+ }
7032
+ function lazyScrollYData($xeTable) {
7033
+ const internalData = $xeTable;
7034
+ const {
7035
+ lyTimeout,
7036
+ lyRunTime,
7037
+ scrollYStore
7038
+ } = internalData;
7039
+ const {
7040
+ visibleSize
7041
+ } = scrollYStore;
7042
+ const fpsTime = Math.floor(Math.max(4, Math.min(10, visibleSize / 3)));
7043
+ if (lyTimeout) {
7044
+ clearTimeout(lyTimeout);
7045
+ }
7046
+ if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
7047
+ internalData.lyRunTime = Date.now();
7048
+ loadScrollYData($xeTable);
7049
+ }
7050
+ internalData.lyTimeout = setTimeout(() => {
7051
+ internalData.lyTimeout = undefined;
7052
+ internalData.lyRunTime = undefined;
7053
+ loadScrollYData($xeTable);
7054
+ }, fpsTime);
7055
+ }
6997
7056
  function checkLastSyncScroll($xeTable, isRollX, isRollY) {
6998
7057
  const reactData = $xeTable;
6999
7058
  const internalData = $xeTable;
@@ -7030,6 +7089,43 @@ function checkLastSyncScroll($xeTable, isRollX, isRollY) {
7030
7089
  $xeTable.updateCellAreas();
7031
7090
  }, 200);
7032
7091
  }
7092
+ const getWheelSpeed = lastScrollTime => {
7093
+ let multiple = 1;
7094
+ const currTime = Date.now();
7095
+ if (lastScrollTime + 25 > currTime) {
7096
+ multiple = 1.18;
7097
+ } else if (lastScrollTime + 30 > currTime) {
7098
+ multiple = 1.15;
7099
+ } else if (lastScrollTime + 40 > currTime) {
7100
+ multiple = 1.12;
7101
+ } else if (lastScrollTime + 55 > currTime) {
7102
+ multiple = 1.09;
7103
+ } else if (lastScrollTime + 75 > currTime) {
7104
+ multiple = 1.06;
7105
+ } else if (lastScrollTime + 100 > currTime) {
7106
+ multiple = 1.03;
7107
+ }
7108
+ return multiple;
7109
+ };
7110
+ const wheelScrollTo = (diffNum, cb) => {
7111
+ const duration = Math.abs(diffNum);
7112
+ const startTime = performance.now();
7113
+ let countTop = 0;
7114
+ const step = timestamp => {
7115
+ let progress = (timestamp - startTime) / duration;
7116
+ if (progress > 1) {
7117
+ progress = 1;
7118
+ }
7119
+ const easedProgress = Math.pow(progress, 2);
7120
+ const offsetTop = Math.floor(diffNum * easedProgress) - countTop;
7121
+ countTop += offsetTop;
7122
+ cb(offsetTop);
7123
+ if (progress < 1) {
7124
+ requestAnimationFrame(step);
7125
+ }
7126
+ };
7127
+ requestAnimationFrame(step);
7128
+ };
7033
7129
  function updateHeight($xeTable) {
7034
7130
  const internalData = $xeTable;
7035
7131
  internalData.customHeight = calcTableHeight($xeTable, 'height');
@@ -9162,6 +9258,7 @@ const Methods = {
9162
9258
  column
9163
9259
  } = params;
9164
9260
  const {
9261
+ overflowX,
9165
9262
  scrollbarHeight
9166
9263
  } = reactData;
9167
9264
  const {
@@ -9169,6 +9266,7 @@ const Methods = {
9169
9266
  visibleColumn
9170
9267
  } = internalData;
9171
9268
  const resizableOpts = $xeTable.computeResizableOpts;
9269
+ const osbHeight = overflowX ? scrollbarHeight : 0;
9172
9270
  const tableEl = $xeTable.$refs.refElem;
9173
9271
  const leftContainerElem = $xeTable.$refs.refLeftContainer;
9174
9272
  const rightContainerElem = $xeTable.$refs.refRightContainer;
@@ -9245,8 +9343,8 @@ const Methods = {
9245
9343
  dragLeft = Math.max(left, dragMinLeft);
9246
9344
  const resizeBarLeft = Math.max(1, dragLeft - scrollLeft);
9247
9345
  resizeBarElem.style.left = `${resizeBarLeft}px`;
9248
- resizeBarElem.style.top = `${scrollbarXToTop ? scrollbarHeight : 0}px`;
9249
- resizeBarElem.style.height = `${scrollbarXToTop ? tableHeight - scrollbarHeight : tableHeight}px`;
9346
+ resizeBarElem.style.top = `${scrollbarXToTop ? osbHeight : 0}px`;
9347
+ resizeBarElem.style.height = `${scrollbarXToTop ? tableHeight - osbHeight : tableHeight}px`;
9250
9348
  if (resizableOpts.showDragTip && resizeTipElem) {
9251
9349
  resizeTipElem.textContent = methods_getI18n('vxe.table.resizeColTip', [resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)]);
9252
9350
  const tableWidth = tableEl.clientWidth;
@@ -9364,13 +9462,17 @@ const Methods = {
9364
9462
  row
9365
9463
  } = params;
9366
9464
  const {
9465
+ overflowX,
9367
9466
  scrollbarWidth,
9467
+ overflowY,
9368
9468
  scrollbarHeight
9369
9469
  } = reactData;
9370
9470
  const {
9371
9471
  elemStore,
9372
9472
  fullAllDataRowIdData
9373
9473
  } = internalData;
9474
+ const osbWidth = overflowY ? scrollbarWidth : 0;
9475
+ const osbHeight = overflowX ? scrollbarHeight : 0;
9374
9476
  const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
9375
9477
  const resizableOpts = $xeTable.computeResizableOpts;
9376
9478
  const rowOpts = $xeTable.computeRowOpts;
@@ -9413,15 +9515,15 @@ const Methods = {
9413
9515
  const updateEvent = evnt => {
9414
9516
  evnt.stopPropagation();
9415
9517
  evnt.preventDefault();
9416
- const tableWidth = tableEl.clientWidth - scrollbarWidth;
9417
- const tableHeight = tableEl.clientHeight - scrollbarHeight;
9518
+ const tableWidth = tableEl.clientWidth - osbWidth;
9519
+ const tableHeight = tableEl.clientHeight - osbHeight;
9418
9520
  let dragTop = evnt.clientY - tableRect.y - targetOffsetY;
9419
9521
  if (dragTop < minTop) {
9420
9522
  dragTop = minTop;
9421
9523
  } else {
9422
9524
  resizeHeight = Math.max(cellMinHeight, currCellHeight + evnt.clientY - dragClientY);
9423
9525
  }
9424
- resizeBarElem.style.left = `${scrollbarYToLeft ? scrollbarWidth : 0}px`;
9526
+ resizeBarElem.style.left = `${scrollbarYToLeft ? osbWidth : 0}px`;
9425
9527
  resizeBarElem.style.top = `${dragTop}px`;
9426
9528
  resizeBarElem.style.width = `${tableWidth}px`;
9427
9529
  if (resizableOpts.showDragTip && resizeTipElem) {
@@ -13999,60 +14101,6 @@ const Methods = {
13999
14101
  }
14000
14102
  $xeTable.dispatchEvent('scroll', evntParams, evnt);
14001
14103
  },
14002
- lazyScrollXData() {
14003
- const $xeTable = this;
14004
- const internalData = $xeTable;
14005
- const {
14006
- lxTimeout,
14007
- lxRunTime,
14008
- scrollXStore
14009
- } = internalData;
14010
- const {
14011
- visibleSize
14012
- } = scrollXStore;
14013
- const fpsTime = Math.max(5, Math.min(80, Math.floor(visibleSize * 3)));
14014
- if (lxTimeout) {
14015
- clearTimeout(lxTimeout);
14016
- }
14017
- if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
14018
- internalData.lxRunTime = Date.now();
14019
- loadScrollXData($xeTable);
14020
- }
14021
- internalData.lxTimeout = setTimeout(() => {
14022
- internalData.lxTimeout = undefined;
14023
- internalData.lxRunTime = undefined;
14024
- loadScrollXData($xeTable);
14025
- }, fpsTime);
14026
- },
14027
- lazyScrollYData() {
14028
- const $xeTable = this;
14029
- const props = $xeTable;
14030
- const internalData = $xeTable;
14031
- const {
14032
- showOverflow
14033
- } = props;
14034
- const {
14035
- lyTimeout,
14036
- lyRunTime,
14037
- scrollYStore
14038
- } = internalData;
14039
- const {
14040
- visibleSize
14041
- } = scrollYStore;
14042
- const fpsTime = showOverflow ? 5 : Math.max(5, Math.min(80, Math.floor(visibleSize / 2)));
14043
- if (lyTimeout) {
14044
- clearTimeout(lyTimeout);
14045
- }
14046
- if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
14047
- internalData.lyRunTime = Date.now();
14048
- loadScrollYData($xeTable);
14049
- }
14050
- internalData.lyTimeout = setTimeout(() => {
14051
- internalData.lyTimeout = undefined;
14052
- internalData.lyRunTime = undefined;
14053
- loadScrollYData($xeTable);
14054
- }, fpsTime);
14055
- },
14056
14104
  /**
14057
14105
  * 横向 X 可视渲染事件处理
14058
14106
  */
@@ -14062,7 +14110,7 @@ const Methods = {
14062
14110
  if (sXOpts.immediate) {
14063
14111
  loadScrollXData($xeTable);
14064
14112
  } else {
14065
- $xeTable.lazyScrollXData();
14113
+ lazyScrollXData($xeTable);
14066
14114
  }
14067
14115
  },
14068
14116
  /**
@@ -14074,7 +14122,7 @@ const Methods = {
14074
14122
  if (sYOpts.immediate) {
14075
14123
  loadScrollYData($xeTable);
14076
14124
  } else {
14077
- $xeTable.lazyScrollYData();
14125
+ lazyScrollYData($xeTable);
14078
14126
  }
14079
14127
  },
14080
14128
  triggerBodyScrollEvent(evnt, fixedType) {
@@ -14280,22 +14328,9 @@ const Methods = {
14280
14328
  if (!bodyScrollElem) {
14281
14329
  return;
14282
14330
  }
14283
- let multiple = 1;
14284
- if (reactData.lastScrollTime + 25 > Date.now()) {
14285
- multiple = 1.18;
14286
- } else if (reactData.lastScrollTime + 30 > Date.now()) {
14287
- multiple = 1.15;
14288
- } else if (reactData.lastScrollTime + 40 > Date.now()) {
14289
- multiple = 1.12;
14290
- } else if (reactData.lastScrollTime + 55 > Date.now()) {
14291
- multiple = 1.09;
14292
- } else if (reactData.lastScrollTime + 75 > Date.now()) {
14293
- multiple = 1.06;
14294
- } else if (reactData.lastScrollTime + 100 > Date.now()) {
14295
- multiple = 1.03;
14296
- }
14297
- const deltaTop = deltaY * multiple;
14298
- const deltaLeft = deltaX * multiple;
14331
+ const wheelSpeed = getWheelSpeed(reactData.lastScrollTime);
14332
+ const deltaTop = deltaY * wheelSpeed;
14333
+ const deltaLeft = deltaX * wheelSpeed;
14299
14334
  const isTopWheel = deltaTop < 0;
14300
14335
  const currScrollTop = bodyScrollElem.scrollTop;
14301
14336
  // 如果滚动位置已经是顶部或底部,则不需要触发
@@ -14312,16 +14347,29 @@ const Methods = {
14312
14347
  if (rowOpts.isHover || highlightHoverRow) {
14313
14348
  $xeTable.clearHoverRow();
14314
14349
  }
14315
- internalData.inWheelScroll = true;
14316
- setScrollTop(yHandleEl, scrollTop);
14317
- setScrollTop(bodyScrollElem, scrollTop);
14318
- setScrollTop(leftScrollElem, scrollTop);
14319
- setScrollTop(rightScrollElem, scrollTop);
14320
- loadScrollYData($xeTable, scrollTop);
14321
- $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
14322
- type: 'footer',
14323
- fixed: ''
14350
+ wheelScrollTo(scrollTop - bodyScrollElem.scrollTop, offsetTop => {
14351
+ const currTopNum = bodyScrollElem.scrollTop + offsetTop;
14352
+ internalData.inWheelScroll = true;
14353
+ setScrollTop(yHandleEl, currTopNum);
14354
+ setScrollTop(bodyScrollElem, currTopNum);
14355
+ setScrollTop(leftScrollElem, currTopNum);
14356
+ setScrollTop(rightScrollElem, currTopNum);
14357
+ $xeTable.triggerScrollYEvent(evnt);
14358
+ $xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, scrollLeft, {
14359
+ type: 'table',
14360
+ fixed: ''
14361
+ });
14324
14362
  });
14363
+ // internalData.inWheelScroll = true
14364
+ // setScrollTop(yHandleEl, scrollTop)
14365
+ // setScrollTop(bodyScrollElem, scrollTop)
14366
+ // setScrollTop(leftScrollElem, scrollTop)
14367
+ // setScrollTop(rightScrollElem, scrollTop)
14368
+ // loadScrollYData($xeTable, scrollTop)
14369
+ // $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
14370
+ // type: 'footer',
14371
+ // fixed: ''
14372
+ // })
14325
14373
  }
14326
14374
  },
14327
14375
  triggerVirtualScrollXEvent(evnt) {
@@ -15812,7 +15860,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
15812
15860
  $xeTable.triggerBodyScrollEvent(evnt, fixedType);
15813
15861
  }
15814
15862
  };
15815
- if (scrollYLoad || leftFixedWidth || rightFixedWidth) {
15863
+ if (leftFixedWidth || rightFixedWidth) {
15816
15864
  ons.wheel = $xeTable.triggerBodyWheelEvent;
15817
15865
  }
15818
15866
  return h('div', {