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.
- package/dist/index.cjs.js +63 -63
- package/dist/index.esm.js +15769 -15734
- package/dist/index.umd.js +63 -63
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/index.js +1 -1
- package/lib/scrollbar/{scrollbar.css → css/scrollbar.css} +90 -75
- package/lib/scrollbar/css/scrollbar.less +139 -0
- package/lib/scrollbar/{scrollbar.variable.css → css/scrollbar.variable.css} +89 -74
- package/lib/scrollbar/handlers/click-rail.d.ts +2 -0
- package/lib/scrollbar/handlers/drag-thumb.d.ts +1 -0
- package/lib/scrollbar/handlers/keyboard.d.ts +2 -0
- package/lib/scrollbar/handlers/mouse-wheel.d.ts +2 -0
- package/lib/scrollbar/handlers/touch.d.ts +4 -0
- package/lib/scrollbar/helper/class-names.d.ts +21 -0
- package/lib/scrollbar/helper/css.d.ts +3 -0
- package/lib/scrollbar/helper/dom.d.ts +4 -0
- package/lib/scrollbar/helper/event-manager.d.ts +20 -0
- package/lib/scrollbar/helper/util.d.ts +11 -0
- package/lib/scrollbar/index.d.ts +133 -13
- package/lib/scrollbar/index.js +1331 -18489
- package/lib/scrollbar/process-scroll-diff.d.ts +1 -0
- package/lib/scrollbar/update-geometry.d.ts +8 -0
- package/lib/styles/index.d.ts +1 -0
- package/lib/table/hooks/use-columns.d.ts +4 -1
- package/lib/table/hooks/use-layout.d.ts +1 -0
- package/lib/table/index.js +140 -66
- package/lib/table/table.css +108 -115
- package/lib/table/table.less +24 -34
- package/lib/table/table.variable.css +108 -115
- package/lib/table-column/index.js +4 -0
- package/lib/tree/tree.css +90 -83
- package/lib/tree/tree.variable.css +90 -83
- package/lib/virtual-render/index.d.ts +0 -23
- package/lib/virtual-render/index.js +54 -106
- package/lib/virtual-render/props.d.ts +0 -6
- package/lib/virtual-render/use-scrollbar.d.ts +3 -17
- package/lib/virtual-render/virtual-render.css +89 -82
- package/lib/virtual-render/virtual-render.d.ts +0 -11
- package/lib/virtual-render/virtual-render.less +2 -11
- package/lib/virtual-render/virtual-render.variable.css +89 -82
- package/package.json +1 -1
- package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
- package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/index.d.ts +0 -242
- package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
- 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;
|
package/lib/styles/index.d.ts
CHANGED
@@ -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
|
-
|
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;
|
package/lib/table/index.js
CHANGED
@@ -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
|
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
|
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
|
-
|
18174
|
-
|
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
|
18179
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
18206
|
+
document.body.style.removeProperty('user-select');
|
18203
18207
|
target === null || target === void 0 || target.classList.remove('col-resize-hover');
|
18204
18208
|
};
|
18205
|
-
var
|
18209
|
+
var handlemouseDownEvent = function handlemouseDownEvent(e) {
|
18206
18210
|
if (!isInDragSection) {
|
18207
18211
|
return;
|
18208
18212
|
}
|
18209
|
-
|
18210
|
-
var
|
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
|
-
|
18215
|
-
|
18216
|
-
|
18217
|
-
|
18218
|
-
|
18219
|
-
|
18220
|
-
|
18221
|
-
|
18222
|
-
|
18223
|
-
|
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
|
-
|
18226
|
-
|
18227
|
-
|
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
|
18234
|
-
|
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
|
-
|
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
|
18244
|
-
|
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
|
-
|
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
|
21118
|
-
|
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$
|
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$
|
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$
|
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$
|
21306
|
-
height: (_props$fixedBottom$
|
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))) {
|