vxe-table 4.13.12 → 4.13.13

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/module/menu/panel.js +8 -4
  6. package/es/table/src/cell.js +2 -2
  7. package/es/table/src/table.js +53 -50
  8. package/es/table/style.css +24 -0
  9. package/es/table/style.min.css +1 -1
  10. package/es/ui/index.js +4 -4
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +24 -0
  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 +66 -18
  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/module/menu/panel.js +8 -4
  21. package/lib/table/module/menu/panel.min.js +1 -1
  22. package/lib/table/src/cell.js +2 -2
  23. package/lib/table/src/cell.min.js +1 -1
  24. package/lib/table/src/table.js +51 -7
  25. package/lib/table/src/table.min.js +1 -1
  26. package/lib/table/style/style.css +24 -0
  27. package/lib/table/style/style.min.css +1 -1
  28. package/lib/ui/index.js +4 -4
  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 +24 -0
  33. package/lib/vxe-table/style/style.min.css +1 -1
  34. package/package.json +2 -2
  35. package/packages/table/module/menu/panel.ts +8 -4
  36. package/packages/table/src/cell.ts +2 -2
  37. package/packages/table/src/table.ts +57 -49
  38. package/packages/ui/index.ts +3 -3
  39. package/styles/components/table.scss +35 -0
  40. /package/es/{iconfont.1745723959074.ttf → iconfont.1745800678796.ttf} +0 -0
  41. /package/es/{iconfont.1745723959074.woff → iconfont.1745800678796.woff} +0 -0
  42. /package/es/{iconfont.1745723959074.woff2 → iconfont.1745800678796.woff2} +0 -0
  43. /package/lib/{iconfont.1745723959074.ttf → iconfont.1745800678796.ttf} +0 -0
  44. /package/lib/{iconfont.1745723959074.woff → iconfont.1745800678796.woff} +0 -0
  45. /package/lib/{iconfont.1745723959074.woff2 → iconfont.1745800678796.woff2} +0 -0
@@ -400,6 +400,8 @@ export default defineComponent({
400
400
  // 已删除行
401
401
  removeRowMaps: {},
402
402
 
403
+ cvCacheMaps: {},
404
+
403
405
  inited: false,
404
406
  tooltipTimeout: null,
405
407
  initStatus: false,
@@ -2931,13 +2933,13 @@ export default defineComponent({
2931
2933
  if (bodyWrapperElem) {
2932
2934
  overflowY = scrollYHeight > bodyWrapperElem.clientHeight
2933
2935
  if (yHandleEl) {
2934
- reactData.scrollbarWidth = Math.max(scrollbarOpts.width || 0, yHandleEl.offsetWidth - yHandleEl.clientWidth)
2936
+ reactData.scrollbarWidth = scrollbarOpts.width || (yHandleEl.offsetWidth - yHandleEl.clientWidth) || 14
2935
2937
  }
2936
2938
  reactData.overflowY = overflowY
2937
2939
 
2938
2940
  overflowX = scrollXWidth > bodyWrapperElem.clientWidth
2939
2941
  if (xHandleEl) {
2940
- reactData.scrollbarHeight = Math.max(scrollbarOpts.height || 0, xHandleEl.offsetHeight - xHandleEl.clientHeight)
2942
+ reactData.scrollbarHeight = scrollbarOpts.height || (xHandleEl.offsetHeight - xHandleEl.clientHeight) || 14
2941
2943
  }
2942
2944
 
2943
2945
  const headerHeight = headerTableElem ? headerTableElem.clientHeight : 0
@@ -3134,6 +3136,7 @@ export default defineComponent({
3134
3136
  scrollYStore.endIndex = 1
3135
3137
  scrollXStore.startIndex = 0
3136
3138
  scrollXStore.endIndex = 1
3139
+ internalData.cvCacheMaps = {}
3137
3140
  reactData.isRowLoading = true
3138
3141
  reactData.scrollVMLoading = false
3139
3142
  internalData.treeExpandedMaps = {}
@@ -3741,41 +3744,41 @@ export default defineComponent({
3741
3744
  }
3742
3745
  }
3743
3746
 
3744
- const lazyScrollXData = () => {
3745
- const { lxTimeout, lxRunTime, scrollXStore } = internalData
3746
- const { visibleSize } = scrollXStore
3747
- const fpsTime = Math.max(5, Math.min(10, Math.floor(visibleSize / 3)))
3748
- if (lxTimeout) {
3749
- clearTimeout(lxTimeout)
3750
- }
3751
- if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
3752
- internalData.lxRunTime = Date.now()
3753
- loadScrollXData()
3754
- }
3755
- internalData.lxTimeout = setTimeout(() => {
3756
- internalData.lxTimeout = undefined
3757
- internalData.lxRunTime = undefined
3758
- loadScrollXData()
3759
- }, fpsTime)
3760
- }
3761
-
3762
- const lazyScrollYData = () => {
3763
- const { lyTimeout, lyRunTime, scrollYStore } = internalData
3764
- const { visibleSize } = scrollYStore
3765
- const fpsTime = Math.floor(Math.max(4, Math.min(10, visibleSize / 3)))
3766
- if (lyTimeout) {
3767
- clearTimeout(lyTimeout)
3768
- }
3769
- if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
3770
- internalData.lyRunTime = Date.now()
3771
- loadScrollYData()
3772
- }
3773
- internalData.lyTimeout = setTimeout(() => {
3774
- internalData.lyTimeout = undefined
3775
- internalData.lyRunTime = undefined
3776
- loadScrollYData()
3777
- }, fpsTime)
3778
- }
3747
+ // const lazyScrollXData = () => {
3748
+ // const { lxTimeout, lxRunTime, scrollXStore } = internalData
3749
+ // const { visibleSize } = scrollXStore
3750
+ // const fpsTime = Math.max(5, Math.min(10, Math.floor(visibleSize / 3)))
3751
+ // if (lxTimeout) {
3752
+ // clearTimeout(lxTimeout)
3753
+ // }
3754
+ // if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
3755
+ // internalData.lxRunTime = Date.now()
3756
+ // loadScrollXData()
3757
+ // }
3758
+ // internalData.lxTimeout = setTimeout(() => {
3759
+ // internalData.lxTimeout = undefined
3760
+ // internalData.lxRunTime = undefined
3761
+ // loadScrollXData()
3762
+ // }, fpsTime)
3763
+ // }
3764
+
3765
+ // const lazyScrollYData = () => {
3766
+ // const { lyTimeout, lyRunTime, scrollYStore } = internalData
3767
+ // const { visibleSize } = scrollYStore
3768
+ // const fpsTime = Math.floor(Math.max(4, Math.min(10, visibleSize / 3)))
3769
+ // if (lyTimeout) {
3770
+ // clearTimeout(lyTimeout)
3771
+ // }
3772
+ // if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
3773
+ // internalData.lyRunTime = Date.now()
3774
+ // loadScrollYData()
3775
+ // }
3776
+ // internalData.lyTimeout = setTimeout(() => {
3777
+ // internalData.lyTimeout = undefined
3778
+ // internalData.lyRunTime = undefined
3779
+ // loadScrollYData()
3780
+ // }, fpsTime)
3781
+ // }
3779
3782
 
3780
3783
  const checkLastSyncScroll = (isRollX: boolean, isRollY: boolean) => {
3781
3784
  const { scrollXLoad, scrollYLoad } = reactData
@@ -9645,23 +9648,23 @@ export default defineComponent({
9645
9648
  * 横向 X 可视渲染事件处理
9646
9649
  */
9647
9650
  triggerScrollXEvent () {
9648
- const virtualXOpts = computeVirtualXOpts.value
9649
- if (virtualXOpts.immediate) {
9650
- loadScrollXData()
9651
- } else {
9652
- lazyScrollXData()
9653
- }
9651
+ // const virtualXOpts = computeVirtualXOpts.value
9652
+ // if (virtualXOpts.immediate) {
9653
+ loadScrollXData()
9654
+ // } else {
9655
+ // lazyScrollXData()
9656
+ // }
9654
9657
  },
9655
9658
  /**
9656
9659
  * 纵向 Y 可视渲染事件处理
9657
9660
  */
9658
9661
  triggerScrollYEvent () {
9659
- const virtualYOpts = computeVirtualYOpts.value
9660
- if (virtualYOpts.immediate) {
9661
- loadScrollYData()
9662
- } else {
9663
- lazyScrollYData()
9664
- }
9662
+ // const virtualYOpts = computeVirtualYOpts.value
9663
+ // if (virtualYOpts.immediate) {
9664
+ loadScrollYData()
9665
+ // } else {
9666
+ // lazyScrollYData()
9667
+ // }
9665
9668
  },
9666
9669
  triggerBodyScrollEvent (evnt, fixedType) {
9667
9670
  const { scrollYLoad, scrollXLoad } = reactData
@@ -9850,12 +9853,14 @@ export default defineComponent({
9850
9853
  if (!bodyScrollElem) {
9851
9854
  return
9852
9855
  }
9856
+
9853
9857
  const wheelSpeed = getWheelSpeed(reactData.lastScrollTime)
9854
9858
  const deltaTop = shiftKey ? 0 : Math.ceil(deltaY * wheelSpeed)
9855
9859
  const deltaLeft = shiftKey ? Math.ceil((shiftKey ? (deltaY || deltaX) : deltaX) * wheelSpeed) : 0
9856
9860
 
9857
9861
  const isTopWheel = deltaTop < 0
9858
9862
  const currScrollTop = bodyScrollElem.scrollTop
9863
+
9859
9864
  // 如果滚动位置已经是顶部或底部,则不需要触发
9860
9865
  if (isTopWheel ? currScrollTop <= 0 : currScrollTop >= bodyScrollElem.scrollHeight - bodyScrollElem.clientHeight) {
9861
9866
  return
@@ -11358,6 +11363,9 @@ export default defineComponent({
11358
11363
  if (tableViewportEl) {
11359
11364
  tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent)
11360
11365
  }
11366
+ internalData.cvCacheMaps = {}
11367
+ internalData.prevDragRow = null
11368
+ internalData.prevDragCol = null
11361
11369
  if (resizeObserver) {
11362
11370
  resizeObserver.disconnect()
11363
11371
  }
@@ -208,7 +208,7 @@ VxeUI.setConfig({
208
208
  },
209
209
  virtualXConfig: {
210
210
  enabled: true,
211
- gt: 28,
211
+ gt: 24,
212
212
  preSize: 1,
213
213
  oSize: 0
214
214
  },
@@ -219,8 +219,8 @@ VxeUI.setConfig({
219
219
  oSize: 0
220
220
  },
221
221
  scrollbarConfig: {
222
- width: 14,
223
- height: 14
222
+ // width: 14,
223
+ // height: 14
224
224
  }
225
225
  },
226
226
  // export: {
@@ -1,7 +1,36 @@
1
+ @use "sass:map";
2
+ @use "sass:list";
1
3
  @use '../helpers/baseMixin.scss';
2
4
  @use './icon.scss';
3
5
  @use './table-module/all.scss';
4
6
 
7
+ $btnThemeList: (
8
+ (
9
+ name: "primary",
10
+ textColor: var(--vxe-ui-font-primary-color),
11
+ ),
12
+ (
13
+ name: "success",
14
+ textColor: var(--vxe-ui-status-success-color),
15
+ ),
16
+ (
17
+ name: "info",
18
+ textColor: var(--vxe-ui-status-info-color),
19
+ ),
20
+ (
21
+ name: "warning",
22
+ textColor: var(--vxe-ui-status-warning-color),
23
+ ),
24
+ (
25
+ name: "danger",
26
+ textColor: var(--vxe-ui-status-danger-color),
27
+ ),
28
+ (
29
+ name: "error",
30
+ textColor: var(--vxe-ui-status-error-color),
31
+ )
32
+ );
33
+
5
34
  .vxe-table-slots,
6
35
  .vxe-table--file-form {
7
36
  display: none;
@@ -792,6 +821,12 @@
792
821
  .vxe-cell-title-prefix-icon,
793
822
  .vxe-cell-title-suffix-icon {
794
823
  cursor: help;
824
+ @for $index from 0 to list.length($btnThemeList) {
825
+ $item: list.nth($btnThemeList, $index + 1);
826
+ &.theme--#{map.get($item, name)} {
827
+ color: map.get($item, textColor);
828
+ }
829
+ }
795
830
  }
796
831
  }
797
832