bkui-vue 2.0.1-beta.38 → 2.0.1-beta.39.table.1

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/dist/index.cjs.js +62 -62
  2. package/dist/index.esm.js +15612 -15582
  3. package/dist/index.umd.js +62 -62
  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/info-box/index.js +3 -5
  8. package/lib/scrollbar/handlers/click-rail.d.ts +2 -0
  9. package/lib/scrollbar/handlers/drag-thumb.d.ts +1 -0
  10. package/lib/scrollbar/handlers/keyboard.d.ts +2 -0
  11. package/lib/scrollbar/handlers/mouse-wheel.d.ts +2 -0
  12. package/lib/scrollbar/handlers/touch.d.ts +4 -0
  13. package/lib/scrollbar/helper/class-names.d.ts +21 -0
  14. package/lib/scrollbar/helper/css.d.ts +3 -0
  15. package/lib/scrollbar/helper/dom.d.ts +4 -0
  16. package/lib/scrollbar/helper/event-manager.d.ts +20 -0
  17. package/lib/scrollbar/helper/util.d.ts +11 -0
  18. package/lib/scrollbar/index.d.ts +133 -13
  19. package/lib/scrollbar/index.js +1331 -18489
  20. package/lib/scrollbar/process-scroll-diff.d.ts +1 -0
  21. package/lib/scrollbar/update-geometry.d.ts +8 -0
  22. package/lib/table/hooks/use-columns.d.ts +4 -1
  23. package/lib/table/index.js +126 -64
  24. package/lib/table/table.css +109 -115
  25. package/lib/table/table.less +22 -34
  26. package/lib/table/table.variable.css +109 -115
  27. package/lib/tree/tree.css +93 -83
  28. package/lib/tree/tree.variable.css +93 -83
  29. package/lib/virtual-render/index.d.ts +0 -23
  30. package/lib/virtual-render/index.js +54 -106
  31. package/lib/virtual-render/props.d.ts +0 -6
  32. package/lib/virtual-render/use-scrollbar.d.ts +3 -17
  33. package/lib/virtual-render/virtual-render.css +92 -82
  34. package/lib/virtual-render/virtual-render.d.ts +0 -11
  35. package/lib/virtual-render/virtual-render.less +2 -11
  36. package/lib/virtual-render/virtual-render.variable.css +92 -82
  37. package/package.json +1 -1
  38. package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
  39. package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
  40. package/lib/scrollbar/scrollbar-core/index.d.ts +0 -242
  41. package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
  42. package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
  43. package/lib/scrollbar/scrollbar.css +0 -224
  44. package/lib/scrollbar/scrollbar.less +0 -119
  45. package/lib/scrollbar/scrollbar.variable.css +0 -484
@@ -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;
@@ -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;
@@ -18126,13 +18126,14 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18126
18126
 
18127
18127
 
18128
18128
 
18129
-
18130
18129
  /* harmony default export */ const use_column_resize = (function (columns, _ref) {
18131
18130
  var afterResize = _ref.afterResize;
18132
18131
  var getColumnAttribute = columns.getColumnAttribute,
18133
18132
  getColumnOrderWidth = columns.getColumnOrderWidth,
18134
18133
  setColumnAttribute = columns.setColumnAttribute,
18135
- setNextColumnWidth = columns.setNextColumnWidth;
18134
+ setNextColumnWidth = columns.setNextColumnWidth,
18135
+ getPreColumn = columns.getPreColumn,
18136
+ getLeftColumnsWidth = columns.getLeftColumnsWidth;
18136
18137
  var getColListener = function getColListener(col) {
18137
18138
  return getColumnAttribute(col, COLUMN_ATTRIBUTE.LISTENERS);
18138
18139
  };
@@ -18148,7 +18149,11 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18148
18149
  var isDraging = false;
18149
18150
  var startX = 0;
18150
18151
  var dragColumn = null;
18151
- var dragStartOffsetX = 0;
18152
+ var poinerPlacement = 'right';
18153
+ var headTable = null;
18154
+ var mouseMoveColumn = null;
18155
+ var dragWidth = 0;
18156
+ var cellCursorStore = new WeakMap();
18152
18157
  var dragOffsetX = (0,external_vue_namespaceObject.ref)(-1000);
18153
18158
  var ORDER_LIST = [COLUMN_ATTRIBUTE.WIDTH];
18154
18159
  var stopDefaultEvent = function stopDefaultEvent(e) {
@@ -18157,93 +18162,100 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
18157
18162
  e.preventDefault();
18158
18163
  };
18159
18164
  var handleMouseUp = function handleMouseUp(e) {
18160
- stopDefaultEvent(e);
18161
18165
  isMouseDown = false;
18162
18166
  isDraging = false;
18163
- var diff = e.clientX - startX;
18164
- var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + diff;
18167
+ var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + dragWidth;
18165
18168
  var minWidth = getColumnOrderWidth(dragColumn, [COLUMN_ATTRIBUTE.COL_MIN_WIDTH]);
18166
18169
  var calcWidth = resolveWidth > minWidth ? resolveWidth : minWidth;
18167
18170
  setNextColumnWidth(dragColumn, calcWidth);
18168
18171
  setColumnAttribute(dragColumn, COLUMN_ATTRIBUTE.WIDTH, calcWidth);
18169
18172
  document.removeEventListener('mouseup', handleMouseUp);
18170
- document.removeEventListener('mousemove', handleMouseMove);
18171
- startX = 0;
18172
18173
  dragOffsetX.value = -1000;
18173
- dragColumn = null;
18174
- var target = e.target.closest('th');
18175
- removeCursor(target);
18174
+ dragWidth = 0;
18175
+ removeCursor(headTable);
18176
18176
  afterResize === null || afterResize === void 0 || afterResize();
18177
+ headTable = null;
18178
+ var target = e.target;
18179
+ handleMouseoutDragSection(target);
18180
+ dragColumn = null;
18177
18181
  };
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) {
18182
+ var handleMouseDragMove = function handleMouseDragMove(e) {
18183
+ document.body.style.setProperty('user-select', 'none');
18189
18184
  stopDefaultEvent(e);
18190
- updateOffsetX(e)();
18185
+ var diff = e.clientX - startX;
18186
+ dragWidth = dragWidth + diff;
18187
+ startX = e.clientX;
18188
+ var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + diff;
18189
+ var minWidth = getColumnOrderWidth(dragColumn, [COLUMN_ATTRIBUTE.COL_MIN_WIDTH]);
18190
+ if (minWidth < resolveWidth) {
18191
+ dragOffsetX.value = dragOffsetX.value + diff;
18192
+ }
18191
18193
  };
18192
18194
  var setNodeCursor = function () {
18193
18195
  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');
18196
+ document.body.style.setProperty('user-select', 'none');
18196
18197
  target === null || target === void 0 || target.classList.add('col-resize-hover');
18197
18198
  });
18198
18199
  }();
18199
18200
  var removeCursor = function removeCursor(target) {
18200
- var _target$style2;
18201
18201
  setNodeCursor.cancel();
18202
- target === null || target === void 0 || (_target$style2 = target.style) === null || _target$style2 === void 0 || _target$style2.removeProperty('cursor');
18202
+ document.body.style.removeProperty('user-select');
18203
18203
  target === null || target === void 0 || target.classList.remove('col-resize-hover');
18204
18204
  };
18205
- var handler = defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, EVENTS.MOUSE_DOWN, function (e, column) {
18205
+ var handlemouseDownEvent = function handlemouseDownEvent(e) {
18206
18206
  if (!isInDragSection) {
18207
18207
  return;
18208
18208
  }
18209
- isMouseDown = true;
18210
- var target = e.target.closest('th');
18209
+ startX = e.clientX;
18210
+ var column = poinerPlacement === 'left' ? getPreColumn(mouseMoveColumn) : mouseMoveColumn;
18211
18211
  setColumnAttribute(column, COLUMN_ATTRIBUTE.COL_IS_DRAG, true);
18212
- setNodeCursor(target);
18213
18212
  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;
18213
+ headTable = e.target.closest('table');
18214
+ setNodeCursor(headTable);
18215
+ isMouseDown = true;
18216
+ };
18217
+ var handleMouseoutDragSection = function handleMouseoutDragSection(target) {
18218
+ if (!isDraging) {
18219
+ dragOffsetX.value = -1000;
18220
+ target.classList.remove('cell-resize');
18221
+ cellCursorStore.set(target, false);
18222
+ document.removeEventListener('mousedown', handlemouseDownEvent);
18224
18223
  }
18225
- var target = e.target.closest('th');
18226
- if (isDraging) {
18227
- target.style.setProperty('user-select', 'none');
18224
+ };
18225
+ var handler = defineProperty_defineProperty(defineProperty_defineProperty({}, EVENTS.MOUSE_MOVE, function (e, column, index) {
18226
+ if (isMouseDown) {
18227
+ isDraging = true;
18228
+ handleMouseDragMove(e);
18229
+ return;
18228
18230
  }
18231
+ var target = e.target;
18229
18232
  if (!isDraging) {
18230
18233
  if (!target) {
18231
18234
  return;
18232
18235
  }
18233
- var rect = target.getBoundingClientRect();
18234
- if (rect.width > 12 && rect.right - e.pageX < 12) {
18236
+ var offsetWidth = target.offsetWidth;
18237
+ var mouseOffsetX = e.offsetX;
18238
+ if (offsetWidth > 12 && (offsetWidth - mouseOffsetX < 8 || mouseOffsetX < 8 && index > 0)) {
18235
18239
  isInDragSection = true;
18236
- setNodeCursor(target);
18240
+ poinerPlacement = mouseOffsetX < 8 ? 'left' : 'right';
18241
+ if (!cellCursorStore.get(target)) {
18242
+ cellCursorStore.set(target, true);
18243
+ target.classList.add('cell-resize');
18244
+ var offsetLeft = getLeftColumnsWidth(column, poinerPlacement === 'right');
18245
+ console.log('-set offset');
18246
+ dragOffsetX.value = offsetLeft;
18247
+ mouseMoveColumn = column;
18248
+ document.addEventListener('mousedown', handlemouseDownEvent);
18249
+ document.addEventListener('mouseup', handleMouseUp);
18250
+ }
18237
18251
  } else {
18238
- removeCursor(target);
18239
18252
  isInDragSection = false;
18253
+ handleMouseoutDragSection(target);
18240
18254
  }
18241
18255
  }
18242
- }), EVENTS.MOUSE_OUT, function (e, _column) {
18243
- var target = e.target.closest('th');
18244
- if (!isDraging) {
18245
- removeCursor(target);
18246
- }
18256
+ }), EVENTS.MOUSE_OUT, function (e, _column, _index) {
18257
+ var target = e.target;
18258
+ handleMouseoutDragSection(target);
18247
18259
  });
18248
18260
  var getEventName = function getEventName(event) {
18249
18261
  return "".concat(pluginName, "_").concat(event);
@@ -20238,7 +20250,7 @@ var useColumns = function useColumns(props) {
20238
20250
  }
20239
20251
  return minWidth;
20240
20252
  };
20241
- var resolveEventListener = function resolveEventListener(col) {
20253
+ var resolveEventListener = function resolveEventListener(col, index) {
20242
20254
  var listeners = getColumnAttribute(col, COLUMN_ATTRIBUTE.LISTENERS);
20243
20255
  if (!listeners) {
20244
20256
  return {};
@@ -20247,7 +20259,7 @@ var useColumns = function useColumns(props) {
20247
20259
  var eventName = key.split('_').slice(-1)[0];
20248
20260
  return Object.assign(handle, defineProperty_defineProperty({}, eventName, function (e) {
20249
20261
  listeners.get(key).forEach(function (fn) {
20250
- return Reflect.apply(fn, use_columns_this, [e, col]);
20262
+ return Reflect.apply(fn, use_columns_this, [e, col, index]);
20251
20263
  });
20252
20264
  }));
20253
20265
  }, {});
@@ -20621,6 +20633,35 @@ var useColumns = function useColumns(props) {
20621
20633
  setColumnAttribute(col, COLUMN_ATTRIBUTE.SELECTION_INDETERMINATE, false);
20622
20634
  }
20623
20635
  };
20636
+ var getPreColumn = function getPreColumn(col) {
20637
+ var index = visibleColumns.findIndex(function (item) {
20638
+ return item === col;
20639
+ });
20640
+ var preIndex = index - 1;
20641
+ return visibleColumns[preIndex];
20642
+ };
20643
+ var getColumnIndex = function getColumnIndex(col) {
20644
+ return visibleColumns.findIndex(function (item) {
20645
+ return item === col;
20646
+ });
20647
+ };
20648
+ var getLeftColumnsWidth = function getLeftColumnsWidth(col) {
20649
+ var includingSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
20650
+ var isContinue = true;
20651
+ var width = 0;
20652
+ var index = 0;
20653
+ while (isContinue) {
20654
+ width = width + getColumnWidth(visibleColumns[index]);
20655
+ index = index + 1;
20656
+ if (col === visibleColumns[index]) {
20657
+ if (includingSelf) {
20658
+ width = width + getColumnWidth(visibleColumns[index]);
20659
+ }
20660
+ isContinue = false;
20661
+ }
20662
+ }
20663
+ return width;
20664
+ };
20624
20665
  return {
20625
20666
  needColSpan: needColSpan,
20626
20667
  needRowSpan: needRowSpan,
@@ -20648,7 +20689,10 @@ var useColumns = function useColumns(props) {
20648
20689
  getColumnRefAttribute: getColumnRefAttribute,
20649
20690
  getColumnCalcWidth: getColumnCalcWidth,
20650
20691
  getColumnWidth: getColumnWidth,
20692
+ getLeftColumnsWidth: getLeftColumnsWidth,
20651
20693
  getGroupAttribute: getGroupAttribute,
20694
+ getPreColumn: getPreColumn,
20695
+ getColumnIndex: getColumnIndex,
20652
20696
  resolveEventListener: resolveEventListener,
20653
20697
  setColumnIsHidden: setColumnIsHidden,
20654
20698
  setColumnResizeWidth: setColumnResizeWidth,
@@ -21016,8 +21060,9 @@ const loading_less_namespaceObject = loading_less_x({ });
21016
21060
  var refScrollLoading = (0,external_vue_namespaceObject.toRef)(props, 'scrollLoading');
21017
21061
  var getLoadingOption = function getLoadingOption() {
21018
21062
  if (typeof refScrollLoading.value === 'boolean') {
21063
+ var _props$fixedBottom$lo, _props$fixedBottom;
21019
21064
  return {
21020
- loading: !!refScrollLoading.value,
21065
+ 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
21066
  inline: true,
21022
21067
  title: '',
21023
21068
  size: loading_namespaceObject.BkLoadingSize.Normal,
@@ -21028,7 +21073,8 @@ const loading_less_namespaceObject = loading_less_x({ });
21028
21073
  return refScrollLoading.value;
21029
21074
  };
21030
21075
  var isRender = (0,external_vue_namespaceObject.computed)(function () {
21031
- return refScrollLoading.value !== null && (typeof refScrollLoading.value === 'boolean' && refScrollLoading.value || typeof_typeof(refScrollLoading.value) === 'object');
21076
+ var _props$fixedBottom$lo2, _props$fixedBottom2;
21077
+ 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
21078
  });
21033
21079
  var renderScrollLoading = function renderScrollLoading() {
21034
21080
  var _ctx$slots$fixedBotto3, _ctx$slots$fixedBotto4, _ctx$slots2;
@@ -21114,8 +21160,8 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21114
21160
  var lineHeight = (0,external_vue_namespaceObject.ref)((_props$rowHeight = props.rowHeight) !== null && _props$rowHeight !== void 0 ? _props$rowHeight : LINE_HEIGHT);
21115
21161
  var headerRowCount = (0,external_vue_namespaceObject.ref)(1);
21116
21162
  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;
21163
+ var _props$fixedBottom, _props$fixedBottom$he, _props$fixedBottom2;
21164
+ 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;
21119
21165
  });
21120
21166
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
21121
21167
  resolveClassName = _usePrefix.resolveClassName;
@@ -21299,11 +21345,11 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21299
21345
  var fixedWrapperClass = resolveClassName('table-fixed');
21300
21346
  var fixedBottomRow = resolveClassName('table-fixed-bottom');
21301
21347
  var fixedBottomLoadingStyle = (0,external_vue_namespaceObject.computed)(function () {
21302
- var _props$fixedBottom$po, _props$fixedBottom4, _props$fixedBottom$he3, _props$fixedBottom5;
21348
+ var _props$fixedBottom$po, _props$fixedBottom3, _props$fixedBottom$he2, _props$fixedBottom4;
21303
21349
  return {
21304
21350
  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
21351
+ 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',
21352
+ 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
21353
  };
21308
21354
  });
21309
21355
  (0,external_vue_namespaceObject.onMounted)(function () {
@@ -22913,7 +22959,7 @@ function use_head_isSlot(s) {
22913
22959
  "onClick": function onClick() {
22914
22960
  return handleColumnHeadClick();
22915
22961
  }
22916
- }, columns.resolveEventListener(column)), [renderHeadCell()]);
22962
+ }, columns.resolveEventListener(column, index)), [renderHeadCell()]);
22917
22963
  };
22918
22964
  return {
22919
22965
  getTH: getTH
@@ -23129,6 +23175,22 @@ function use_render_isSlot(s) {
23129
23175
  }, [renderColgroup(), renderHeader()]);
23130
23176
  };
23131
23177
  /** **************************************** Rows Render ******************************* **/
23178
+ var renderAppendLastRow = function renderAppendLastRow() {
23179
+ if (ctx.slots.appendLastRow) {
23180
+ var rowId = 'append-last-row';
23181
+ return (0,external_vue_namespaceObject.createVNode)(table_row, {
23182
+ "key": rowId
23183
+ }, {
23184
+ "default": function _default() {
23185
+ return [(0,external_vue_namespaceObject.createVNode)("tr", {
23186
+ "key": rowId
23187
+ }, [(0,external_vue_namespaceObject.createVNode)("td", {
23188
+ "colspan": columns.visibleColumns.length
23189
+ }, [ctx.slots.appendLastRow()])])];
23190
+ }
23191
+ });
23192
+ }
23193
+ };
23132
23194
  /**
23133
23195
  * 渲染Table Body
23134
23196
  * @returns
@@ -23141,7 +23203,7 @@ function use_render_isSlot(s) {
23141
23203
  var result = getRowRender(row, rowIndex, preRow, dataList, rowSpanMap, needRowSpan);
23142
23204
  preRow = row;
23143
23205
  return result;
23144
- })]);
23206
+ }), renderAppendLastRow()]);
23145
23207
  };
23146
23208
  var getRowHeight = function getRowHeight(row, rowIndex) {
23147
23209
  if (typeof props.rowHeight === 'function' || /^\d+/.test("".concat(props.rowHeight))) {
@@ -145,111 +145,121 @@
145
145
  .bk-F-scroll-y::-webkit-scrollbar-thumb {
146
146
  border-radius: 4px;
147
147
  }
148
- .bk-scrollbar-wrapper {
149
- position: relative;
150
- overflow: hidden;
148
+ /*
149
+ * Container style
150
+ */
151
+ .bk-scrollbar {
152
+ overflow: hidden !important;
153
+ overflow-anchor: none;
154
+ touch-action: auto;
155
+ /*
156
+ * Scrollbar rail styles
157
+ */
158
+ /*
159
+ * Scrollbar thumb styles
160
+ */
161
+ }
162
+ .bk-scrollbar.bk--active-x > .bk__rail-x,
163
+ .bk-scrollbar.bk--active-y > .bk__rail-y {
164
+ display: block;
151
165
  }
152
- .bk-scrollbar-wrapper .bk-scrollbar-content-el {
153
- display: inline-flex;
154
- flex-direction: column;
155
- width: 100%;
166
+ .bk-scrollbar .bk__rail-x:hover,
167
+ .bk-scrollbar .bk__rail-y:hover,
168
+ .bk-scrollbar .bk__rail-x:focus,
169
+ .bk-scrollbar .bk__rail-y:focus,
170
+ .bk-scrollbar .bk__rail-x.bk--clicking,
171
+ .bk-scrollbar .bk__rail-y.bk--clicking {
172
+ background-color: #f0f1f5;
156
173
  }
157
- .bk-scrollbar-wrapper .bk-scrollbar-track {
158
- z-index: 1;
174
+ .bk-scrollbar .bk__rail-x {
175
+ display: none;
176
+ opacity: 0;
177
+ transition: background-color 0.2s linear, opacity 0.2s linear;
178
+ height: 10px;
179
+ bottom: 0px;
159
180
  position: absolute;
160
- right: 0;
161
- bottom: 0;
162
- pointer-events: none;
163
- overflow: hidden;
164
181
  }
165
- .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-vertical {
166
- width: 6px;
167
- }
168
- .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-vertical.bk-scrollbar-hover {
169
- width: 8px;
170
- }
171
- .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-horizontal {
172
- height: 6px;
173
- }
174
- .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-horizontal.bk-scrollbar-hover {
182
+ .bk-scrollbar .bk__rail-x.bk-size-small {
175
183
  height: 8px;
176
184
  }
177
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover {
178
- background-color: #f0f1f5;
179
- cursor: pointer;
185
+ .bk-scrollbar .bk__rail-x.bk-size-small .bk__thumb-x {
186
+ height: 6px;
180
187
  }
181
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover .bk-scrollbar::before {
182
- background-color: #979ba5;
188
+ .bk-scrollbar .bk__rail-y {
189
+ display: none;
190
+ opacity: 0;
191
+ transition: background-color 0.2s linear, opacity 0.2s linear;
192
+ width: 10px;
193
+ right: 0px;
194
+ position: absolute;
195
+ margin-right: 2px;
183
196
  }
184
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-vertical {
185
- top: 0;
197
+ .bk-scrollbar .bk__rail-y.bk-size-small {
186
198
  width: 8px;
187
- transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
188
199
  }
189
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-vertical.bk-scrollbar-hover {
190
- width: 10px;
200
+ .bk-scrollbar .bk__rail-y.bk-size-small .bk__thumb-y {
201
+ width: 6px;
191
202
  }
192
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal {
193
- left: 0;
203
+ .bk-scrollbar:hover > .bk__rail-x,
204
+ .bk-scrollbar:hover > .bk__rail-y,
205
+ .bk-scrollbar.bk--focus > .bk__rail-x,
206
+ .bk-scrollbar.bk--focus > .bk__rail-y,
207
+ .bk-scrollbar.bk--scrolling-x > .bk__rail-x,
208
+ .bk-scrollbar.bk--scrolling-y > .bk__rail-y {
209
+ opacity: 0.9;
210
+ }
211
+ .bk-scrollbar .bk__thumb-x {
212
+ background-color: #dcdee5;
213
+ border-radius: 8px;
214
+ transition: background-color 0.2s linear, height 0.2s ease-in-out;
194
215
  height: 8px;
195
- transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
216
+ bottom: 0px;
217
+ position: absolute;
218
+ }
219
+ .bk-scrollbar .bk__thumb-y {
220
+ background-color: #dcdee5;
221
+ border-radius: 8px;
222
+ transition: background-color 0.2s linear, width 0.2s ease-in-out;
223
+ width: 8px;
224
+ right: 0px;
225
+ position: absolute;
196
226
  }
197
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal.bk-scrollbar-hover {
227
+ .bk-scrollbar .bk__rail-x:hover > .bk__thumb-x,
228
+ .bk-scrollbar .bk__rail-x:focus > .bk__thumb-x,
229
+ .bk-scrollbar .bk__rail-x.bk--clicking .bk__thumb-x {
230
+ background-color: #979ba5;
198
231
  height: 10px;
199
232
  }
200
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal.bk-scrollbar {
201
- right: auto;
202
- left: 0;
203
- top: 0;
204
- bottom: 0;
205
- min-height: 0;
206
- min-width: 8px;
207
- width: auto;
233
+ .bk-scrollbar .bk__rail-y:hover > .bk__thumb-y,
234
+ .bk-scrollbar .bk__rail-y:focus > .bk__thumb-y,
235
+ .bk-scrollbar .bk__rail-y.bk--clicking .bk__thumb-y {
236
+ background-color: #979ba5;
237
+ width: 10px;
208
238
  }
209
- .bk-scrollbar-wrapper .bk-scrollbar-dragging {
210
- pointer-events: none;
211
- -webkit-touch-callout: none;
212
- -webkit-user-select: none;
213
- -khtml-user-select: none;
214
- -moz-user-select: none;
215
- -ms-user-select: none;
216
- user-select: none;
239
+ .bk-scrollbar .bk-size-small > .bk__thumb-x,
240
+ .bk-scrollbar .bk-size-small > .bk__thumb-x,
241
+ .bk-scrollbar .bk-size-small.bk--clicking .bk__thumb-x {
242
+ height: 8px;
217
243
  }
218
- .bk-scrollbar-wrapper .bk-scrollbar {
219
- position: absolute;
220
- left: 0;
221
- right: 0;
222
- top: 0;
223
- bottom: 0;
244
+ .bk-scrollbar .bk-size-small:hover > .bk__thumb-y,
245
+ .bk-scrollbar .bk-size-small:focus > .bk__thumb-y,
246
+ .bk-scrollbar .bk-size-small.bk--clicking .bk__thumb-y {
247
+ width: 8px;
224
248
  }
225
- .bk-scrollbar-wrapper .bk-scrollbar::before {
226
- position: absolute;
227
- content: '';
228
- background: #dcdee5;
229
- border-radius: 6px;
230
- left: 0;
231
- right: 0;
232
- top: 0;
233
- bottom: 0;
234
- opacity: 0;
235
- transition: opacity 0.2s 0.9s linear;
249
+ /* MS supports */
250
+ @supports (-ms-overflow-style: none) {
251
+ .bk-scrollbar {
252
+ overflow: auto !important;
253
+ }
236
254
  }
237
- .bk-scrollbar-wrapper .bk-scrollbar.bk-scrollbar-visible::before {
238
- opacity: 0.9;
239
- transition-delay: 0s;
240
- transition-duration: 0s;
255
+ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
256
+ .bk-scrollbar {
257
+ overflow: auto !important;
258
+ }
241
259
  }
242
260
  .bk-virtual-render {
243
261
  position: relative;
244
262
  }
245
- .bk-virtual-render .bk-virtual-content {
246
- position: absolute;
247
- top: 0;
248
- bottom: 0;
249
- left: 0;
250
- width: 100%;
251
- height: 100%;
252
- }
253
263
  .bk-virtual-render .bk-virtual-section {
254
264
  width: 1px;
255
265
  background: transparent;
@@ -1251,7 +1261,7 @@
1251
1261
  overflow: hidden;
1252
1262
  }
1253
1263
  .bk-table .bk-table-body .prepend-row {
1254
- transform: translate3d(var(--translate-x), 0, 0);
1264
+ transform: translate(var(--translate-x), 0);
1255
1265
  }
1256
1266
  .bk-table .bk-table-body .resize-column {
1257
1267
  position: absolute;
@@ -1260,7 +1270,7 @@
1260
1270
  left: 0;
1261
1271
  width: 1px;
1262
1272
  background-color: #3785ff;
1263
- transform: translate3d(var(--drag-offset-x), var(--translate-y), 0);
1273
+ transform: translate(var(--drag-offset-x), var(--translate-y));
1264
1274
  }
1265
1275
  .bk-table .bk-table-body-content.bk-stripe table tbody tr:nth-child(even) td {
1266
1276
  background-color: var(--table-strip-color);
@@ -1429,24 +1439,6 @@
1429
1439
  font-weight: 400;
1430
1440
  background-color: var(--background-color);
1431
1441
  }
1432
- .bk-table .bk-table-head table thead th.col-resize-hover::after,
1433
- .bk-table .bk-table-body table thead th.col-resize-hover::after {
1434
- position: absolute;
1435
- top: 0;
1436
- right: 0;
1437
- bottom: 0;
1438
- z-index: 1;
1439
- width: 6px;
1440
- pointer-events: none;
1441
- background-color: #3785ff;
1442
- content: '';
1443
- transform: translateX(50%);
1444
- cursor: col-resize;
1445
- }
1446
- .bk-table .bk-table-head table thead th.col-resize-hover .cell,
1447
- .bk-table .bk-table-body table thead th.col-resize-hover .cell {
1448
- cursor: col-resize;
1449
- }
1450
1442
  .bk-table .bk-table-head table thead th .cell,
1451
1443
  .bk-table .bk-table-body table thead th .cell {
1452
1444
  display: flex;
@@ -1454,17 +1446,21 @@
1454
1446
  height: calc(var(--row-height) - 2px);
1455
1447
  color: var(--table-head-font-color);
1456
1448
  }
1457
- .bk-table .bk-table-head table thead th.active,
1458
- .bk-table .bk-table-body table thead th.active,
1459
- .bk-table .bk-table-head table thead th:hover,
1460
- .bk-table .bk-table-body table thead th:hover {
1461
- cursor: pointer;
1462
- background: var(--table-row-active-bg-color);
1449
+ .bk-table .bk-table-head table thead th .cell.cell-resize,
1450
+ .bk-table .bk-table-body table thead th .cell.cell-resize {
1451
+ cursor: col-resize;
1463
1452
  }
1464
1453
  .bk-table .bk-table-head table thead th.column_fixed,
1465
1454
  .bk-table .bk-table-body table thead th.column_fixed {
1466
1455
  transform: translateX(var(--translate-x));
1467
1456
  }
1457
+ .bk-table .bk-table-head table:not(.col-resize-hover) thead th.active,
1458
+ .bk-table .bk-table-body table:not(.col-resize-hover) thead th.active,
1459
+ .bk-table .bk-table-head table:not(.col-resize-hover) thead th:hover,
1460
+ .bk-table .bk-table-body table:not(.col-resize-hover) thead th:hover {
1461
+ cursor: pointer;
1462
+ background: var(--table-row-active-bg-color);
1463
+ }
1468
1464
  .bk-table .bk-table-head table tbody tr td,
1469
1465
  .bk-table .bk-table-body table tbody tr td {
1470
1466
  background-color: #fff;
@@ -1522,16 +1518,14 @@
1522
1518
  z-index: 1;
1523
1519
  width: 6px;
1524
1520
  background-color: #3785ff;
1525
- transform: translate3d(var(--drag-offset-h-x), 0, 0);
1526
- }
1527
- .bk-table .bk-table-head .col-resize-drag:hover {
1528
- cursor: ew-resize !important;
1521
+ transform: translate(var(--drag-offset-h-x), 0);
1522
+ pointer-events: none;
1529
1523
  }
1530
1524
  .bk-table .bk-table-head .bk-table-fixed {
1531
- transform: translate3d(0, 0, 0);
1525
+ transform: translate(0, 0);
1532
1526
  }
1533
1527
  .bk-table .bk-table-head thead {
1534
- transform: translate3d(var(--translate-x-1), 0, 0);
1528
+ transform: translate(var(--translate-x-1), 0);
1535
1529
  }
1536
1530
  .bk-table .bk-table-head .table-head-settings {
1537
1531
  position: absolute;
@@ -1628,7 +1622,7 @@
1628
1622
  bottom: 0;
1629
1623
  left: 0;
1630
1624
  pointer-events: none;
1631
- transform: translate3d(var(--translate-x), var(--translate-y), 0);
1625
+ transform: translate(var(--translate-x), var(--translate-y));
1632
1626
  }
1633
1627
  .bk-table .bk-table-fixed .column_fixed_right {
1634
1628
  box-shadow: var(--shadow-right);