bkui-vue 2.0.1-beta.39 → 2.0.1-beta.39.table.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 (48) hide show
  1. package/dist/index.cjs.js +63 -63
  2. package/dist/index.esm.js +15769 -15734
  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/{scrollbar.css → css/scrollbar.css} +90 -75
  8. package/lib/scrollbar/css/scrollbar.less +139 -0
  9. package/lib/scrollbar/{scrollbar.variable.css → css/scrollbar.variable.css} +89 -74
  10. package/lib/scrollbar/handlers/click-rail.d.ts +2 -0
  11. package/lib/scrollbar/handlers/drag-thumb.d.ts +1 -0
  12. package/lib/scrollbar/handlers/keyboard.d.ts +2 -0
  13. package/lib/scrollbar/handlers/mouse-wheel.d.ts +2 -0
  14. package/lib/scrollbar/handlers/touch.d.ts +4 -0
  15. package/lib/scrollbar/helper/class-names.d.ts +21 -0
  16. package/lib/scrollbar/helper/css.d.ts +3 -0
  17. package/lib/scrollbar/helper/dom.d.ts +4 -0
  18. package/lib/scrollbar/helper/event-manager.d.ts +20 -0
  19. package/lib/scrollbar/helper/util.d.ts +11 -0
  20. package/lib/scrollbar/index.d.ts +133 -13
  21. package/lib/scrollbar/index.js +1331 -18489
  22. package/lib/scrollbar/process-scroll-diff.d.ts +1 -0
  23. package/lib/scrollbar/update-geometry.d.ts +8 -0
  24. package/lib/styles/index.d.ts +1 -0
  25. package/lib/table/hooks/use-columns.d.ts +4 -1
  26. package/lib/table/hooks/use-layout.d.ts +1 -0
  27. package/lib/table/index.js +140 -66
  28. package/lib/table/table.css +108 -115
  29. package/lib/table/table.less +24 -34
  30. package/lib/table/table.variable.css +108 -115
  31. package/lib/table-column/index.js +4 -0
  32. package/lib/tree/tree.css +90 -83
  33. package/lib/tree/tree.variable.css +90 -83
  34. package/lib/virtual-render/index.d.ts +0 -23
  35. package/lib/virtual-render/index.js +54 -106
  36. package/lib/virtual-render/props.d.ts +0 -6
  37. package/lib/virtual-render/use-scrollbar.d.ts +3 -17
  38. package/lib/virtual-render/virtual-render.css +89 -82
  39. package/lib/virtual-render/virtual-render.d.ts +0 -11
  40. package/lib/virtual-render/virtual-render.less +2 -11
  41. package/lib/virtual-render/virtual-render.variable.css +89 -82
  42. package/package.json +1 -1
  43. package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
  44. package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
  45. package/lib/scrollbar/scrollbar-core/index.d.ts +0 -242
  46. package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
  47. package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
  48. package/lib/scrollbar/scrollbar.less +0 -119
@@ -0,0 +1 @@
1
+ export default function (i: any, axis: any, diff: any, useScrollingClass?: boolean, forceFireReachEvent?: boolean): void;
@@ -0,0 +1,8 @@
1
+ import BkScrollbar from '.';
2
+ export type Placement = {
3
+ left?: number;
4
+ right?: number;
5
+ top?: number;
6
+ bottom?: number;
7
+ };
8
+ export default function (i: BkScrollbar): void;
@@ -56,3 +56,4 @@ 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,8 +37,11 @@ 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;
40
41
  getGroupAttribute: (group: Column) => IHeadGroup;
41
- resolveEventListener: (col: Column) => Record<string, (...args: any[]) => void> & {
42
+ getPreColumn: (col: Column) => Column;
43
+ getColumnIndex: (col: Column) => number;
44
+ resolveEventListener: (col: Column, index: number) => Record<string, (...args: any[]) => void> & {
42
45
  [x: string]: (e: MouseEvent) => void;
43
46
  };
44
47
  setColumnIsHidden: (column: Column, value?: boolean) => void;
@@ -7,6 +7,7 @@ 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;
10
11
  setFootHeight: (height: number) => void;
11
12
  setTranslateX: (val: number) => void;
12
13
  setDragOffsetX: (val: number) => void;
@@ -17661,6 +17661,9 @@ var IColSortBehavior;
17661
17661
  */
17662
17662
  IColSortBehavior["interdependent"] = "interdependent";
17663
17663
  })(IColSortBehavior || (IColSortBehavior = {}));
17664
+ // export enum BkScrollBehavior {
17665
+ // AUTO = 'auto',
17666
+ // };
17664
17667
  var tableProps = {
17665
17668
  /**
17666
17669
  * 渲染列表
@@ -17910,6 +17913,7 @@ var tableProps = {
17910
17913
  * 启用Scrollbar
17911
17914
  */
17912
17915
  scrollbar: shared_namespaceObject.PropTypes.bool.def(true),
17916
+ // scrollbehavior: toType<`${ScrollBehavior}`>('ScrollBehavior', {
17913
17917
  /**
17914
17918
  * 固定在底部的配置项
17915
17919
  */
@@ -18126,13 +18130,14 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18126
18130
 
18127
18131
 
18128
18132
 
18129
-
18130
18133
  /* harmony default export */ const use_column_resize = (function (columns, _ref) {
18131
18134
  var afterResize = _ref.afterResize;
18132
18135
  var getColumnAttribute = columns.getColumnAttribute,
18133
18136
  getColumnOrderWidth = columns.getColumnOrderWidth,
18134
18137
  setColumnAttribute = columns.setColumnAttribute,
18135
- setNextColumnWidth = columns.setNextColumnWidth;
18138
+ setNextColumnWidth = columns.setNextColumnWidth,
18139
+ getPreColumn = columns.getPreColumn,
18140
+ getLeftColumnsWidth = columns.getLeftColumnsWidth;
18136
18141
  var getColListener = function getColListener(col) {
18137
18142
  return getColumnAttribute(col, COLUMN_ATTRIBUTE.LISTENERS);
18138
18143
  };
@@ -18148,7 +18153,11 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18148
18153
  var isDraging = false;
18149
18154
  var startX = 0;
18150
18155
  var dragColumn = null;
18151
- var dragStartOffsetX = 0;
18156
+ var poinerPlacement = 'right';
18157
+ var headTable = null;
18158
+ var mouseMoveColumn = null;
18159
+ var dragWidth = 0;
18160
+ var cellCursorStore = new WeakMap();
18152
18161
  var dragOffsetX = (0,external_vue_namespaceObject.ref)(-1000);
18153
18162
  var ORDER_LIST = [COLUMN_ATTRIBUTE.WIDTH];
18154
18163
  var stopDefaultEvent = function stopDefaultEvent(e) {
@@ -18157,93 +18166,100 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18157
18166
  e.preventDefault();
18158
18167
  };
18159
18168
  var handleMouseUp = function handleMouseUp(e) {
18160
- stopDefaultEvent(e);
18161
18169
  isMouseDown = false;
18162
18170
  isDraging = false;
18163
- var diff = e.clientX - startX;
18164
- var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + diff;
18171
+ var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + dragWidth;
18165
18172
  var minWidth = getColumnOrderWidth(dragColumn, [COLUMN_ATTRIBUTE.COL_MIN_WIDTH]);
18166
18173
  var calcWidth = resolveWidth > minWidth ? resolveWidth : minWidth;
18167
18174
  setNextColumnWidth(dragColumn, calcWidth);
18168
18175
  setColumnAttribute(dragColumn, COLUMN_ATTRIBUTE.WIDTH, calcWidth);
18169
18176
  document.removeEventListener('mouseup', handleMouseUp);
18170
- document.removeEventListener('mousemove', handleMouseMove);
18171
- startX = 0;
18172
18177
  dragOffsetX.value = -1000;
18173
- dragColumn = null;
18174
- var target = e.target.closest('th');
18175
- removeCursor(target);
18178
+ dragWidth = 0;
18179
+ removeCursor(headTable);
18176
18180
  afterResize === null || afterResize === void 0 || afterResize();
18181
+ headTable = null;
18182
+ var target = e.target;
18183
+ handleMouseoutDragSection(target);
18184
+ dragColumn = null;
18177
18185
  };
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) {
18186
+ var handleMouseDragMove = function handleMouseDragMove(e) {
18187
+ document.body.style.setProperty('user-select', 'none');
18189
18188
  stopDefaultEvent(e);
18190
- updateOffsetX(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
+ }
18191
18197
  };
18192
18198
  var setNodeCursor = function () {
18193
18199
  return (0,lodash.debounce)(function (target) {
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');
18200
+ document.body.style.setProperty('user-select', 'none');
18196
18201
  target === null || target === void 0 || target.classList.add('col-resize-hover');
18197
18202
  });
18198
18203
  }();
18199
18204
  var removeCursor = function removeCursor(target) {
18200
- var _target$style2;
18201
18205
  setNodeCursor.cancel();
18202
- target === null || target === void 0 || (_target$style2 = target.style) === null || _target$style2 === void 0 || _target$style2.removeProperty('cursor');
18206
+ document.body.style.removeProperty('user-select');
18203
18207
  target === null || target === void 0 || target.classList.remove('col-resize-hover');
18204
18208
  };
18205
- var handler = defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, EVENTS.MOUSE_DOWN, function (e, column) {
18209
+ var handlemouseDownEvent = function handlemouseDownEvent(e) {
18206
18210
  if (!isInDragSection) {
18207
18211
  return;
18208
18212
  }
18209
- isMouseDown = true;
18210
- var target = e.target.closest('th');
18213
+ startX = e.clientX;
18214
+ var column = poinerPlacement === 'left' ? getPreColumn(mouseMoveColumn) : mouseMoveColumn;
18211
18215
  setColumnAttribute(column, COLUMN_ATTRIBUTE.COL_IS_DRAG, true);
18212
- setNodeCursor(target);
18213
18216
  dragColumn = column;
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) {
18223
- isDraging = true;
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);
18224
18227
  }
18225
- var target = e.target.closest('th');
18226
- if (isDraging) {
18227
- target.style.setProperty('user-select', 'none');
18228
+ };
18229
+ var handler = defineProperty_defineProperty(defineProperty_defineProperty({}, EVENTS.MOUSE_MOVE, function (e, column, index) {
18230
+ if (isMouseDown) {
18231
+ isDraging = true;
18232
+ handleMouseDragMove(e);
18233
+ return;
18228
18234
  }
18235
+ var target = e.target;
18229
18236
  if (!isDraging) {
18230
18237
  if (!target) {
18231
18238
  return;
18232
18239
  }
18233
- var rect = target.getBoundingClientRect();
18234
- if (rect.width > 12 && rect.right - e.pageX < 12) {
18240
+ var offsetWidth = target.offsetWidth;
18241
+ var mouseOffsetX = e.offsetX;
18242
+ if (offsetWidth > 12 && (offsetWidth - mouseOffsetX < 8 || mouseOffsetX < 8 && index > 0)) {
18235
18243
  isInDragSection = true;
18236
- setNodeCursor(target);
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
+ }
18237
18255
  } else {
18238
- removeCursor(target);
18239
18256
  isInDragSection = false;
18257
+ handleMouseoutDragSection(target);
18240
18258
  }
18241
18259
  }
18242
- }), EVENTS.MOUSE_OUT, function (e, _column) {
18243
- var target = e.target.closest('th');
18244
- if (!isDraging) {
18245
- removeCursor(target);
18246
- }
18260
+ }), EVENTS.MOUSE_OUT, function (e, _column, _index) {
18261
+ var target = e.target;
18262
+ handleMouseoutDragSection(target);
18247
18263
  });
18248
18264
  var getEventName = function getEventName(event) {
18249
18265
  return "".concat(pluginName, "_").concat(event);
@@ -20238,7 +20254,7 @@ var useColumns = function useColumns(props) {
20238
20254
  }
20239
20255
  return minWidth;
20240
20256
  };
20241
- var resolveEventListener = function resolveEventListener(col) {
20257
+ var resolveEventListener = function resolveEventListener(col, index) {
20242
20258
  var listeners = getColumnAttribute(col, COLUMN_ATTRIBUTE.LISTENERS);
20243
20259
  if (!listeners) {
20244
20260
  return {};
@@ -20247,7 +20263,7 @@ var useColumns = function useColumns(props) {
20247
20263
  var eventName = key.split('_').slice(-1)[0];
20248
20264
  return Object.assign(handle, defineProperty_defineProperty({}, eventName, function (e) {
20249
20265
  listeners.get(key).forEach(function (fn) {
20250
- return Reflect.apply(fn, use_columns_this, [e, col]);
20266
+ return Reflect.apply(fn, use_columns_this, [e, col, index]);
20251
20267
  });
20252
20268
  }));
20253
20269
  }, {});
@@ -20621,6 +20637,35 @@ var useColumns = function useColumns(props) {
20621
20637
  setColumnAttribute(col, COLUMN_ATTRIBUTE.SELECTION_INDETERMINATE, false);
20622
20638
  }
20623
20639
  };
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
+ };
20624
20669
  return {
20625
20670
  needColSpan: needColSpan,
20626
20671
  needRowSpan: needRowSpan,
@@ -20648,7 +20693,10 @@ var useColumns = function useColumns(props) {
20648
20693
  getColumnRefAttribute: getColumnRefAttribute,
20649
20694
  getColumnCalcWidth: getColumnCalcWidth,
20650
20695
  getColumnWidth: getColumnWidth,
20696
+ getLeftColumnsWidth: getLeftColumnsWidth,
20651
20697
  getGroupAttribute: getGroupAttribute,
20698
+ getPreColumn: getPreColumn,
20699
+ getColumnIndex: getColumnIndex,
20652
20700
  resolveEventListener: resolveEventListener,
20653
20701
  setColumnIsHidden: setColumnIsHidden,
20654
20702
  setColumnResizeWidth: setColumnResizeWidth,
@@ -21016,8 +21064,9 @@ const loading_less_namespaceObject = loading_less_x({ });
21016
21064
  var refScrollLoading = (0,external_vue_namespaceObject.toRef)(props, 'scrollLoading');
21017
21065
  var getLoadingOption = function getLoadingOption() {
21018
21066
  if (typeof refScrollLoading.value === 'boolean') {
21067
+ var _props$fixedBottom$lo, _props$fixedBottom;
21019
21068
  return {
21020
- loading: !!refScrollLoading.value,
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),
21021
21070
  inline: true,
21022
21071
  title: '',
21023
21072
  size: loading_namespaceObject.BkLoadingSize.Normal,
@@ -21028,7 +21077,8 @@ const loading_less_namespaceObject = loading_less_x({ });
21028
21077
  return refScrollLoading.value;
21029
21078
  };
21030
21079
  var isRender = (0,external_vue_namespaceObject.computed)(function () {
21031
- return refScrollLoading.value !== null && (typeof refScrollLoading.value === 'boolean' && refScrollLoading.value || typeof_typeof(refScrollLoading.value) === 'object');
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);
21032
21082
  });
21033
21083
  var renderScrollLoading = function renderScrollLoading() {
21034
21084
  var _ctx$slots$fixedBotto3, _ctx$slots$fixedBotto4, _ctx$slots2;
@@ -21114,8 +21164,12 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21114
21164
  var lineHeight = (0,external_vue_namespaceObject.ref)((_props$rowHeight = props.rowHeight) !== null && _props$rowHeight !== void 0 ? _props$rowHeight : LINE_HEIGHT);
21115
21165
  var headerRowCount = (0,external_vue_namespaceObject.ref)(1);
21116
21166
  var fixedBottomHeight = (0,external_vue_namespaceObject.computed)(function () {
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;
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;
21119
21173
  });
21120
21174
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
21121
21175
  resolveClassName = _usePrefix.resolveClassName;
@@ -21190,14 +21244,14 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21190
21244
  return (0,shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-footer'), true), 'is-hidden', footHeight.value === 0));
21191
21245
  });
21192
21246
  var renderContainer = function renderContainer(childrend) {
21193
- var _ctx$slots$default, _ctx$slots;
21247
+ var _ctx$slots$default, _ctx$slots2;
21194
21248
  return (0,external_vue_namespaceObject.createVNode)("div", {
21195
21249
  "ref": refRoot,
21196
21250
  "style": tableStyle.value,
21197
21251
  "class": tableClass.value
21198
21252
  }, [childrend, (0,external_vue_namespaceObject.createVNode)(ghost_body, null, {
21199
21253
  "default": function _default() {
21200
- return [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)];
21254
+ return [(_ctx$slots$default = (_ctx$slots2 = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots2)];
21201
21255
  }
21202
21256
  })]);
21203
21257
  };
@@ -21240,6 +21294,9 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21240
21294
  var setBodyHeight = function setBodyHeight(height) {
21241
21295
  bodyHeight.value = height - headHeight.value - fixedBottomHeight.value - footHeight.value;
21242
21296
  };
21297
+ var setVirtualBodyHeight = function setVirtualBodyHeight(height) {
21298
+ bodyHeight.value = height;
21299
+ };
21243
21300
  var footHeight = (0,external_vue_namespaceObject.ref)(0);
21244
21301
  var footerStyle = (0,external_vue_namespaceObject.computed)(function () {
21245
21302
  return {
@@ -21299,11 +21356,11 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21299
21356
  var fixedWrapperClass = resolveClassName('table-fixed');
21300
21357
  var fixedBottomRow = resolveClassName('table-fixed-bottom');
21301
21358
  var fixedBottomLoadingStyle = (0,external_vue_namespaceObject.computed)(function () {
21302
- var _props$fixedBottom$po, _props$fixedBottom4, _props$fixedBottom$he3, _props$fixedBottom5;
21359
+ var _props$fixedBottom$po, _props$fixedBottom3, _props$fixedBottom$he2, _props$fixedBottom4;
21303
21360
  return {
21304
21361
  minHeight: "".concat(lineHeight.value, "px"),
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
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
21307
21364
  };
21308
21365
  });
21309
21366
  (0,external_vue_namespaceObject.onMounted)(function () {
@@ -21375,6 +21432,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21375
21432
  renderFooter: renderFooter,
21376
21433
  renderFixedBottom: renderFixedBottom,
21377
21434
  setBodyHeight: setBodyHeight,
21435
+ setVirtualBodyHeight: setVirtualBodyHeight,
21378
21436
  setFootHeight: setFootHeight,
21379
21437
  setTranslateX: setTranslateX,
21380
21438
  setDragOffsetX: setDragOffsetX,
@@ -22913,7 +22971,7 @@ function use_head_isSlot(s) {
22913
22971
  "onClick": function onClick() {
22914
22972
  return handleColumnHeadClick();
22915
22973
  }
22916
- }, columns.resolveEventListener(column)), [renderHeadCell()]);
22974
+ }, columns.resolveEventListener(column, index)), [renderHeadCell()]);
22917
22975
  };
22918
22976
  return {
22919
22977
  getTH: getTH
@@ -23129,6 +23187,22 @@ function use_render_isSlot(s) {
23129
23187
  }, [renderColgroup(), renderHeader()]);
23130
23188
  };
23131
23189
  /** **************************************** 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
+ };
23132
23206
  /**
23133
23207
  * 渲染Table Body
23134
23208
  * @returns
@@ -23141,7 +23215,7 @@ function use_render_isSlot(s) {
23141
23215
  var result = getRowRender(row, rowIndex, preRow, dataList, rowSpanMap, needRowSpan);
23142
23216
  preRow = row;
23143
23217
  return result;
23144
- })]);
23218
+ }), renderAppendLastRow()]);
23145
23219
  };
23146
23220
  var getRowHeight = function getRowHeight(row, rowIndex) {
23147
23221
  if (typeof props.rowHeight === 'function' || /^\d+/.test("".concat(props.rowHeight))) {