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
@@ -11,7 +11,7 @@ function renderTitlePrefixIcon(params) {
11
11
  const titlePrefix = column.titlePrefix || column.titleHelp;
12
12
  if (titlePrefix) {
13
13
  return h('i', {
14
- class: ['vxe-cell-title-prefix-icon', titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX],
14
+ class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : '', titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX],
15
15
  onMouseenter(evnt) {
16
16
  $table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
17
17
  },
@@ -27,7 +27,7 @@ function renderTitleSuffixIcon(params) {
27
27
  const titleSuffix = column.titleSuffix;
28
28
  if (titleSuffix) {
29
29
  return h('i', {
30
- class: ['vxe-cell-title-suffix-icon', titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX],
30
+ class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : '', titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX],
31
31
  onMouseenter(evnt) {
32
32
  $table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
33
33
  },
@@ -376,6 +376,7 @@ export default defineComponent({
376
376
  insertRowMaps: {},
377
377
  // 已删除行
378
378
  removeRowMaps: {},
379
+ cvCacheMaps: {},
379
380
  inited: false,
380
381
  tooltipTimeout: null,
381
382
  initStatus: false,
@@ -2796,12 +2797,12 @@ export default defineComponent({
2796
2797
  if (bodyWrapperElem) {
2797
2798
  overflowY = scrollYHeight > bodyWrapperElem.clientHeight;
2798
2799
  if (yHandleEl) {
2799
- reactData.scrollbarWidth = Math.max(scrollbarOpts.width || 0, yHandleEl.offsetWidth - yHandleEl.clientWidth);
2800
+ reactData.scrollbarWidth = scrollbarOpts.width || (yHandleEl.offsetWidth - yHandleEl.clientWidth) || 14;
2800
2801
  }
2801
2802
  reactData.overflowY = overflowY;
2802
2803
  overflowX = scrollXWidth > bodyWrapperElem.clientWidth;
2803
2804
  if (xHandleEl) {
2804
- reactData.scrollbarHeight = Math.max(scrollbarOpts.height || 0, xHandleEl.offsetHeight - xHandleEl.clientHeight);
2805
+ reactData.scrollbarHeight = scrollbarOpts.height || (xHandleEl.offsetHeight - xHandleEl.clientHeight) || 14;
2805
2806
  }
2806
2807
  const headerHeight = headerTableElem ? headerTableElem.clientHeight : 0;
2807
2808
  const footerHeight = footerTableElem ? footerTableElem.clientHeight : 0;
@@ -2994,6 +2995,7 @@ export default defineComponent({
2994
2995
  scrollYStore.endIndex = 1;
2995
2996
  scrollXStore.startIndex = 0;
2996
2997
  scrollXStore.endIndex = 1;
2998
+ internalData.cvCacheMaps = {};
2997
2999
  reactData.isRowLoading = true;
2998
3000
  reactData.scrollVMLoading = false;
2999
3001
  internalData.treeExpandedMaps = {};
@@ -3587,40 +3589,40 @@ export default defineComponent({
3587
3589
  return -1;
3588
3590
  };
3589
3591
  };
3590
- const lazyScrollXData = () => {
3591
- const { lxTimeout, lxRunTime, scrollXStore } = internalData;
3592
- const { visibleSize } = scrollXStore;
3593
- const fpsTime = Math.max(5, Math.min(10, Math.floor(visibleSize / 3)));
3594
- if (lxTimeout) {
3595
- clearTimeout(lxTimeout);
3596
- }
3597
- if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
3598
- internalData.lxRunTime = Date.now();
3599
- loadScrollXData();
3600
- }
3601
- internalData.lxTimeout = setTimeout(() => {
3602
- internalData.lxTimeout = undefined;
3603
- internalData.lxRunTime = undefined;
3604
- loadScrollXData();
3605
- }, fpsTime);
3606
- };
3607
- const lazyScrollYData = () => {
3608
- const { lyTimeout, lyRunTime, scrollYStore } = internalData;
3609
- const { visibleSize } = scrollYStore;
3610
- const fpsTime = Math.floor(Math.max(4, Math.min(10, visibleSize / 3)));
3611
- if (lyTimeout) {
3612
- clearTimeout(lyTimeout);
3613
- }
3614
- if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
3615
- internalData.lyRunTime = Date.now();
3616
- loadScrollYData();
3617
- }
3618
- internalData.lyTimeout = setTimeout(() => {
3619
- internalData.lyTimeout = undefined;
3620
- internalData.lyRunTime = undefined;
3621
- loadScrollYData();
3622
- }, fpsTime);
3623
- };
3592
+ // const lazyScrollXData = () => {
3593
+ // const { lxTimeout, lxRunTime, scrollXStore } = internalData
3594
+ // const { visibleSize } = scrollXStore
3595
+ // const fpsTime = Math.max(5, Math.min(10, Math.floor(visibleSize / 3)))
3596
+ // if (lxTimeout) {
3597
+ // clearTimeout(lxTimeout)
3598
+ // }
3599
+ // if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
3600
+ // internalData.lxRunTime = Date.now()
3601
+ // loadScrollXData()
3602
+ // }
3603
+ // internalData.lxTimeout = setTimeout(() => {
3604
+ // internalData.lxTimeout = undefined
3605
+ // internalData.lxRunTime = undefined
3606
+ // loadScrollXData()
3607
+ // }, fpsTime)
3608
+ // }
3609
+ // const lazyScrollYData = () => {
3610
+ // const { lyTimeout, lyRunTime, scrollYStore } = internalData
3611
+ // const { visibleSize } = scrollYStore
3612
+ // const fpsTime = Math.floor(Math.max(4, Math.min(10, visibleSize / 3)))
3613
+ // if (lyTimeout) {
3614
+ // clearTimeout(lyTimeout)
3615
+ // }
3616
+ // if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
3617
+ // internalData.lyRunTime = Date.now()
3618
+ // loadScrollYData()
3619
+ // }
3620
+ // internalData.lyTimeout = setTimeout(() => {
3621
+ // internalData.lyTimeout = undefined
3622
+ // internalData.lyRunTime = undefined
3623
+ // loadScrollYData()
3624
+ // }, fpsTime)
3625
+ // }
3624
3626
  const checkLastSyncScroll = (isRollX, isRollY) => {
3625
3627
  const { scrollXLoad, scrollYLoad } = reactData;
3626
3628
  const { lcsTimeout } = internalData;
@@ -9515,25 +9517,23 @@ export default defineComponent({
9515
9517
  * 横向 X 可视渲染事件处理
9516
9518
  */
9517
9519
  triggerScrollXEvent() {
9518
- const virtualXOpts = computeVirtualXOpts.value;
9519
- if (virtualXOpts.immediate) {
9520
- loadScrollXData();
9521
- }
9522
- else {
9523
- lazyScrollXData();
9524
- }
9520
+ // const virtualXOpts = computeVirtualXOpts.value
9521
+ // if (virtualXOpts.immediate) {
9522
+ loadScrollXData();
9523
+ // } else {
9524
+ // lazyScrollXData()
9525
+ // }
9525
9526
  },
9526
9527
  /**
9527
9528
  * 纵向 Y 可视渲染事件处理
9528
9529
  */
9529
9530
  triggerScrollYEvent() {
9530
- const virtualYOpts = computeVirtualYOpts.value;
9531
- if (virtualYOpts.immediate) {
9532
- loadScrollYData();
9533
- }
9534
- else {
9535
- lazyScrollYData();
9536
- }
9531
+ // const virtualYOpts = computeVirtualYOpts.value
9532
+ // if (virtualYOpts.immediate) {
9533
+ loadScrollYData();
9534
+ // } else {
9535
+ // lazyScrollYData()
9536
+ // }
9537
9537
  },
9538
9538
  triggerBodyScrollEvent(evnt, fixedType) {
9539
9539
  const { scrollYLoad, scrollXLoad } = reactData;
@@ -11178,6 +11178,9 @@ export default defineComponent({
11178
11178
  if (tableViewportEl) {
11179
11179
  tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent);
11180
11180
  }
11181
+ internalData.cvCacheMaps = {};
11182
+ internalData.prevDragRow = null;
11183
+ internalData.prevDragCol = null;
11181
11184
  if (resizeObserver) {
11182
11185
  resizeObserver.disconnect();
11183
11186
  }
@@ -2327,6 +2327,30 @@
2327
2327
  .vxe-header--column .vxe-cell-title-suffix-icon {
2328
2328
  cursor: help;
2329
2329
  }
2330
+ .vxe-header--column .vxe-cell-title-prefix-icon.theme--primary,
2331
+ .vxe-header--column .vxe-cell-title-suffix-icon.theme--primary {
2332
+ color: var(--vxe-ui-font-primary-color);
2333
+ }
2334
+ .vxe-header--column .vxe-cell-title-prefix-icon.theme--success,
2335
+ .vxe-header--column .vxe-cell-title-suffix-icon.theme--success {
2336
+ color: var(--vxe-ui-status-success-color);
2337
+ }
2338
+ .vxe-header--column .vxe-cell-title-prefix-icon.theme--info,
2339
+ .vxe-header--column .vxe-cell-title-suffix-icon.theme--info {
2340
+ color: var(--vxe-ui-status-info-color);
2341
+ }
2342
+ .vxe-header--column .vxe-cell-title-prefix-icon.theme--warning,
2343
+ .vxe-header--column .vxe-cell-title-suffix-icon.theme--warning {
2344
+ color: var(--vxe-ui-status-warning-color);
2345
+ }
2346
+ .vxe-header--column .vxe-cell-title-prefix-icon.theme--danger,
2347
+ .vxe-header--column .vxe-cell-title-suffix-icon.theme--danger {
2348
+ color: var(--vxe-ui-status-danger-color);
2349
+ }
2350
+ .vxe-header--column .vxe-cell-title-prefix-icon.theme--error,
2351
+ .vxe-header--column .vxe-cell-title-suffix-icon.theme--error {
2352
+ color: var(--vxe-ui-status-error-color);
2353
+ }
2330
2354
 
2331
2355
  .vxe-cell--col-resizable {
2332
2356
  position: absolute;