bkui-vue 2.0.1-beta.39.table.2 → 2.0.1-beta.40

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 (49) hide show
  1. package/dist/index.cjs.js +63 -63
  2. package/dist/index.esm.js +15703 -15738
  3. package/dist/index.umd.js +63 -63
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/index.js +1 -1
  7. package/lib/scrollbar/index.d.ts +13 -133
  8. package/lib/scrollbar/index.js +18490 -1332
  9. package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +2 -0
  10. package/lib/scrollbar/scrollbar-core/helpers.d.ts +5 -0
  11. package/lib/scrollbar/scrollbar-core/index.d.ts +242 -0
  12. package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +5 -0
  13. package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +1 -0
  14. package/lib/scrollbar/{css/scrollbar.css → scrollbar.css} +75 -90
  15. package/lib/scrollbar/scrollbar.less +119 -0
  16. package/lib/scrollbar/{css/scrollbar.variable.css → scrollbar.variable.css} +74 -89
  17. package/lib/styles/index.d.ts +0 -1
  18. package/lib/table/hooks/use-columns.d.ts +1 -4
  19. package/lib/table/hooks/use-layout.d.ts +0 -1
  20. package/lib/table/index.js +66 -140
  21. package/lib/table/table.css +115 -108
  22. package/lib/table/table.less +34 -24
  23. package/lib/table/table.variable.css +115 -108
  24. package/lib/table-column/index.js +0 -4
  25. package/lib/tree/tree.css +83 -90
  26. package/lib/tree/tree.variable.css +83 -90
  27. package/lib/virtual-render/index.d.ts +23 -0
  28. package/lib/virtual-render/index.js +106 -54
  29. package/lib/virtual-render/props.d.ts +6 -0
  30. package/lib/virtual-render/use-scrollbar.d.ts +17 -3
  31. package/lib/virtual-render/virtual-render.css +82 -89
  32. package/lib/virtual-render/virtual-render.d.ts +11 -0
  33. package/lib/virtual-render/virtual-render.less +11 -2
  34. package/lib/virtual-render/virtual-render.variable.css +82 -89
  35. package/lib/volar.components.d.ts +2 -0
  36. package/package.json +1 -1
  37. package/lib/scrollbar/css/scrollbar.less +0 -139
  38. package/lib/scrollbar/handlers/click-rail.d.ts +0 -2
  39. package/lib/scrollbar/handlers/drag-thumb.d.ts +0 -1
  40. package/lib/scrollbar/handlers/keyboard.d.ts +0 -2
  41. package/lib/scrollbar/handlers/mouse-wheel.d.ts +0 -2
  42. package/lib/scrollbar/handlers/touch.d.ts +0 -4
  43. package/lib/scrollbar/helper/class-names.d.ts +0 -21
  44. package/lib/scrollbar/helper/css.d.ts +0 -3
  45. package/lib/scrollbar/helper/dom.d.ts +0 -4
  46. package/lib/scrollbar/helper/event-manager.d.ts +0 -20
  47. package/lib/scrollbar/helper/util.d.ts +0 -11
  48. package/lib/scrollbar/process-scroll-diff.d.ts +0 -1
  49. package/lib/scrollbar/update-geometry.d.ts +0 -8
@@ -388,112 +388,97 @@
388
388
  --select-active-color: #e1ecff;
389
389
  --select-hover-color: #f5f7fa;
390
390
  }
391
- .bk-scrollbar {
392
- overflow: hidden !important;
393
- overflow-anchor: none;
394
- touch-action: auto;
395
- /*
396
- * Scrollbar rail styles
397
- */
398
- /*
399
- * Scrollbar thumb styles
400
- */
391
+ .bk-scrollbar-wrapper {
392
+ position: relative;
393
+ overflow: hidden;
401
394
  }
402
- .bk-scrollbar.bk--active-x > .bk__rail-x,
403
- .bk-scrollbar.bk--active-y > .bk__rail-y {
404
- display: block;
395
+ .bk-scrollbar-wrapper .bk-scrollbar-content-el {
396
+ display: inline-flex;
397
+ flex-direction: column;
398
+ width: 100%;
405
399
  }
406
- .bk-scrollbar .bk__rail-x:hover,
407
- .bk-scrollbar .bk__rail-y:hover,
408
- .bk-scrollbar .bk__rail-x:focus,
409
- .bk-scrollbar .bk__rail-y:focus,
410
- .bk-scrollbar .bk__rail-x.bk--clicking,
411
- .bk-scrollbar .bk__rail-y.bk--clicking {
412
- background-color: #f0f1f5;
413
- }
414
- .bk-scrollbar .bk__rail-x {
415
- display: none;
416
- opacity: 0;
417
- transition: background-color 0.2s linear, opacity 0.2s linear;
418
- height: 10px;
419
- bottom: 0px;
400
+ .bk-scrollbar-wrapper .bk-scrollbar-track {
401
+ z-index: 1;
420
402
  position: absolute;
403
+ right: 0;
404
+ bottom: 0;
405
+ pointer-events: none;
406
+ overflow: hidden;
421
407
  }
422
- .bk-scrollbar .bk__rail-x.bk-size-small {
423
- height: 8px;
424
- }
425
- .bk-scrollbar .bk__rail-x.bk-size-small .bk__thumb-x {
426
- height: 6px;
427
- }
428
- .bk-scrollbar .bk__rail-y {
429
- display: none;
430
- opacity: 0;
431
- transition: background-color 0.2s linear, opacity 0.2s linear;
432
- width: 10px;
433
- right: 0px;
434
- position: absolute;
435
- margin-right: 2px;
408
+ .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-vertical {
409
+ width: 6px;
436
410
  }
437
- .bk-scrollbar .bk__rail-y.bk-size-small {
411
+ .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-vertical.bk-scrollbar-hover {
438
412
  width: 8px;
439
413
  }
440
- .bk-scrollbar .bk__rail-y.bk-size-small .bk__thumb-y {
441
- width: 6px;
442
- }
443
- .bk-scrollbar:hover > .bk__rail-x,
444
- .bk-scrollbar:hover > .bk__rail-y,
445
- .bk-scrollbar.bk--focus > .bk__rail-x,
446
- .bk-scrollbar.bk--focus > .bk__rail-y,
447
- .bk-scrollbar.bk--scrolling-x > .bk__rail-x,
448
- .bk-scrollbar.bk--scrolling-y > .bk__rail-y {
449
- opacity: 0.9;
414
+ .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-horizontal {
415
+ height: 6px;
450
416
  }
451
- .bk-scrollbar .bk__thumb-x {
452
- background-color: #dcdee5;
453
- border-radius: 8px;
454
- transition: background-color 0.2s linear, height 0.2s ease-in-out;
417
+ .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-horizontal.bk-scrollbar-hover {
455
418
  height: 8px;
456
- bottom: 0px;
457
- position: absolute;
458
419
  }
459
- .bk-scrollbar .bk__thumb-y {
460
- background-color: #dcdee5;
461
- border-radius: 8px;
462
- transition: background-color 0.2s linear, width 0.2s ease-in-out;
463
- width: 8px;
464
- right: 0px;
465
- position: absolute;
420
+ .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover {
421
+ background-color: #f0f1f5;
422
+ cursor: pointer;
466
423
  }
467
- .bk-scrollbar .bk__rail-x:hover > .bk__thumb-x,
468
- .bk-scrollbar .bk__rail-x:focus > .bk__thumb-x,
469
- .bk-scrollbar .bk__rail-x.bk--clicking .bk__thumb-x {
424
+ .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover .bk-scrollbar::before {
470
425
  background-color: #979ba5;
471
- height: 10px;
472
426
  }
473
- .bk-scrollbar .bk__rail-y:hover > .bk__thumb-y,
474
- .bk-scrollbar .bk__rail-y:focus > .bk__thumb-y,
475
- .bk-scrollbar .bk__rail-y.bk--clicking .bk__thumb-y {
476
- background-color: #979ba5;
427
+ .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-vertical {
428
+ top: 0;
429
+ width: 8px;
430
+ transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
431
+ }
432
+ .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-vertical.bk-scrollbar-hover {
477
433
  width: 10px;
478
434
  }
479
- .bk-scrollbar .bk-size-small > .bk__thumb-x,
480
- .bk-scrollbar .bk-size-small > .bk__thumb-x,
481
- .bk-scrollbar .bk-size-small.bk--clicking .bk__thumb-x {
435
+ .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal {
436
+ left: 0;
482
437
  height: 8px;
438
+ transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
483
439
  }
484
- .bk-scrollbar .bk-size-small:hover > .bk__thumb-y,
485
- .bk-scrollbar .bk-size-small:focus > .bk__thumb-y,
486
- .bk-scrollbar .bk-size-small.bk--clicking .bk__thumb-y {
487
- width: 8px;
440
+ .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal.bk-scrollbar-hover {
441
+ height: 10px;
442
+ }
443
+ .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal.bk-scrollbar {
444
+ right: auto;
445
+ left: 0;
446
+ top: 0;
447
+ bottom: 0;
448
+ min-height: 0;
449
+ min-width: 8px;
450
+ width: auto;
451
+ }
452
+ .bk-scrollbar-wrapper .bk-scrollbar-dragging {
453
+ pointer-events: none;
454
+ -webkit-touch-callout: none;
455
+ -webkit-user-select: none;
456
+ -khtml-user-select: none;
457
+ -moz-user-select: none;
458
+ -ms-user-select: none;
459
+ user-select: none;
460
+ }
461
+ .bk-scrollbar-wrapper .bk-scrollbar {
462
+ position: absolute;
463
+ left: 0;
464
+ right: 0;
465
+ top: 0;
466
+ bottom: 0;
488
467
  }
489
- /* MS supports */
490
- @supports (-ms-overflow-style: none) {
491
- .bk-scrollbar {
492
- overflow: auto !important;
493
- }
468
+ .bk-scrollbar-wrapper .bk-scrollbar::before {
469
+ position: absolute;
470
+ content: '';
471
+ background: #dcdee5;
472
+ border-radius: 6px;
473
+ left: 0;
474
+ right: 0;
475
+ top: 0;
476
+ bottom: 0;
477
+ opacity: 0;
478
+ transition: opacity 0.2s 0.9s linear;
494
479
  }
495
- @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
496
- .bk-scrollbar {
497
- overflow: auto !important;
498
- }
480
+ .bk-scrollbar-wrapper .bk-scrollbar.bk-scrollbar-visible::before {
481
+ opacity: 0.9;
482
+ transition-delay: 0s;
483
+ transition-duration: 0s;
499
484
  }
@@ -56,4 +56,3 @@ import '../pop-confirm/pop-confirm.less';
56
56
  import '../image/image.less';
57
57
  import '../image/image-viewer.less';
58
58
  import '../overflow-title/overflow-title.less';
59
- import '../scrollbar/css/scrollbar.less';
@@ -37,11 +37,8 @@ declare const useColumns: (props: TablePropTypes) => {
37
37
  getColumnRefAttribute: (col: Column | IEmptyObject, attributeName: string) => any;
38
38
  getColumnCalcWidth: (column: Column) => any;
39
39
  getColumnWidth: (column: Column) => any;
40
- getLeftColumnsWidth: (col: Column, includingSelf?: boolean) => number;
41
40
  getGroupAttribute: (group: Column) => IHeadGroup;
42
- getPreColumn: (col: Column) => Column;
43
- getColumnIndex: (col: Column) => number;
44
- resolveEventListener: (col: Column, index: number) => Record<string, (...args: any[]) => void> & {
41
+ resolveEventListener: (col: Column) => Record<string, (...args: any[]) => void> & {
45
42
  [x: string]: (e: MouseEvent) => void;
46
43
  };
47
44
  setColumnIsHidden: (column: Column, value?: boolean) => void;
@@ -7,7 +7,6 @@ declare const _default: (props: TablePropTypes, ctx: any) => {
7
7
  renderFooter: (childrend?: any) => JSX.Element;
8
8
  renderFixedBottom: () => JSX.Element;
9
9
  setBodyHeight: (height: number) => void;
10
- setVirtualBodyHeight: (height: number) => void;
11
10
  setFootHeight: (height: number) => void;
12
11
  setTranslateX: (val: number) => void;
13
12
  setDragOffsetX: (val: number) => void;
@@ -17661,9 +17661,6 @@ var IColSortBehavior;
17661
17661
  */
17662
17662
  IColSortBehavior["interdependent"] = "interdependent";
17663
17663
  })(IColSortBehavior || (IColSortBehavior = {}));
17664
- // export enum BkScrollBehavior {
17665
- // AUTO = 'auto',
17666
- // };
17667
17664
  var tableProps = {
17668
17665
  /**
17669
17666
  * 渲染列表
@@ -17913,7 +17910,6 @@ var tableProps = {
17913
17910
  * 启用Scrollbar
17914
17911
  */
17915
17912
  scrollbar: shared_namespaceObject.PropTypes.bool.def(true),
17916
- // scrollbehavior: toType<`${ScrollBehavior}`>('ScrollBehavior', {
17917
17913
  /**
17918
17914
  * 固定在底部的配置项
17919
17915
  */
@@ -18130,14 +18126,13 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18130
18126
 
18131
18127
 
18132
18128
 
18129
+
18133
18130
  /* harmony default export */ const use_column_resize = (function (columns, _ref) {
18134
18131
  var afterResize = _ref.afterResize;
18135
18132
  var getColumnAttribute = columns.getColumnAttribute,
18136
18133
  getColumnOrderWidth = columns.getColumnOrderWidth,
18137
18134
  setColumnAttribute = columns.setColumnAttribute,
18138
- setNextColumnWidth = columns.setNextColumnWidth,
18139
- getPreColumn = columns.getPreColumn,
18140
- getLeftColumnsWidth = columns.getLeftColumnsWidth;
18135
+ setNextColumnWidth = columns.setNextColumnWidth;
18141
18136
  var getColListener = function getColListener(col) {
18142
18137
  return getColumnAttribute(col, COLUMN_ATTRIBUTE.LISTENERS);
18143
18138
  };
@@ -18153,11 +18148,7 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18153
18148
  var isDraging = false;
18154
18149
  var startX = 0;
18155
18150
  var dragColumn = null;
18156
- var poinerPlacement = 'right';
18157
- var headTable = null;
18158
- var mouseMoveColumn = null;
18159
- var dragWidth = 0;
18160
- var cellCursorStore = new WeakMap();
18151
+ var dragStartOffsetX = 0;
18161
18152
  var dragOffsetX = (0,external_vue_namespaceObject.ref)(-1000);
18162
18153
  var ORDER_LIST = [COLUMN_ATTRIBUTE.WIDTH];
18163
18154
  var stopDefaultEvent = function stopDefaultEvent(e) {
@@ -18166,100 +18157,93 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18166
18157
  e.preventDefault();
18167
18158
  };
18168
18159
  var handleMouseUp = function handleMouseUp(e) {
18160
+ stopDefaultEvent(e);
18169
18161
  isMouseDown = false;
18170
18162
  isDraging = false;
18171
- var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + dragWidth;
18163
+ var diff = e.clientX - startX;
18164
+ var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + diff;
18172
18165
  var minWidth = getColumnOrderWidth(dragColumn, [COLUMN_ATTRIBUTE.COL_MIN_WIDTH]);
18173
18166
  var calcWidth = resolveWidth > minWidth ? resolveWidth : minWidth;
18174
18167
  setNextColumnWidth(dragColumn, calcWidth);
18175
18168
  setColumnAttribute(dragColumn, COLUMN_ATTRIBUTE.WIDTH, calcWidth);
18176
18169
  document.removeEventListener('mouseup', handleMouseUp);
18170
+ document.removeEventListener('mousemove', handleMouseMove);
18171
+ startX = 0;
18177
18172
  dragOffsetX.value = -1000;
18178
- dragWidth = 0;
18179
- removeCursor(headTable);
18180
- afterResize === null || afterResize === void 0 || afterResize();
18181
- headTable = null;
18182
- var target = e.target;
18183
- handleMouseoutDragSection(target);
18184
18173
  dragColumn = null;
18174
+ var target = e.target.closest('th');
18175
+ removeCursor(target);
18176
+ afterResize === null || afterResize === void 0 || afterResize();
18185
18177
  };
18186
- var handleMouseDragMove = function handleMouseDragMove(e) {
18187
- document.body.style.setProperty('user-select', 'none');
18178
+ var updateOffsetX = function updateOffsetX(e) {
18179
+ return (0,shared_namespaceObject.throttle)(function () {
18180
+ var diff = e.clientX - startX;
18181
+ var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + diff;
18182
+ var minWidth = getColumnOrderWidth(dragColumn, [COLUMN_ATTRIBUTE.COL_MIN_WIDTH]);
18183
+ if (minWidth < resolveWidth) {
18184
+ dragOffsetX.value = e.clientX - startX + dragStartOffsetX;
18185
+ }
18186
+ });
18187
+ };
18188
+ var handleMouseMove = function handleMouseMove(e) {
18188
18189
  stopDefaultEvent(e);
18189
- var diff = e.clientX - startX;
18190
- dragWidth = dragWidth + diff;
18191
- startX = e.clientX;
18192
- var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + diff;
18193
- var minWidth = getColumnOrderWidth(dragColumn, [COLUMN_ATTRIBUTE.COL_MIN_WIDTH]);
18194
- if (minWidth < resolveWidth) {
18195
- dragOffsetX.value = dragOffsetX.value + diff;
18196
- }
18190
+ updateOffsetX(e)();
18197
18191
  };
18198
18192
  var setNodeCursor = function () {
18199
18193
  return (0,lodash.debounce)(function (target) {
18200
- document.body.style.setProperty('user-select', 'none');
18194
+ var _target$style;
18195
+ target === null || target === void 0 || (_target$style = target.style) === null || _target$style === void 0 || _target$style.setProperty('cursor', 'col-resize');
18201
18196
  target === null || target === void 0 || target.classList.add('col-resize-hover');
18202
18197
  });
18203
18198
  }();
18204
18199
  var removeCursor = function removeCursor(target) {
18200
+ var _target$style2;
18205
18201
  setNodeCursor.cancel();
18206
- document.body.style.removeProperty('user-select');
18202
+ target === null || target === void 0 || (_target$style2 = target.style) === null || _target$style2 === void 0 || _target$style2.removeProperty('cursor');
18207
18203
  target === null || target === void 0 || target.classList.remove('col-resize-hover');
18208
18204
  };
18209
- var handlemouseDownEvent = function handlemouseDownEvent(e) {
18205
+ var handler = defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, EVENTS.MOUSE_DOWN, function (e, column) {
18210
18206
  if (!isInDragSection) {
18211
18207
  return;
18212
18208
  }
18213
- startX = e.clientX;
18214
- var column = poinerPlacement === 'left' ? getPreColumn(mouseMoveColumn) : mouseMoveColumn;
18209
+ isMouseDown = true;
18210
+ var target = e.target.closest('th');
18215
18211
  setColumnAttribute(column, COLUMN_ATTRIBUTE.COL_IS_DRAG, true);
18212
+ setNodeCursor(target);
18216
18213
  dragColumn = column;
18217
- headTable = e.target.closest('table');
18218
- setNodeCursor(headTable);
18219
- isMouseDown = true;
18220
- };
18221
- var handleMouseoutDragSection = function handleMouseoutDragSection(target) {
18222
- if (!isDraging) {
18223
- dragOffsetX.value = -1000;
18224
- target.classList.remove('cell-resize');
18225
- cellCursorStore.set(target, false);
18226
- document.removeEventListener('mousedown', handlemouseDownEvent);
18227
- }
18228
- };
18229
- var handler = defineProperty_defineProperty(defineProperty_defineProperty({}, EVENTS.MOUSE_MOVE, function (e, column, index) {
18230
- if (isMouseDown) {
18214
+ startX = e.clientX;
18215
+ var targetTable = e.target.closest('table');
18216
+ dragStartOffsetX = startX - targetTable.getBoundingClientRect().left;
18217
+ updateOffsetX(e)();
18218
+ document.addEventListener('mouseup', handleMouseUp);
18219
+ document.addEventListener('mousemove', handleMouseMove);
18220
+ target === null || target === void 0 || target.classList.remove('col-resize-hover');
18221
+ }), EVENTS.MOUSE_MOVE, function (e, _column) {
18222
+ if (isMouseDown && !isDraging) {
18231
18223
  isDraging = true;
18232
- handleMouseDragMove(e);
18233
- return;
18234
18224
  }
18235
- var target = e.target;
18225
+ var target = e.target.closest('th');
18226
+ if (isDraging) {
18227
+ target.style.setProperty('user-select', 'none');
18228
+ }
18236
18229
  if (!isDraging) {
18237
18230
  if (!target) {
18238
18231
  return;
18239
18232
  }
18240
- var offsetWidth = target.offsetWidth;
18241
- var mouseOffsetX = e.offsetX;
18242
- if (offsetWidth > 12 && (offsetWidth - mouseOffsetX < 8 || mouseOffsetX < 8 && index > 0)) {
18233
+ var rect = target.getBoundingClientRect();
18234
+ if (rect.width > 12 && rect.right - e.pageX < 12) {
18243
18235
  isInDragSection = true;
18244
- poinerPlacement = mouseOffsetX < 8 ? 'left' : 'right';
18245
- if (!cellCursorStore.get(target)) {
18246
- cellCursorStore.set(target, true);
18247
- target.classList.add('cell-resize');
18248
- var offsetLeft = getLeftColumnsWidth(column, poinerPlacement === 'right');
18249
- console.log('-set offset');
18250
- dragOffsetX.value = offsetLeft;
18251
- mouseMoveColumn = column;
18252
- document.addEventListener('mousedown', handlemouseDownEvent);
18253
- document.addEventListener('mouseup', handleMouseUp);
18254
- }
18236
+ setNodeCursor(target);
18255
18237
  } else {
18238
+ removeCursor(target);
18256
18239
  isInDragSection = false;
18257
- handleMouseoutDragSection(target);
18258
18240
  }
18259
18241
  }
18260
- }), EVENTS.MOUSE_OUT, function (e, _column, _index) {
18261
- var target = e.target;
18262
- handleMouseoutDragSection(target);
18242
+ }), EVENTS.MOUSE_OUT, function (e, _column) {
18243
+ var target = e.target.closest('th');
18244
+ if (!isDraging) {
18245
+ removeCursor(target);
18246
+ }
18263
18247
  });
18264
18248
  var getEventName = function getEventName(event) {
18265
18249
  return "".concat(pluginName, "_").concat(event);
@@ -20254,7 +20238,7 @@ var useColumns = function useColumns(props) {
20254
20238
  }
20255
20239
  return minWidth;
20256
20240
  };
20257
- var resolveEventListener = function resolveEventListener(col, index) {
20241
+ var resolveEventListener = function resolveEventListener(col) {
20258
20242
  var listeners = getColumnAttribute(col, COLUMN_ATTRIBUTE.LISTENERS);
20259
20243
  if (!listeners) {
20260
20244
  return {};
@@ -20263,7 +20247,7 @@ var useColumns = function useColumns(props) {
20263
20247
  var eventName = key.split('_').slice(-1)[0];
20264
20248
  return Object.assign(handle, defineProperty_defineProperty({}, eventName, function (e) {
20265
20249
  listeners.get(key).forEach(function (fn) {
20266
- return Reflect.apply(fn, use_columns_this, [e, col, index]);
20250
+ return Reflect.apply(fn, use_columns_this, [e, col]);
20267
20251
  });
20268
20252
  }));
20269
20253
  }, {});
@@ -20637,35 +20621,6 @@ var useColumns = function useColumns(props) {
20637
20621
  setColumnAttribute(col, COLUMN_ATTRIBUTE.SELECTION_INDETERMINATE, false);
20638
20622
  }
20639
20623
  };
20640
- var getPreColumn = function getPreColumn(col) {
20641
- var index = visibleColumns.findIndex(function (item) {
20642
- return item === col;
20643
- });
20644
- var preIndex = index - 1;
20645
- return visibleColumns[preIndex];
20646
- };
20647
- var getColumnIndex = function getColumnIndex(col) {
20648
- return visibleColumns.findIndex(function (item) {
20649
- return item === col;
20650
- });
20651
- };
20652
- var getLeftColumnsWidth = function getLeftColumnsWidth(col) {
20653
- var includingSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
20654
- var isContinue = true;
20655
- var width = 0;
20656
- var index = 0;
20657
- while (isContinue) {
20658
- width = width + getColumnWidth(visibleColumns[index]);
20659
- index = index + 1;
20660
- if (col === visibleColumns[index]) {
20661
- if (includingSelf) {
20662
- width = width + getColumnWidth(visibleColumns[index]);
20663
- }
20664
- isContinue = false;
20665
- }
20666
- }
20667
- return width;
20668
- };
20669
20624
  return {
20670
20625
  needColSpan: needColSpan,
20671
20626
  needRowSpan: needRowSpan,
@@ -20693,10 +20648,7 @@ var useColumns = function useColumns(props) {
20693
20648
  getColumnRefAttribute: getColumnRefAttribute,
20694
20649
  getColumnCalcWidth: getColumnCalcWidth,
20695
20650
  getColumnWidth: getColumnWidth,
20696
- getLeftColumnsWidth: getLeftColumnsWidth,
20697
20651
  getGroupAttribute: getGroupAttribute,
20698
- getPreColumn: getPreColumn,
20699
- getColumnIndex: getColumnIndex,
20700
20652
  resolveEventListener: resolveEventListener,
20701
20653
  setColumnIsHidden: setColumnIsHidden,
20702
20654
  setColumnResizeWidth: setColumnResizeWidth,
@@ -21064,9 +21016,8 @@ const loading_less_namespaceObject = loading_less_x({ });
21064
21016
  var refScrollLoading = (0,external_vue_namespaceObject.toRef)(props, 'scrollLoading');
21065
21017
  var getLoadingOption = function getLoadingOption() {
21066
21018
  if (typeof refScrollLoading.value === 'boolean') {
21067
- var _props$fixedBottom$lo, _props$fixedBottom;
21068
21019
  return {
21069
- loading: !!refScrollLoading.value || ((_props$fixedBottom$lo = (_props$fixedBottom = props.fixedBottom) === null || _props$fixedBottom === void 0 ? void 0 : _props$fixedBottom.loading) !== null && _props$fixedBottom$lo !== void 0 ? _props$fixedBottom$lo : false),
21020
+ loading: !!refScrollLoading.value,
21070
21021
  inline: true,
21071
21022
  title: '',
21072
21023
  size: loading_namespaceObject.BkLoadingSize.Normal,
@@ -21077,8 +21028,7 @@ const loading_less_namespaceObject = loading_less_x({ });
21077
21028
  return refScrollLoading.value;
21078
21029
  };
21079
21030
  var isRender = (0,external_vue_namespaceObject.computed)(function () {
21080
- var _props$fixedBottom$lo2, _props$fixedBottom2;
21081
- return refScrollLoading.value !== null && (typeof refScrollLoading.value === 'boolean' && refScrollLoading.value || typeof_typeof(refScrollLoading.value) === 'object') || ((_props$fixedBottom$lo2 = (_props$fixedBottom2 = props.fixedBottom) === null || _props$fixedBottom2 === void 0 ? void 0 : _props$fixedBottom2.loading) !== null && _props$fixedBottom$lo2 !== void 0 ? _props$fixedBottom$lo2 : false);
21031
+ return refScrollLoading.value !== null && (typeof refScrollLoading.value === 'boolean' && refScrollLoading.value || typeof_typeof(refScrollLoading.value) === 'object');
21082
21032
  });
21083
21033
  var renderScrollLoading = function renderScrollLoading() {
21084
21034
  var _ctx$slots$fixedBotto3, _ctx$slots$fixedBotto4, _ctx$slots2;
@@ -21164,12 +21114,8 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21164
21114
  var lineHeight = (0,external_vue_namespaceObject.ref)((_props$rowHeight = props.rowHeight) !== null && _props$rowHeight !== void 0 ? _props$rowHeight : LINE_HEIGHT);
21165
21115
  var headerRowCount = (0,external_vue_namespaceObject.ref)(1);
21166
21116
  var fixedBottomHeight = (0,external_vue_namespaceObject.computed)(function () {
21167
- var _ctx$slots;
21168
- if ((_ctx$slots = ctx.slots) !== null && _ctx$slots !== void 0 && _ctx$slots.fixedBottom) {
21169
- var _props$fixedBottom, _props$fixedBottom$he, _props$fixedBottom2;
21170
- return ((_props$fixedBottom = props.fixedBottom) === null || _props$fixedBottom === void 0 ? void 0 : _props$fixedBottom.position) === 'relative' ? (_props$fixedBottom$he = (_props$fixedBottom2 = props.fixedBottom) === null || _props$fixedBottom2 === void 0 ? void 0 : _props$fixedBottom2.height) !== null && _props$fixedBottom$he !== void 0 ? _props$fixedBottom$he : LINE_HEIGHT : 0;
21171
- }
21172
- return 0;
21117
+ var _props$fixedBottom, _props$fixedBottom$he, _props$fixedBottom2, _props$fixedBottom$he2, _props$fixedBottom3;
21118
+ return ((_props$fixedBottom = props.fixedBottom) === null || _props$fixedBottom === void 0 ? void 0 : _props$fixedBottom.position) === 'relative' ? (_props$fixedBottom$he = (_props$fixedBottom2 = props.fixedBottom) === null || _props$fixedBottom2 === void 0 ? void 0 : _props$fixedBottom2.height) !== null && _props$fixedBottom$he !== void 0 ? _props$fixedBottom$he : LINE_HEIGHT : (_props$fixedBottom$he2 = (_props$fixedBottom3 = props.fixedBottom) === null || _props$fixedBottom3 === void 0 ? void 0 : _props$fixedBottom3.height) !== null && _props$fixedBottom$he2 !== void 0 ? _props$fixedBottom$he2 : 0;
21173
21119
  });
21174
21120
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
21175
21121
  resolveClassName = _usePrefix.resolveClassName;
@@ -21244,14 +21190,14 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21244
21190
  return (0,shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-footer'), true), 'is-hidden', footHeight.value === 0));
21245
21191
  });
21246
21192
  var renderContainer = function renderContainer(childrend) {
21247
- var _ctx$slots$default, _ctx$slots2;
21193
+ var _ctx$slots$default, _ctx$slots;
21248
21194
  return (0,external_vue_namespaceObject.createVNode)("div", {
21249
21195
  "ref": refRoot,
21250
21196
  "style": tableStyle.value,
21251
21197
  "class": tableClass.value
21252
21198
  }, [childrend, (0,external_vue_namespaceObject.createVNode)(ghost_body, null, {
21253
21199
  "default": function _default() {
21254
- return [(_ctx$slots$default = (_ctx$slots2 = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots2)];
21200
+ return [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)];
21255
21201
  }
21256
21202
  })]);
21257
21203
  };
@@ -21294,9 +21240,6 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21294
21240
  var setBodyHeight = function setBodyHeight(height) {
21295
21241
  bodyHeight.value = height - headHeight.value - fixedBottomHeight.value - footHeight.value;
21296
21242
  };
21297
- var setVirtualBodyHeight = function setVirtualBodyHeight(height) {
21298
- bodyHeight.value = height;
21299
- };
21300
21243
  var footHeight = (0,external_vue_namespaceObject.ref)(0);
21301
21244
  var footerStyle = (0,external_vue_namespaceObject.computed)(function () {
21302
21245
  return {
@@ -21356,11 +21299,11 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21356
21299
  var fixedWrapperClass = resolveClassName('table-fixed');
21357
21300
  var fixedBottomRow = resolveClassName('table-fixed-bottom');
21358
21301
  var fixedBottomLoadingStyle = (0,external_vue_namespaceObject.computed)(function () {
21359
- var _props$fixedBottom$po, _props$fixedBottom3, _props$fixedBottom$he2, _props$fixedBottom4;
21302
+ var _props$fixedBottom$po, _props$fixedBottom4, _props$fixedBottom$he3, _props$fixedBottom5;
21360
21303
  return {
21361
21304
  minHeight: "".concat(lineHeight.value, "px"),
21362
- position: (_props$fixedBottom$po = (_props$fixedBottom3 = props.fixedBottom) === null || _props$fixedBottom3 === void 0 ? void 0 : _props$fixedBottom3.position) !== null && _props$fixedBottom$po !== void 0 ? _props$fixedBottom$po : 'absolute',
21363
- height: (_props$fixedBottom$he2 = (_props$fixedBottom4 = props.fixedBottom) === null || _props$fixedBottom4 === void 0 ? void 0 : _props$fixedBottom4.height) !== null && _props$fixedBottom$he2 !== void 0 ? _props$fixedBottom$he2 : null
21305
+ position: (_props$fixedBottom$po = (_props$fixedBottom4 = props.fixedBottom) === null || _props$fixedBottom4 === void 0 ? void 0 : _props$fixedBottom4.position) !== null && _props$fixedBottom$po !== void 0 ? _props$fixedBottom$po : 'absolute',
21306
+ height: (_props$fixedBottom$he3 = (_props$fixedBottom5 = props.fixedBottom) === null || _props$fixedBottom5 === void 0 ? void 0 : _props$fixedBottom5.height) !== null && _props$fixedBottom$he3 !== void 0 ? _props$fixedBottom$he3 : null
21364
21307
  };
21365
21308
  });
21366
21309
  (0,external_vue_namespaceObject.onMounted)(function () {
@@ -21432,7 +21375,6 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21432
21375
  renderFooter: renderFooter,
21433
21376
  renderFixedBottom: renderFixedBottom,
21434
21377
  setBodyHeight: setBodyHeight,
21435
- setVirtualBodyHeight: setVirtualBodyHeight,
21436
21378
  setFootHeight: setFootHeight,
21437
21379
  setTranslateX: setTranslateX,
21438
21380
  setDragOffsetX: setDragOffsetX,
@@ -22971,7 +22913,7 @@ function use_head_isSlot(s) {
22971
22913
  "onClick": function onClick() {
22972
22914
  return handleColumnHeadClick();
22973
22915
  }
22974
- }, columns.resolveEventListener(column, index)), [renderHeadCell()]);
22916
+ }, columns.resolveEventListener(column)), [renderHeadCell()]);
22975
22917
  };
22976
22918
  return {
22977
22919
  getTH: getTH
@@ -23187,22 +23129,6 @@ function use_render_isSlot(s) {
23187
23129
  }, [renderColgroup(), renderHeader()]);
23188
23130
  };
23189
23131
  /** **************************************** Rows Render ******************************* **/
23190
- var renderAppendLastRow = function renderAppendLastRow() {
23191
- if (ctx.slots.appendLastRow) {
23192
- var rowId = 'append-last-row';
23193
- return (0,external_vue_namespaceObject.createVNode)(table_row, {
23194
- "key": rowId
23195
- }, {
23196
- "default": function _default() {
23197
- return [(0,external_vue_namespaceObject.createVNode)("tr", {
23198
- "key": rowId
23199
- }, [(0,external_vue_namespaceObject.createVNode)("td", {
23200
- "colspan": columns.visibleColumns.length
23201
- }, [ctx.slots.appendLastRow()])])];
23202
- }
23203
- });
23204
- }
23205
- };
23206
23132
  /**
23207
23133
  * 渲染Table Body
23208
23134
  * @returns
@@ -23215,7 +23141,7 @@ function use_render_isSlot(s) {
23215
23141
  var result = getRowRender(row, rowIndex, preRow, dataList, rowSpanMap, needRowSpan);
23216
23142
  preRow = row;
23217
23143
  return result;
23218
- }), renderAppendLastRow()]);
23144
+ })]);
23219
23145
  };
23220
23146
  var getRowHeight = function getRowHeight(row, rowIndex) {
23221
23147
  if (typeof props.rowHeight === 'function' || /^\d+/.test("".concat(props.rowHeight))) {