vxe-table 4.18.1 → 4.18.2

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 (45) 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 +3 -2
  6. package/es/table/src/table.js +24 -7
  7. package/es/table/src/util.js +1 -2
  8. package/es/table/style.css +2 -2
  9. package/es/table/style.min.css +1 -1
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +2 -2
  13. package/es/vxe-table/style.min.css +1 -1
  14. package/lib/index.css +1 -1
  15. package/lib/index.min.css +1 -1
  16. package/lib/index.umd.js +14 -13
  17. package/lib/index.umd.min.js +1 -1
  18. package/lib/style.css +1 -1
  19. package/lib/style.min.css +1 -1
  20. package/lib/table/src/body.js +4 -2
  21. package/lib/table/src/body.min.js +1 -1
  22. package/lib/table/src/table.js +7 -7
  23. package/lib/table/src/table.min.js +1 -1
  24. package/lib/table/src/util.js +1 -2
  25. package/lib/table/src/util.min.js +1 -1
  26. package/lib/table/style/style.css +2 -2
  27. package/lib/table/style/style.min.css +1 -1
  28. package/lib/ui/index.js +1 -1
  29. package/lib/ui/index.min.js +1 -1
  30. package/lib/ui/src/log.js +1 -1
  31. package/lib/ui/src/log.min.js +1 -1
  32. package/lib/vxe-table/style/style.css +2 -2
  33. package/lib/vxe-table/style/style.min.css +1 -1
  34. package/package.json +1 -1
  35. package/packages/table/src/body.ts +3 -2
  36. package/packages/table/src/table.ts +26 -7
  37. package/packages/table/src/util.ts +2 -2
  38. package/styles/components/table.scss +2 -2
  39. package/styles/theme/base.scss +3 -0
  40. /package/es/{iconfont.1773109208977.ttf → iconfont.1773303158382.ttf} +0 -0
  41. /package/es/{iconfont.1773109208977.woff → iconfont.1773303158382.woff} +0 -0
  42. /package/es/{iconfont.1773109208977.woff2 → iconfont.1773303158382.woff2} +0 -0
  43. /package/lib/{iconfont.1773109208977.ttf → iconfont.1773303158382.ttf} +0 -0
  44. /package/lib/{iconfont.1773109208977.woff → iconfont.1773303158382.woff} +0 -0
  45. /package/lib/{iconfont.1773109208977.woff2 → iconfont.1773303158382.woff2} +0 -0
@@ -35,8 +35,9 @@ export default defineVxeComponent({
35
35
  // 滚动、拖动过程中不需要触发
36
36
  const isVMScrollProcess = () => {
37
37
  const { delayHover } = tableProps;
38
- const { lastScrollTime, isDragResize } = tableReactData;
39
- return !!(isDragResize || (lastScrollTime && Date.now() < lastScrollTime + delayHover));
38
+ const { isDragResize } = tableReactData;
39
+ const { lastSTime } = tableInternalData;
40
+ return !!(isDragResize || (lastSTime && Date.now() < lastSTime + delayHover));
40
41
  };
41
42
  const renderLine = (rowid, params, cellHeight) => {
42
43
  const { column } = params;
@@ -518,6 +518,18 @@ export default defineVxeComponent({
518
518
  }
519
519
  return '';
520
520
  });
521
+ const computeTableStyle = computed(() => {
522
+ const scrollbarOpts = computeScrollbarOpts.value;
523
+ const { width, height } = scrollbarOpts;
524
+ const tStys = {};
525
+ if (width) {
526
+ tStys['--vxe-ui-table-view-scrollbar-width'] = toCssUnit(width);
527
+ }
528
+ if (height) {
529
+ tStys['--vxe-ui-table-view-scrollbar-height'] = toCssUnit(height);
530
+ }
531
+ return tStys;
532
+ });
521
533
  const computeTableRowExpandedList = computed(() => {
522
534
  const { tableData, rowExpandedFlag, expandColumn, rowGroupExpandedFlag, treeExpandedFlag } = reactData;
523
535
  const { visibleDataRowIdData, rowExpandedMaps } = internalData;
@@ -3590,7 +3602,7 @@ export default defineVxeComponent({
3590
3602
  if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
3591
3603
  errLog('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"']);
3592
3604
  }
3593
- if (virtualYOpts.mode === 'scroll' && expandOpts.mode === 'fixed') {
3605
+ if (virtualYOpts.mode === 'scroll' && reactData.expandColumn && expandOpts.mode === 'fixed') {
3594
3606
  warnLog('vxe.error.notConflictProp', ['virtual-y-config.mode=scroll', 'expand-config.mode=inside']);
3595
3607
  }
3596
3608
  // if (showOverflow) {
@@ -4281,7 +4293,7 @@ export default defineVxeComponent({
4281
4293
  return Promise.all([
4282
4294
  xRest,
4283
4295
  yRest,
4284
- $xeTable.updateCellAreas()
4296
+ scrollXLoad || scrollYLoad ? $xeTable.updateCellAreas() : null
4285
4297
  ]);
4286
4298
  };
4287
4299
  const checkLastSyncScroll = (isRollX, isRollY) => {
@@ -7131,14 +7143,18 @@ export default defineVxeComponent({
7131
7143
  setScrollLeft(bodyScrollElem, scrollLeft);
7132
7144
  setScrollLeft(headerScrollElem, scrollLeft);
7133
7145
  setScrollLeft(footerScrollElem, scrollLeft);
7134
- loadScrollXData();
7146
+ if (reactData.scrollXLoad) {
7147
+ loadScrollXData();
7148
+ }
7135
7149
  }
7136
7150
  if (XEUtils.isNumber(scrollTop)) {
7137
7151
  setScrollTop(yHandleEl, scrollTop);
7138
7152
  setScrollTop(bodyScrollElem, scrollTop);
7139
7153
  setScrollTop(leftScrollElem, scrollTop);
7140
7154
  setScrollTop(rightScrollElem, scrollTop);
7141
- loadScrollYData();
7155
+ if (reactData.scrollYLoad) {
7156
+ loadScrollYData();
7157
+ }
7142
7158
  }
7143
7159
  return new Promise(resolve => {
7144
7160
  setTimeout(() => {
@@ -11471,7 +11487,7 @@ export default defineVxeComponent({
11471
11487
  }
11472
11488
  internalData.lastScrollTop = scrollTop;
11473
11489
  }
11474
- reactData.lastScrollTime = Date.now();
11490
+ internalData.lastSTime = Date.now();
11475
11491
  const evntParams = Object.assign({ source: sourceType, scrollTop,
11476
11492
  scrollLeft,
11477
11493
  bodyHeight,
@@ -11711,7 +11727,7 @@ export default defineVxeComponent({
11711
11727
  if (!bodyScrollElem) {
11712
11728
  return;
11713
11729
  }
11714
- const wheelSpeed = getWheelSpeed(reactData.lastScrollTime);
11730
+ const wheelSpeed = getWheelSpeed(internalData.lastSTime);
11715
11731
  const deltaTop = shiftKey ? 0 : (deltaY * wheelSpeed);
11716
11732
  const deltaLeft = (shiftKey ? (deltaX || deltaY) : deltaX) * wheelSpeed;
11717
11733
  const currScrollTop = bodyScrollElem.scrollTop;
@@ -12689,6 +12705,7 @@ export default defineVxeComponent({
12689
12705
  footer: slots.footerTooltip || slots['footer-tooltip']
12690
12706
  };
12691
12707
  const currTooltipSlot = tooltipStore.visible && tooltipStore.type ? tipSlots[tooltipStore.type] : null;
12708
+ const tableStyle = computeTableStyle.value;
12692
12709
  const rowDragOpts = computeRowDragOpts.value;
12693
12710
  const tableTipConfig = computeTableTipConfig.value;
12694
12711
  const validTipConfig = computeValidTipConfig.value;
@@ -12753,7 +12770,7 @@ export default defineVxeComponent({
12753
12770
  'not--scroll-x': !overflowX,
12754
12771
  'is--virtual-x': scrollXLoad,
12755
12772
  'is--virtual-y': scrollYLoad
12756
- }], spellcheck: false }, tbOns), [
12773
+ }], style: tableStyle, spellcheck: false }, tbOns), [
12757
12774
  /**
12758
12775
  * 隐藏列
12759
12776
  */
@@ -124,6 +124,7 @@ export function createInternalData() {
124
124
  tFooterHeight: 0,
125
125
  teleportToWrapperElem: null,
126
126
  popupToWrapperElem: null,
127
+ lastSTime: 0,
127
128
  inited: false,
128
129
  tooltipTimeout: null,
129
130
  initStatus: false,
@@ -153,8 +154,6 @@ export function createReactData() {
153
154
  scrollbarWidth: 0,
154
155
  // 横向滚动条的高度
155
156
  scrollbarHeight: 0,
156
- // 最后滚动时间戳
157
- lastScrollTime: 0,
158
157
  // 行高
159
158
  rowHeight: 0,
160
159
  // 表格父容器的高度
@@ -2415,7 +2415,7 @@
2415
2415
  .vxe-table .vxe-table--scroll-x-handle {
2416
2416
  overflow-y: hidden;
2417
2417
  overflow-x: scroll;
2418
- height: 18px;
2418
+ height: var(--vxe-ui-table-view-scrollbar-height);
2419
2419
  }
2420
2420
  .vxe-table .vxe-table--scroll-y-handle,
2421
2421
  .vxe-table .vxe-table--scroll-y-wrapper {
@@ -2427,7 +2427,7 @@
2427
2427
  .vxe-table .vxe-table--scroll-y-handle {
2428
2428
  overflow-y: scroll;
2429
2429
  overflow-x: hidden;
2430
- width: 18px;
2430
+ width: var(--vxe-ui-table-view-scrollbar-width);
2431
2431
  height: 100%;
2432
2432
  }
2433
2433
  .vxe-table .vxe-table--scroll-x-space {