bkui-vue 2.0.1-beta.15.table.6 → 2.0.1-beta.15.table.8
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 +33 -33
- package/dist/index.esm.js +6608 -6569
- package/dist/index.umd.js +34 -34
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/index.js +1 -1
- package/lib/table/hooks/use-cell.d.ts +20 -0
- package/lib/table/hooks/use-column-template.d.ts +2 -2
- package/lib/table/hooks/use-layout.d.ts +7 -5
- package/lib/table/hooks/use-shift-key.d.ts +4 -2
- package/lib/table/index.d.ts +15 -0
- package/lib/table/index.js +653 -551
- package/lib/table/props.d.ts +11 -0
- package/lib/table/table.css +25 -24
- package/lib/table/table.d.ts +7 -0
- package/lib/table/table.less +27 -33
- package/lib/table/table.variable.css +25 -24
- package/lib/table-column/index.js +10 -1
- package/lib/virtual-render/index.d.ts +4 -15
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +1 -3
- package/lib/virtual-render/virtual-render.d.ts +2 -7
- package/package.json +2 -1
package/lib/table/index.js
CHANGED
@@ -9,23 +9,23 @@ import * as __WEBPACK_EXTERNAL_MODULE_lodash_debounce_3540babe__ from "lodash/de
|
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash_get_9427f899__ from "lodash/get";
|
10
10
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_virtual_render_927587a8__ from "../virtual-render";
|
11
11
|
import "../virtual-render/virtual-render.less";
|
12
|
-
import * as
|
13
|
-
import "../
|
14
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
|
12
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__ from "../loading";
|
13
|
+
import "../loading/loading.less";
|
15
14
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_pagination_95c6c47e__ from "../pagination";
|
16
15
|
import "../pagination/pagination.less";
|
17
16
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_exception_7490d0fd__ from "../exception";
|
18
17
|
import "../exception/exception.less";
|
19
18
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__ from "../directives";
|
19
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__ from "../checkbox";
|
20
|
+
import "../checkbox/checkbox.less";
|
20
21
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_button_a2ea7c9a__ from "../button";
|
21
22
|
import "../button/button.less";
|
23
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
|
22
24
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_input_d525237e__ from "../input";
|
23
25
|
import "../input/input.less";
|
24
26
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
|
25
27
|
import "../popover/popover.less";
|
26
28
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon__3efece53__ from "../icon/";
|
27
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__ from "../loading";
|
28
|
-
import "../loading/loading.less";
|
29
29
|
/******/ var __webpack_modules__ = ({
|
30
30
|
|
31
31
|
/***/ 6635:
|
@@ -17902,7 +17902,16 @@ var tableProps = {
|
|
17902
17902
|
/**
|
17903
17903
|
* 启用Scrollbar
|
17904
17904
|
*/
|
17905
|
-
scrollbar: shared_namespaceObject.PropTypes.bool.def(true)
|
17905
|
+
scrollbar: shared_namespaceObject.PropTypes.bool.def(true),
|
17906
|
+
/**
|
17907
|
+
* 固定在底部的配置项
|
17908
|
+
*/
|
17909
|
+
fixedBottom: (0,external_vue_types_namespaceObject.toType)('FixedBottomOption', {
|
17910
|
+
"default": {
|
17911
|
+
position: 'relative',
|
17912
|
+
height: LINE_HEIGHT
|
17913
|
+
}
|
17914
|
+
}).def(null)
|
17906
17915
|
};
|
17907
17916
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
17908
17917
|
|
@@ -18457,12 +18466,9 @@ function v4(options, buf, offset) {
|
|
18457
18466
|
});
|
18458
18467
|
}
|
18459
18468
|
};
|
18460
|
-
var resolveColumns = function resolveColumns(
|
18461
|
-
var _instance$slots$defau, _instance$slots, _instance$slots$defau2;
|
18462
|
-
var instance = target !== null && target !== void 0 ? target : (0,external_vue_namespaceObject.getCurrentInstance)();
|
18469
|
+
var resolveColumns = function resolveColumns(children) {
|
18463
18470
|
columns.length = 0;
|
18464
18471
|
columnIndex = 0;
|
18465
|
-
var children = (_instance$slots$defau = (_instance$slots = instance.slots) === null || _instance$slots === void 0 || (_instance$slots$defau2 = _instance$slots["default"]) === null || _instance$slots$defau2 === void 0 ? void 0 : _instance$slots$defau2.call(_instance$slots)) !== null && _instance$slots$defau !== void 0 ? _instance$slots$defau : [];
|
18466
18472
|
children.forEach(resolveChildNode);
|
18467
18473
|
columns.sort(function (col1, col2) {
|
18468
18474
|
return col1.index - col2.index;
|
@@ -20783,6 +20789,90 @@ const virtual_render_namespaceObject = virtual_render_x({ ["default"]: () => __W
|
|
20783
20789
|
var virtual_render_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
20784
20790
|
var virtual_render_less_y = x => () => x
|
20785
20791
|
const virtual_render_less_namespaceObject = virtual_render_less_x({ });
|
20792
|
+
;// CONCATENATED MODULE: external "../loading"
|
20793
|
+
var loading_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
20794
|
+
var loading_y = x => () => x
|
20795
|
+
const loading_namespaceObject = loading_x({ ["BkLoadingMode"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__.BkLoadingMode, ["BkLoadingSize"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__.BkLoadingSize, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__["default"] });
|
20796
|
+
;// CONCATENATED MODULE: external "../loading/loading.less"
|
20797
|
+
var loading_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
20798
|
+
var loading_less_y = x => () => x
|
20799
|
+
const loading_less_namespaceObject = loading_less_x({ });
|
20800
|
+
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-scroll-loading.tsx
|
20801
|
+
|
20802
|
+
|
20803
|
+
/*
|
20804
|
+
* Tencent is pleased to support the open source community by making
|
20805
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
20806
|
+
*
|
20807
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
20808
|
+
*
|
20809
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
20810
|
+
*
|
20811
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
20812
|
+
*
|
20813
|
+
* ---------------------------------------------------
|
20814
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
20815
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
20816
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
20817
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
20818
|
+
*
|
20819
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
20820
|
+
* the Software.
|
20821
|
+
*
|
20822
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
20823
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20824
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
20825
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
20826
|
+
* IN THE SOFTWARE.
|
20827
|
+
*/
|
20828
|
+
|
20829
|
+
|
20830
|
+
|
20831
|
+
|
20832
|
+
/* harmony default export */ const use_scroll_loading = (function (props, ctx) {
|
20833
|
+
var refScrollLoading = (0,external_vue_namespaceObject.toRef)(props, 'scrollLoading');
|
20834
|
+
var getLoadingOption = function getLoadingOption() {
|
20835
|
+
if (typeof refScrollLoading.value === 'boolean') {
|
20836
|
+
return {
|
20837
|
+
loading: !!refScrollLoading.value,
|
20838
|
+
inline: true,
|
20839
|
+
title: '',
|
20840
|
+
size: loading_namespaceObject.BkLoadingSize.Normal,
|
20841
|
+
mode: loading_namespaceObject.BkLoadingMode.Default,
|
20842
|
+
indicator: null
|
20843
|
+
};
|
20844
|
+
}
|
20845
|
+
return refScrollLoading.value;
|
20846
|
+
};
|
20847
|
+
var isRender = (0,external_vue_namespaceObject.computed)(function () {
|
20848
|
+
return refScrollLoading.value !== null && (typeof refScrollLoading.value === 'boolean' && refScrollLoading.value || typeof_typeof(refScrollLoading.value) === 'object');
|
20849
|
+
});
|
20850
|
+
var renderScrollLoading = function renderScrollLoading() {
|
20851
|
+
var _ctx$slots$fixedBotto3, _ctx$slots$fixedBotto4, _ctx$slots2;
|
20852
|
+
if (isRender.value) {
|
20853
|
+
var _ctx$slots$fixedBotto, _ctx$slots$fixedBotto2, _ctx$slots;
|
20854
|
+
var _getLoadingOption = getLoadingOption(),
|
20855
|
+
loading = _getLoadingOption.loading,
|
20856
|
+
size = _getLoadingOption.size,
|
20857
|
+
mode = _getLoadingOption.mode,
|
20858
|
+
title = _getLoadingOption.title,
|
20859
|
+
inline = _getLoadingOption.inline,
|
20860
|
+
indicator = _getLoadingOption.indicator;
|
20861
|
+
return (_ctx$slots$fixedBotto = (_ctx$slots$fixedBotto2 = (_ctx$slots = ctx.slots).fixedBottom) === null || _ctx$slots$fixedBotto2 === void 0 ? void 0 : _ctx$slots$fixedBotto2.call(_ctx$slots)) !== null && _ctx$slots$fixedBotto !== void 0 ? _ctx$slots$fixedBotto : (0,external_vue_namespaceObject.createVNode)(loading_namespaceObject["default"], {
|
20862
|
+
loading: loading,
|
20863
|
+
size: size,
|
20864
|
+
mode: mode,
|
20865
|
+
title: title,
|
20866
|
+
inline: inline,
|
20867
|
+
indicator: indicator
|
20868
|
+
}, null);
|
20869
|
+
}
|
20870
|
+
return (_ctx$slots$fixedBotto3 = (_ctx$slots$fixedBotto4 = (_ctx$slots2 = ctx.slots).fixedBottom) === null || _ctx$slots$fixedBotto4 === void 0 ? void 0 : _ctx$slots$fixedBotto4.call(_ctx$slots2)) !== null && _ctx$slots$fixedBotto3 !== void 0 ? _ctx$slots$fixedBotto3 : null;
|
20871
|
+
};
|
20872
|
+
return {
|
20873
|
+
renderScrollLoading: renderScrollLoading
|
20874
|
+
};
|
20875
|
+
});
|
20786
20876
|
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-layout.tsx
|
20787
20877
|
|
20788
20878
|
|
@@ -20823,6 +20913,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
20823
20913
|
|
20824
20914
|
|
20825
20915
|
|
20916
|
+
|
20826
20917
|
/* harmony default export */ const use_layout = (function (props, ctx) {
|
20827
20918
|
var _props$rowHeight;
|
20828
20919
|
var refRoot = (0,external_vue_namespaceObject.ref)(null);
|
@@ -20832,13 +20923,19 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
20832
20923
|
var translateX = (0,external_vue_namespaceObject.ref)(0);
|
20833
20924
|
var translateY = (0,external_vue_namespaceObject.ref)(0);
|
20834
20925
|
var preBottom = (0,external_vue_namespaceObject.ref)(0);
|
20835
|
-
var dragOffsetX = (0,external_vue_namespaceObject.ref)(-
|
20926
|
+
var dragOffsetX = (0,external_vue_namespaceObject.ref)(-10000);
|
20836
20927
|
var offsetRight = (0,external_vue_namespaceObject.ref)(0);
|
20837
20928
|
var layout = (0,external_vue_namespaceObject.reactive)({});
|
20838
20929
|
var fixedColumns = (0,external_vue_namespaceObject.reactive)([]);
|
20839
20930
|
var lineHeight = (0,external_vue_namespaceObject.ref)((_props$rowHeight = props.rowHeight) !== null && _props$rowHeight !== void 0 ? _props$rowHeight : LINE_HEIGHT);
|
20931
|
+
var fixedBottomHeight = (0,external_vue_namespaceObject.computed)(function () {
|
20932
|
+
var _props$fixedBottom, _props$fixedBottom$he, _props$fixedBottom2, _props$fixedBottom$he2, _props$fixedBottom3;
|
20933
|
+
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;
|
20934
|
+
});
|
20840
20935
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
20841
20936
|
resolveClassName = _usePrefix.resolveClassName;
|
20937
|
+
var _useScrollLoading = use_scroll_loading(props, ctx),
|
20938
|
+
renderScrollLoading = _useScrollLoading.renderScrollLoading;
|
20842
20939
|
var tableClass = (0,external_vue_namespaceObject.computed)(function () {
|
20843
20940
|
return (0,shared_namespaceObject.classes)(defineProperty_defineProperty({}, resolveClassName('table'), true), resolvePropBorderToClassStr(props.border));
|
20844
20941
|
});
|
@@ -20852,22 +20949,47 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
20852
20949
|
var headClass = (0,external_vue_namespaceObject.computed)(function () {
|
20853
20950
|
return (0,shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-head'), true), 'has-settings', !!props.settings));
|
20854
20951
|
});
|
20952
|
+
var setFixedColumnShawdow = function setFixedColumnShawdow() {
|
20953
|
+
var rightShawdow = offsetRight.value > 0 ? '0 0 10px rgb(0 0 0 / 12%)' : null;
|
20954
|
+
var leftShawdow = translateX.value > 0 ? '0 0 10px rgb(0 0 0 / 12%)' : null;
|
20955
|
+
refRoot.value.style.setProperty('--shadow-right', rightShawdow);
|
20956
|
+
refRoot.value.style.setProperty('--shadow-left', leftShawdow);
|
20957
|
+
};
|
20958
|
+
var setRootStyleVars = (0,shared_namespaceObject.throttle)(function () {
|
20959
|
+
refRoot.value.style.setProperty('--drag-offset-x', "".concat(dragOffsetX.value, "px"));
|
20960
|
+
refRoot.value.style.setProperty('--drag-offset-h-x', "".concat(dragOffsetX.value - 2, "px"));
|
20961
|
+
refRoot.value.style.setProperty('--translate-y', "".concat(translateY.value, "px"));
|
20962
|
+
refRoot.value.style.setProperty('--translate-x', "".concat(translateX.value, "px"));
|
20963
|
+
refRoot.value.style.setProperty('--translate-x-1', "-".concat(translateX.value, "px"));
|
20964
|
+
setFixedColumnShawdow();
|
20965
|
+
});
|
20855
20966
|
var setTranslateX = function setTranslateX(val) {
|
20856
20967
|
translateX.value = val;
|
20968
|
+
setRootStyleVars();
|
20857
20969
|
};
|
20858
20970
|
var setTranslateY = function setTranslateY(val) {
|
20859
20971
|
translateY.value = val;
|
20972
|
+
setRootStyleVars();
|
20973
|
+
};
|
20974
|
+
var initRootStyleVars = function initRootStyleVars() {
|
20975
|
+
refRoot.value.style.setProperty('--drag-offset-x', '-1000px');
|
20976
|
+
refRoot.value.style.setProperty('--drag-offset-h-x', '-1000px');
|
20977
|
+
refRoot.value.style.setProperty('--translate-y', '0px');
|
20978
|
+
refRoot.value.style.setProperty('--translate-x', '0px');
|
20979
|
+
refRoot.value.style.setProperty('--translate-x-1', '0px');
|
20860
20980
|
};
|
20861
20981
|
var setDragOffsetX = function setDragOffsetX(val) {
|
20862
20982
|
dragOffsetX.value = val;
|
20983
|
+
setRootStyleVars();
|
20863
20984
|
};
|
20864
20985
|
var config = resolveHeadConfig(props);
|
20986
|
+
var headHeight = (0,external_vue_namespaceObject.computed)(function () {
|
20987
|
+
return resolvePropVal(config, 'height', ['thead']);
|
20988
|
+
});
|
20865
20989
|
var headStyle = (0,external_vue_namespaceObject.computed)(function () {
|
20866
20990
|
var _props$thead$color, _props$thead;
|
20867
20991
|
return {
|
20868
|
-
'--row-height': "".concat(
|
20869
|
-
'--scroll-head-left': "-".concat(translateX.value, "px"),
|
20870
|
-
'--scroll-left': "".concat(translateX.value, "px"),
|
20992
|
+
'--row-height': "".concat(headHeight.value, "px"),
|
20871
20993
|
'--background-color': DEF_COLOR[(_props$thead$color = (_props$thead = props.thead) === null || _props$thead === void 0 ? void 0 : _props$thead.color) !== null && _props$thead$color !== void 0 ? _props$thead$color : IHeadColor.DEF1]
|
20872
20994
|
};
|
20873
20995
|
});
|
@@ -20881,26 +21003,6 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
20881
21003
|
height: 0,
|
20882
21004
|
display: 'none'
|
20883
21005
|
};
|
20884
|
-
var dragOffsetXStyle = {
|
20885
|
-
position: 'absolute',
|
20886
|
-
top: 0,
|
20887
|
-
bottom: 0,
|
20888
|
-
left: 0,
|
20889
|
-
width: '1px',
|
20890
|
-
backgroundColor: '#3785FF',
|
20891
|
-
transform: 'translateX(-50%)'
|
20892
|
-
};
|
20893
|
-
var resizeColumnStyle = (0,external_vue_namespaceObject.computed)(function () {
|
20894
|
-
return use_layout_objectSpread(use_layout_objectSpread({}, dragOffsetXStyle), {}, {
|
20895
|
-
transform: "translate3d(".concat(dragOffsetX.value + 3, "px, ").concat(translateY.value, "px, 0)")
|
20896
|
-
});
|
20897
|
-
});
|
20898
|
-
var resizeHeadColStyle = (0,external_vue_namespaceObject.computed)(function () {
|
20899
|
-
return use_layout_objectSpread(use_layout_objectSpread({}, dragOffsetXStyle), {}, {
|
20900
|
-
width: '6px',
|
20901
|
-
transform: "translateX(".concat(dragOffsetX.value, "px)")
|
20902
|
-
});
|
20903
|
-
});
|
20904
21006
|
var renderContainer = function renderContainer(childrend) {
|
20905
21007
|
var _ctx$slots$default, _ctx$slots;
|
20906
21008
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
@@ -20911,15 +21013,16 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
20911
21013
|
"style": columnGhostStyle
|
20912
21014
|
}, [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)])]);
|
20913
21015
|
};
|
20914
|
-
var renderHeader = function renderHeader(childrend, settings) {
|
21016
|
+
var renderHeader = function renderHeader(childrend, settings, fixedRows) {
|
20915
21017
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
20916
21018
|
"ref": refHead,
|
20917
21019
|
"style": headStyle.value,
|
20918
21020
|
"class": headClass.value
|
20919
21021
|
}, [childrend === null || childrend === void 0 ? void 0 : childrend(), (0,external_vue_namespaceObject.createVNode)("div", {
|
20920
|
-
"style": resizeHeadColStyle.value,
|
20921
21022
|
"class": "col-resize-drag"
|
20922
|
-
}, null),
|
21023
|
+
}, null), (0,external_vue_namespaceObject.createVNode)("div", {
|
21024
|
+
"class": fixedWrapperClass
|
21025
|
+
}, [fixedRows === null || fixedRows === void 0 ? void 0 : fixedRows()]), settings === null || settings === void 0 ? void 0 : settings()]);
|
20923
21026
|
};
|
20924
21027
|
var prependStyle = (0,external_vue_namespaceObject.computed)(function () {
|
20925
21028
|
return use_layout_objectSpread({
|
@@ -20938,8 +21041,16 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
20938
21041
|
return null;
|
20939
21042
|
};
|
20940
21043
|
var bodyHeight = (0,external_vue_namespaceObject.ref)('auto');
|
21044
|
+
var bodyMaxHeight = (0,external_vue_namespaceObject.computed)(function () {
|
21045
|
+
if (/^\d+\.?\d*(px|%)$/.test("".concat(tableStyle.value.maxHeight))) {
|
21046
|
+
var headerHeight = props.showHead ? headHeight.value : 0;
|
21047
|
+
var delHeight = footHeight.value + headerHeight + fixedBottomHeight.value;
|
21048
|
+
return "calc(".concat(tableStyle.value.maxHeight, " - ").concat(delHeight, "px)");
|
21049
|
+
}
|
21050
|
+
return null;
|
21051
|
+
});
|
20941
21052
|
var setBodyHeight = function setBodyHeight(height) {
|
20942
|
-
bodyHeight.value = height;
|
21053
|
+
bodyHeight.value = height - fixedBottomHeight.value;
|
20943
21054
|
};
|
20944
21055
|
var footHeight = (0,external_vue_namespaceObject.ref)(0);
|
20945
21056
|
var footerStyle = (0,external_vue_namespaceObject.computed)(function () {
|
@@ -20991,30 +21102,34 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
20991
21102
|
};
|
20992
21103
|
var resizeColumnClass = {
|
20993
21104
|
column_drag_line: true,
|
20994
|
-
'offset-x': true
|
21105
|
+
'offset-x': true,
|
21106
|
+
'resize-column': true
|
20995
21107
|
};
|
20996
|
-
var fixedWrapperClass = (
|
20997
|
-
return [resolveClassName('table-fixed'), {
|
20998
|
-
'shadow-right': offsetRight.value > 0,
|
20999
|
-
'shadow-left': translateX.value > 0
|
21000
|
-
}];
|
21001
|
-
});
|
21108
|
+
var fixedWrapperClass = resolveClassName('table-fixed');
|
21002
21109
|
var fixedBottomRow = resolveClassName('table-fixed-bottom');
|
21003
|
-
var fixedWrapperStyle = (0,external_vue_namespaceObject.computed)(function () {
|
21004
|
-
return {
|
21005
|
-
transform: "translate3d(".concat(translateX.value, "px, ").concat(translateY.value, "px, 0)")
|
21006
|
-
};
|
21007
|
-
});
|
21008
21110
|
var fixedBottomLoadingStyle = (0,external_vue_namespaceObject.computed)(function () {
|
21111
|
+
var _props$fixedBottom$po, _props$fixedBottom4, _props$fixedBottom$he3, _props$fixedBottom5;
|
21009
21112
|
return {
|
21010
|
-
|
21011
|
-
|
21113
|
+
minHeight: "".concat(lineHeight.value, "px"),
|
21114
|
+
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',
|
21115
|
+
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
|
21012
21116
|
};
|
21013
21117
|
});
|
21014
21118
|
(0,external_vue_namespaceObject.onMounted)(function () {
|
21015
21119
|
setOffsetRight();
|
21120
|
+
initRootStyleVars();
|
21016
21121
|
});
|
21017
|
-
var
|
21122
|
+
var getFixedBottomRender = function getFixedBottomRender() {
|
21123
|
+
var result = renderScrollLoading === null || renderScrollLoading === void 0 ? void 0 : renderScrollLoading();
|
21124
|
+
if (result) {
|
21125
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
21126
|
+
"style": fixedBottomLoadingStyle.value,
|
21127
|
+
"class": fixedBottomRow
|
21128
|
+
}, [result]);
|
21129
|
+
}
|
21130
|
+
return null;
|
21131
|
+
};
|
21132
|
+
var renderBody = function renderBody(list, childrend, fixedRows) {
|
21018
21133
|
return (0,external_vue_namespaceObject.createVNode)(virtual_render_namespaceObject["default"], {
|
21019
21134
|
"ref": refBody,
|
21020
21135
|
"height": bodyHeight.value,
|
@@ -21027,6 +21142,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
21027
21142
|
"scrollbar": {
|
21028
21143
|
enabled: props.scrollbar
|
21029
21144
|
},
|
21145
|
+
"maxHeight": bodyMaxHeight.value,
|
21030
21146
|
"throttleDelay": 120,
|
21031
21147
|
"onContentScroll": handleScrollChanged
|
21032
21148
|
}, {
|
@@ -21034,22 +21150,15 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
21034
21150
|
return renderPrepend();
|
21035
21151
|
},
|
21036
21152
|
"default": function _default(scope) {
|
21037
|
-
|
21153
|
+
var _scope$data;
|
21154
|
+
return childrend === null || childrend === void 0 ? void 0 : childrend((_scope$data = scope === null || scope === void 0 ? void 0 : scope.data) !== null && _scope$data !== void 0 ? _scope$data : []);
|
21038
21155
|
},
|
21039
21156
|
afterSection: function afterSection() {
|
21040
|
-
var _ctx$slots$appendBott, _ctx$slots2;
|
21041
21157
|
return [(0,external_vue_namespaceObject.createVNode)("div", {
|
21042
|
-
"style": resizeColumnStyle.value,
|
21043
21158
|
"class": resizeColumnClass
|
21044
21159
|
}, null), (0,external_vue_namespaceObject.createVNode)("div", {
|
21045
|
-
"
|
21046
|
-
|
21047
|
-
}, [fixedRows === null || fixedRows === void 0 ? void 0 : fixedRows()]), (0,external_vue_namespaceObject.createVNode)("div", {
|
21048
|
-
"class": fixedBottomRow
|
21049
|
-
}, [(_ctx$slots$appendBott = (_ctx$slots2 = ctx.slots).appendBottom) === null || _ctx$slots$appendBott === void 0 ? void 0 : _ctx$slots$appendBott.call(_ctx$slots2)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
21050
|
-
"style": fixedBottomLoadingStyle.value,
|
21051
|
-
"class": fixedBottomRow
|
21052
|
-
}, [loadingRow === null || loadingRow === void 0 ? void 0 : loadingRow()])];
|
21160
|
+
"class": fixedWrapperClass
|
21161
|
+
}, [fixedRows === null || fixedRows === void 0 ? void 0 : fixedRows()])];
|
21053
21162
|
}
|
21054
21163
|
});
|
21055
21164
|
};
|
@@ -21064,11 +21173,15 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
21064
21173
|
fixedColumns.length = 0;
|
21065
21174
|
fixedColumns.push.apply(fixedColumns, _toConsumableArray(values));
|
21066
21175
|
};
|
21176
|
+
var renderFixedBottom = function renderFixedBottom() {
|
21177
|
+
return getFixedBottomRender();
|
21178
|
+
};
|
21067
21179
|
return {
|
21068
21180
|
renderContainer: renderContainer,
|
21069
21181
|
renderHeader: renderHeader,
|
21070
21182
|
renderBody: renderBody,
|
21071
21183
|
renderFooter: renderFooter,
|
21184
|
+
renderFixedBottom: renderFixedBottom,
|
21072
21185
|
setBodyHeight: setBodyHeight,
|
21073
21186
|
setFootHeight: setFootHeight,
|
21074
21187
|
setTranslateX: setTranslateX,
|
@@ -21076,6 +21189,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
21076
21189
|
setFixedColumns: setFixedColumns,
|
21077
21190
|
setOffsetRight: setOffsetRight,
|
21078
21191
|
setLineHeight: setLineHeight,
|
21192
|
+
initRootStyleVars: initRootStyleVars,
|
21079
21193
|
refRoot: refRoot,
|
21080
21194
|
refHead: refHead,
|
21081
21195
|
refBody: refBody,
|
@@ -21242,18 +21356,6 @@ var usePagination = function usePagination(props) {
|
|
21242
21356
|
};
|
21243
21357
|
};
|
21244
21358
|
/* harmony default export */ const use_pagination = (usePagination);
|
21245
|
-
;// CONCATENATED MODULE: external "../checkbox"
|
21246
|
-
var checkbox_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21247
|
-
var checkbox_y = x => () => x
|
21248
|
-
const checkbox_namespaceObject = checkbox_x({ ["BkCheckboxGroup"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__.BkCheckboxGroup, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__["default"] });
|
21249
|
-
;// CONCATENATED MODULE: external "../checkbox/checkbox.less"
|
21250
|
-
var checkbox_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21251
|
-
var checkbox_less_y = x => () => x
|
21252
|
-
const checkbox_less_namespaceObject = checkbox_less_x({ });
|
21253
|
-
;// CONCATENATED MODULE: external "../icon"
|
21254
|
-
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21255
|
-
var icon_y = x => () => x
|
21256
|
-
const icon_namespaceObject = icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.DownShape, ["Funnel"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Funnel, ["GragFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.GragFill, ["RightShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.RightShape });
|
21257
21359
|
;// CONCATENATED MODULE: external "../pagination"
|
21258
21360
|
var pagination_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21259
21361
|
var pagination_y = x => () => x
|
@@ -21616,6 +21718,14 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
|
|
21616
21718
|
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)]);
|
21617
21719
|
}
|
21618
21720
|
}));
|
21721
|
+
;// CONCATENATED MODULE: external "../checkbox"
|
21722
|
+
var checkbox_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21723
|
+
var checkbox_y = x => () => x
|
21724
|
+
const checkbox_namespaceObject = checkbox_x({ ["BkCheckboxGroup"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__.BkCheckboxGroup, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__["default"] });
|
21725
|
+
;// CONCATENATED MODULE: external "../checkbox/checkbox.less"
|
21726
|
+
var checkbox_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21727
|
+
var checkbox_less_y = x => () => x
|
21728
|
+
const checkbox_less_namespaceObject = checkbox_less_x({ });
|
21619
21729
|
;// CONCATENATED MODULE: external "../button"
|
21620
21730
|
var button_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21621
21731
|
var button_y = x => () => x
|
@@ -21624,6 +21734,10 @@ const button_namespaceObject = button_x({ ["default"]: () => __WEBPACK_EXTERNAL_
|
|
21624
21734
|
var button_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21625
21735
|
var button_less_y = x => () => x
|
21626
21736
|
const button_less_namespaceObject = button_less_x({ });
|
21737
|
+
;// CONCATENATED MODULE: external "../icon"
|
21738
|
+
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21739
|
+
var icon_y = x => () => x
|
21740
|
+
const icon_namespaceObject = icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.DownShape, ["Funnel"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Funnel, ["GragFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.GragFill, ["RightShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.RightShape });
|
21627
21741
|
;// CONCATENATED MODULE: external "../input"
|
21628
21742
|
var input_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
21629
21743
|
var input_y = x => () => x
|
@@ -22326,101 +22440,7 @@ function use_head_isSlot(s) {
|
|
22326
22440
|
getTH: getTH
|
22327
22441
|
};
|
22328
22442
|
});
|
22329
|
-
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-
|
22330
|
-
/*
|
22331
|
-
* Tencent is pleased to support the open source community by making
|
22332
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
22333
|
-
*
|
22334
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
22335
|
-
*
|
22336
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
22337
|
-
*
|
22338
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
22339
|
-
*
|
22340
|
-
* ---------------------------------------------------
|
22341
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
22342
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
22343
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
22344
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
22345
|
-
*
|
22346
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
22347
|
-
* the Software.
|
22348
|
-
*
|
22349
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
22350
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
22351
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
22352
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
22353
|
-
* IN THE SOFTWARE.
|
22354
|
-
*/
|
22355
|
-
|
22356
|
-
/* harmony default export */ const use_shift_key = (function (props) {
|
22357
|
-
var isShiftKeyDown = (0,external_vue_namespaceObject.ref)(false);
|
22358
|
-
var store = {
|
22359
|
-
start: null,
|
22360
|
-
end: null
|
22361
|
-
};
|
22362
|
-
var handleKeyDown = function handleKeyDown(e) {
|
22363
|
-
if (e.key === 'Shift') {
|
22364
|
-
isShiftKeyDown.value = true;
|
22365
|
-
}
|
22366
|
-
};
|
22367
|
-
var handleKeyUp = function handleKeyUp(e) {
|
22368
|
-
if (e.key === 'Shift') {
|
22369
|
-
isShiftKeyDown.value = false;
|
22370
|
-
clearStore();
|
22371
|
-
}
|
22372
|
-
};
|
22373
|
-
var setStoreStart = function setStoreStart(row, index) {
|
22374
|
-
store.start = {
|
22375
|
-
index: index !== null && index !== void 0 ? index : null,
|
22376
|
-
row: row !== null && row !== void 0 ? row : null
|
22377
|
-
};
|
22378
|
-
};
|
22379
|
-
var clearStoreStart = function clearStoreStart() {
|
22380
|
-
setStoreStart();
|
22381
|
-
};
|
22382
|
-
var setStore = function setStore(row, index) {
|
22383
|
-
if (store.start === null && store.end === null) {
|
22384
|
-
store.start = {
|
22385
|
-
index: index,
|
22386
|
-
row: row
|
22387
|
-
};
|
22388
|
-
return false;
|
22389
|
-
}
|
22390
|
-
store.end = {
|
22391
|
-
index: index,
|
22392
|
-
row: row
|
22393
|
-
};
|
22394
|
-
return true;
|
22395
|
-
};
|
22396
|
-
var clearStore = function clearStore() {
|
22397
|
-
store.start = null;
|
22398
|
-
store.end = null;
|
22399
|
-
};
|
22400
|
-
if (props.shiftMultiChecked) {
|
22401
|
-
window.addEventListener('keydown', handleKeyDown);
|
22402
|
-
window.addEventListener('keyup', handleKeyUp);
|
22403
|
-
}
|
22404
|
-
var getStore = function getStore() {
|
22405
|
-
return store;
|
22406
|
-
};
|
22407
|
-
(0,external_vue_namespaceObject.onUnmounted)(function () {
|
22408
|
-
if (props.shiftMultiChecked) {
|
22409
|
-
window.removeEventListener('keydown', handleKeyDown);
|
22410
|
-
window.removeEventListener('keyup', handleKeyUp);
|
22411
|
-
}
|
22412
|
-
});
|
22413
|
-
return {
|
22414
|
-
isShiftKeyDown: isShiftKeyDown,
|
22415
|
-
setStore: setStore,
|
22416
|
-
getStore: getStore,
|
22417
|
-
clearStore: clearStore,
|
22418
|
-
setStoreStart: setStoreStart,
|
22419
|
-
clearStoreStart: clearStoreStart
|
22420
|
-
};
|
22421
|
-
});
|
22422
|
-
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-render.tsx
|
22423
|
-
|
22443
|
+
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-cell.tsx
|
22424
22444
|
|
22425
22445
|
|
22426
22446
|
/*
|
@@ -22455,164 +22475,151 @@ function use_head_isSlot(s) {
|
|
22455
22475
|
|
22456
22476
|
|
22457
22477
|
|
22458
|
-
|
22459
|
-
|
22460
|
-
|
22461
|
-
|
22462
|
-
|
22463
|
-
|
22464
|
-
|
22465
|
-
|
22466
|
-
|
22467
|
-
function use_render_isSlot(s) {
|
22468
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
|
22469
|
-
}
|
22470
|
-
/* harmony default export */ const use_render = (function (_ref) {
|
22478
|
+
/* harmony default export */ const use_cell = (function (_ref) {
|
22471
22479
|
var props = _ref.props,
|
22480
|
+
rows = _ref.rows,
|
22472
22481
|
ctx = _ref.ctx,
|
22473
22482
|
columns = _ref.columns,
|
22474
|
-
|
22475
|
-
|
22476
|
-
|
22477
|
-
|
22478
|
-
|
22479
|
-
|
22480
|
-
|
22481
|
-
|
22482
|
-
|
22483
|
-
|
22484
|
-
|
22485
|
-
|
22486
|
-
|
22487
|
-
|
22488
|
-
|
22489
|
-
|
22490
|
-
|
22491
|
-
|
22483
|
+
row = _ref.row,
|
22484
|
+
index = _ref.index,
|
22485
|
+
column = _ref.column,
|
22486
|
+
_ref$isChild = _ref.isChild,
|
22487
|
+
isChild = _ref$isChild === void 0 ? false : _ref$isChild,
|
22488
|
+
multiShiftKey = _ref.multiShiftKey;
|
22489
|
+
var isShiftKeyDown = multiShiftKey.isShiftKeyDown,
|
22490
|
+
getStore = multiShiftKey.getStore,
|
22491
|
+
setStore = multiShiftKey.setStore,
|
22492
|
+
setStoreStart = multiShiftKey.setStoreStart,
|
22493
|
+
clearStoreStart = multiShiftKey.clearStoreStart;
|
22494
|
+
var renderCheckboxColumn = function renderCheckboxColumn() {
|
22495
|
+
var handleChecked = function handleChecked(value, event) {
|
22496
|
+
event.stopImmediatePropagation();
|
22497
|
+
event.preventDefault();
|
22498
|
+
event.stopPropagation();
|
22499
|
+
if (!isShiftKeyDown.value) {
|
22500
|
+
if (value) {
|
22501
|
+
setStoreStart(row, index);
|
22502
|
+
} else {
|
22503
|
+
clearStoreStart();
|
22492
22504
|
}
|
22493
|
-
}
|
22494
|
-
|
22495
|
-
|
22496
|
-
|
22497
|
-
|
22498
|
-
|
22499
|
-
|
22500
|
-
|
22501
|
-
|
22502
|
-
|
22503
|
-
|
22504
|
-
|
22505
|
-
|
22505
|
+
}
|
22506
|
+
rows.setRowSelection(row, value);
|
22507
|
+
columns.setColumnAttribute(column, COLUMN_ATTRIBUTE.SELECTION_INDETERMINATE, rows.getRowIndeterminate());
|
22508
|
+
columns.setColumnAttribute(column, COLUMN_ATTRIBUTE.SELECTION_VAL, rows.getRowCheckedAllValue());
|
22509
|
+
ctx.emit(EMIT_EVENTS.ROW_SELECT, {
|
22510
|
+
row: row,
|
22511
|
+
index: index,
|
22512
|
+
checked: value,
|
22513
|
+
data: props.data
|
22514
|
+
});
|
22515
|
+
ctx.emit(EMIT_EVENTS.ROW_SELECT_CHANGE, {
|
22516
|
+
row: row,
|
22517
|
+
index: index,
|
22518
|
+
checked: value,
|
22519
|
+
data: props.data
|
22520
|
+
});
|
22506
22521
|
};
|
22507
|
-
|
22508
|
-
|
22509
|
-
|
22510
|
-
|
22511
|
-
|
22512
|
-
var
|
22513
|
-
|
22514
|
-
|
22515
|
-
|
22516
|
-
|
22522
|
+
var beforeRowChange = function beforeRowChange() {
|
22523
|
+
if (isShiftKeyDown.value) {
|
22524
|
+
var result = setStore(row, index);
|
22525
|
+
if (result) {
|
22526
|
+
var _rows$pageRowList$sli;
|
22527
|
+
var _getStore = getStore(),
|
22528
|
+
start = _getStore.start,
|
22529
|
+
end = _getStore.end;
|
22530
|
+
var startIndex = start.index < end.index ? start.index : end.index;
|
22531
|
+
var endIndex = start.index < end.index ? end.index : start.index;
|
22532
|
+
((_rows$pageRowList$sli = rows.pageRowList.slice(startIndex, endIndex + 1)) !== null && _rows$pageRowList$sli !== void 0 ? _rows$pageRowList$sli : []).forEach(function (item) {
|
22533
|
+
var isRowEnabled = isRowSelectEnable(props, {
|
22534
|
+
row: row,
|
22517
22535
|
index: index,
|
22518
|
-
|
22519
|
-
})
|
22520
|
-
|
22521
|
-
|
22522
|
-
}
|
22536
|
+
isCheckAll: false
|
22537
|
+
});
|
22538
|
+
isRowEnabled && rows.setRowSelection(item, true);
|
22539
|
+
});
|
22540
|
+
}
|
22541
|
+
ctx.emit(EMIT_EVENTS.ROW_SELECT, {
|
22542
|
+
row: row,
|
22543
|
+
index: index,
|
22544
|
+
checked: true,
|
22545
|
+
data: props.data,
|
22546
|
+
isShiftKeyDown: true
|
22547
|
+
});
|
22548
|
+
ctx.emit(EMIT_EVENTS.ROW_SELECT_CHANGE, {
|
22549
|
+
row: row,
|
22550
|
+
index: index,
|
22551
|
+
checked: true,
|
22552
|
+
data: props.data,
|
22553
|
+
isShiftKeyDown: true
|
22554
|
+
});
|
22555
|
+
return Promise.resolve(!result);
|
22523
22556
|
}
|
22524
|
-
|
22525
|
-
|
22526
|
-
|
22527
|
-
|
22528
|
-
|
22529
|
-
|
22530
|
-
|
22531
|
-
|
22532
|
-
|
22533
|
-
|
22534
|
-
|
22535
|
-
|
22536
|
-
|
22537
|
-
|
22538
|
-
|
22539
|
-
|
22540
|
-
var renderRows = function renderRows(dataList) {
|
22541
|
-
var preRow = {};
|
22542
|
-
var rowSpanMap = new WeakMap();
|
22543
|
-
var needRowSpan = columns.needRowSpan.value;
|
22544
|
-
return (0,external_vue_namespaceObject.createVNode)("tbody", null, [dataList.map(function (row, rowIndex) {
|
22545
|
-
var result = getRowRender(row, rowIndex, preRow, dataList, rowSpanMap, needRowSpan);
|
22546
|
-
preRow = row;
|
22547
|
-
return result;
|
22548
|
-
})]);
|
22549
|
-
};
|
22550
|
-
var getRowHeight = function getRowHeight(row, rowIndex) {
|
22551
|
-
var _settings$options = settings.options,
|
22552
|
-
size = _settings$options.size,
|
22553
|
-
height = _settings$options.height;
|
22554
|
-
if (height !== null && height !== undefined) {
|
22555
|
-
return resolvePropVal(settings.options, 'height', ['tbody', row, rowIndex, size]);
|
22556
|
-
}
|
22557
|
-
return resolvePropVal(props, 'rowHeight', ['tbody', row, rowIndex]);
|
22558
|
-
};
|
22559
|
-
var setDragEvents = function setDragEvents(events) {
|
22560
|
-
dragEvents = events;
|
22557
|
+
return Promise.resolve(true);
|
22558
|
+
};
|
22559
|
+
var indeterminate = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE);
|
22560
|
+
var isChecked = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION);
|
22561
|
+
var isEnable = isRowSelectEnable(props, {
|
22562
|
+
row: row,
|
22563
|
+
index: index,
|
22564
|
+
isCheckAll: false
|
22565
|
+
});
|
22566
|
+
return (0,external_vue_namespaceObject.createVNode)(checkbox_namespaceObject["default"], {
|
22567
|
+
"beforeChange": beforeRowChange,
|
22568
|
+
"disabled": !isEnable,
|
22569
|
+
"indeterminate": indeterminate,
|
22570
|
+
"modelValue": isChecked,
|
22571
|
+
"onChange": handleChecked
|
22572
|
+
}, null);
|
22561
22573
|
};
|
22562
22574
|
/**
|
22563
|
-
*
|
22564
|
-
* @param
|
22575
|
+
* 渲染表格Cell内容
|
22576
|
+
* @param row 当前行
|
22577
|
+
* @param column 当前列
|
22578
|
+
* @param index 当前列
|
22579
|
+
* @param rows 当前列
|
22565
22580
|
* @returns
|
22566
22581
|
*/
|
22567
|
-
var
|
22568
|
-
var
|
22569
|
-
var
|
22570
|
-
|
22571
|
-
|
22582
|
+
var renderCell = function renderCell() {
|
22583
|
+
var _renderFn$column$type, _renderFn$column$type2;
|
22584
|
+
var defaultFn = function defaultFn() {
|
22585
|
+
var type = resolvePropVal(column, 'type', [column, row]);
|
22586
|
+
if (type === 'index') {
|
22587
|
+
return rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_INDEX);
|
22572
22588
|
}
|
22573
|
-
|
22574
|
-
|
22575
|
-
|
22576
|
-
|
22577
|
-
|
22578
|
-
|
22579
|
-
|
22580
|
-
|
22581
|
-
|
22582
|
-
|
22583
|
-
|
22584
|
-
|
22585
|
-
|
22586
|
-
|
22587
|
-
|
22588
|
-
|
22589
|
-
|
22590
|
-
|
22591
|
-
|
22592
|
-
|
22593
|
-
|
22594
|
-
|
22595
|
-
|
22596
|
-
|
22597
|
-
|
22598
|
-
|
22599
|
-
|
22600
|
-
|
22601
|
-
|
22602
|
-
|
22603
|
-
|
22604
|
-
|
22605
|
-
*/
|
22606
|
-
var handleRowDblClick = function handleRowDblClick(e, row, index, rows) {
|
22607
|
-
ctx.emit(EMIT_EVENTS.ROW_DBL_CLICK, e, row, index, rows);
|
22608
|
-
};
|
22609
|
-
var handleRowEnter = function handleRowEnter(e, row, index, rows) {
|
22610
|
-
ctx.emit(EMIT_EVENTS.ROW_MOUSE_ENTER, e, row, index, rows);
|
22611
|
-
};
|
22612
|
-
var handleRowLeave = function handleRowLeave(e, row, index, rows) {
|
22613
|
-
ctx.emit(EMIT_EVENTS.ROW_MOUSE_LEAVE, e, row, index, rows);
|
22589
|
+
var key = resolvePropVal(column, 'field', [column, row]);
|
22590
|
+
var cell = getRowText(row, key);
|
22591
|
+
if (typeof column.render === 'function') {
|
22592
|
+
return renderCellCallbackFn();
|
22593
|
+
}
|
22594
|
+
if (typeof cell === 'boolean') {
|
22595
|
+
return String(cell);
|
22596
|
+
}
|
22597
|
+
if (!cell && typeof cell !== 'number') {
|
22598
|
+
var emptyCellText = props.emptyCellText;
|
22599
|
+
if (emptyCellText) {
|
22600
|
+
if (typeof emptyCellText === 'function') {
|
22601
|
+
return emptyCellText(row, column, index, rows.tableRowList.value);
|
22602
|
+
}
|
22603
|
+
return emptyCellText;
|
22604
|
+
}
|
22605
|
+
}
|
22606
|
+
if (typeof_typeof(cell) === 'object') {
|
22607
|
+
return JSON.stringify((0,external_vue_namespaceObject.unref)(cell));
|
22608
|
+
}
|
22609
|
+
return cell;
|
22610
|
+
};
|
22611
|
+
var renderFn = {
|
22612
|
+
expand: function expand() {
|
22613
|
+
return isChild ? '' : renderExpandColumn();
|
22614
|
+
},
|
22615
|
+
selection: function selection() {
|
22616
|
+
return renderCheckboxColumn();
|
22617
|
+
},
|
22618
|
+
drag: renderDraggableCell
|
22619
|
+
};
|
22620
|
+
return (_renderFn$column$type = (_renderFn$column$type2 = renderFn[column.type]) === null || _renderFn$column$type2 === void 0 ? void 0 : _renderFn$column$type2.call(renderFn, row, column, index, rows)) !== null && _renderFn$column$type !== void 0 ? _renderFn$column$type : defaultFn();
|
22614
22621
|
};
|
22615
|
-
var renderCellCallbackFn = function renderCellCallbackFn(
|
22622
|
+
var renderCellCallbackFn = function renderCellCallbackFn() {
|
22616
22623
|
var cell = getRowText(row, resolvePropVal(column, 'field', [column, row]));
|
22617
22624
|
var data = row;
|
22618
22625
|
return column.render({
|
@@ -22621,50 +22628,50 @@ function use_render_isSlot(s) {
|
|
22621
22628
|
row: row,
|
22622
22629
|
column: column,
|
22623
22630
|
index: index,
|
22624
|
-
rows: rows
|
22631
|
+
rows: rows.tableRowList.value
|
22625
22632
|
});
|
22626
22633
|
};
|
22627
|
-
var getExpandCell = function getExpandCell(
|
22628
|
-
var _ctx$slots$expandCont, _ctx$slots$expandCont2, _ctx$
|
22634
|
+
var getExpandCell = function getExpandCell() {
|
22635
|
+
var _ctx$slots$expandCont, _ctx$slots$expandCont2, _ctx$slots;
|
22629
22636
|
var isExpand = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND);
|
22630
22637
|
var icon = isExpand ? (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.DownShape, null, null) : (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.RightShape, null, null);
|
22631
|
-
return (0,external_vue_namespaceObject.createVNode)("span", null, [[icon, (_ctx$slots$expandCont = (_ctx$slots$expandCont2 = (_ctx$
|
22638
|
+
return (0,external_vue_namespaceObject.createVNode)("span", null, [[icon, (_ctx$slots$expandCont = (_ctx$slots$expandCont2 = (_ctx$slots = ctx.slots).expandContent) === null || _ctx$slots$expandCont2 === void 0 ? void 0 : _ctx$slots$expandCont2.call(_ctx$slots, row)) !== null && _ctx$slots$expandCont !== void 0 ? _ctx$slots$expandCont : '']]);
|
22632
22639
|
};
|
22633
|
-
var handleRowExpandClick = function handleRowExpandClick(
|
22640
|
+
var handleRowExpandClick = function handleRowExpandClick(e) {
|
22634
22641
|
rows.setRowExpand(row, !rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND));
|
22635
22642
|
ctx.emit(EMIT_EVENTS.ROW_EXPAND_CLICK, {
|
22636
22643
|
row: row,
|
22637
22644
|
column: column,
|
22638
22645
|
index: index,
|
22639
|
-
rows:
|
22646
|
+
rows: rows.tableRowList.value,
|
22640
22647
|
e: e
|
22641
22648
|
});
|
22642
22649
|
};
|
22643
|
-
var renderExpandColumn = function renderExpandColumn(
|
22650
|
+
var renderExpandColumn = function renderExpandColumn() {
|
22644
22651
|
var renderExpandSlot = function renderExpandSlot() {
|
22645
|
-
var _ctx$slots$expandCell, _ctx$slots$expandCell2, _ctx$
|
22652
|
+
var _ctx$slots$expandCell, _ctx$slots$expandCell2, _ctx$slots2;
|
22646
22653
|
if (typeof column.render === 'function') {
|
22647
|
-
return renderCellCallbackFn(
|
22654
|
+
return renderCellCallbackFn();
|
22648
22655
|
}
|
22649
|
-
return (_ctx$slots$expandCell = (_ctx$slots$expandCell2 = (_ctx$
|
22656
|
+
return (_ctx$slots$expandCell = (_ctx$slots$expandCell2 = (_ctx$slots2 = ctx.slots).expandCell) === null || _ctx$slots$expandCell2 === void 0 ? void 0 : _ctx$slots$expandCell2.call(_ctx$slots2, {
|
22650
22657
|
row: row,
|
22651
22658
|
column: column,
|
22652
22659
|
index: index,
|
22653
22660
|
rows: rows
|
22654
|
-
})) !== null && _ctx$slots$expandCell !== void 0 ? _ctx$slots$expandCell : getExpandCell(
|
22661
|
+
})) !== null && _ctx$slots$expandCell !== void 0 ? _ctx$slots$expandCell : getExpandCell();
|
22655
22662
|
};
|
22656
22663
|
return (0,external_vue_namespaceObject.createVNode)("span", {
|
22657
22664
|
"class": "expand-btn-action",
|
22658
22665
|
"onClick": function onClick(e) {
|
22659
|
-
return handleRowExpandClick(
|
22666
|
+
return handleRowExpandClick(e);
|
22660
22667
|
}
|
22661
22668
|
}, [renderExpandSlot()]);
|
22662
22669
|
};
|
22663
|
-
var renderDraggableCell = function renderDraggableCell(
|
22670
|
+
var renderDraggableCell = function renderDraggableCell() {
|
22664
22671
|
var _props$rowDraggable$r, _props$rowDraggable, _props$rowDraggable$f, _props$rowDraggable2, _props$rowDraggable$i, _props$rowDraggable3;
|
22665
22672
|
var renderFn = (_props$rowDraggable$r = (_props$rowDraggable = props.rowDraggable) === null || _props$rowDraggable === void 0 ? void 0 : _props$rowDraggable.render) !== null && _props$rowDraggable$r !== void 0 ? _props$rowDraggable$r : props.rowDraggable;
|
22666
22673
|
if (typeof renderFn === 'function') {
|
22667
|
-
return renderFn(row, column, index, rows);
|
22674
|
+
return renderFn(row, column, index, rows.tableRowList.value);
|
22668
22675
|
}
|
22669
22676
|
var fontSize = (_props$rowDraggable$f = (_props$rowDraggable2 = props.rowDraggable) === null || _props$rowDraggable2 === void 0 ? void 0 : _props$rowDraggable2.fontSize) !== null && _props$rowDraggable$f !== void 0 ? _props$rowDraggable$f : '14px';
|
22670
22677
|
var fontIcon = (_props$rowDraggable$i = (_props$rowDraggable3 = props.rowDraggable) === null || _props$rowDraggable3 === void 0 ? void 0 : _props$rowDraggable3.icon) !== null && _props$rowDraggable$i !== void 0 ? _props$rowDraggable$i : (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.GragFill, {
|
@@ -22673,140 +22680,296 @@ function use_render_isSlot(s) {
|
|
22673
22680
|
}, null);
|
22674
22681
|
return fontIcon;
|
22675
22682
|
};
|
22676
|
-
|
22677
|
-
|
22678
|
-
|
22679
|
-
|
22680
|
-
|
22681
|
-
|
22682
|
-
|
22683
|
-
|
22684
|
-
|
22685
|
-
|
22686
|
-
|
22687
|
-
|
22688
|
-
|
22689
|
-
|
22690
|
-
|
22691
|
-
|
22692
|
-
|
22693
|
-
|
22694
|
-
|
22695
|
-
|
22696
|
-
|
22697
|
-
|
22698
|
-
|
22699
|
-
|
22700
|
-
|
22701
|
-
|
22702
|
-
|
22703
|
-
|
22704
|
-
|
22683
|
+
return {
|
22684
|
+
renderCell: renderCell
|
22685
|
+
};
|
22686
|
+
});
|
22687
|
+
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-shift-key.tsx
|
22688
|
+
/*
|
22689
|
+
* Tencent is pleased to support the open source community by making
|
22690
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
22691
|
+
*
|
22692
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
22693
|
+
*
|
22694
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
22695
|
+
*
|
22696
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
22697
|
+
*
|
22698
|
+
* ---------------------------------------------------
|
22699
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
22700
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
22701
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
22702
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
22703
|
+
*
|
22704
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
22705
|
+
* the Software.
|
22706
|
+
*
|
22707
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
22708
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
22709
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
22710
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
22711
|
+
* IN THE SOFTWARE.
|
22712
|
+
*/
|
22713
|
+
|
22714
|
+
var multiShiftKey = function multiShiftKey(props) {
|
22715
|
+
var isShiftKeyDown = (0,external_vue_namespaceObject.ref)(false);
|
22716
|
+
var store = {
|
22717
|
+
start: null,
|
22718
|
+
end: null
|
22719
|
+
};
|
22720
|
+
var handleKeyDown = function handleKeyDown(e) {
|
22721
|
+
if (e.key === 'Shift') {
|
22722
|
+
isShiftKeyDown.value = true;
|
22723
|
+
}
|
22724
|
+
};
|
22725
|
+
var handleKeyUp = function handleKeyUp(e) {
|
22726
|
+
if (e.key === 'Shift') {
|
22727
|
+
isShiftKeyDown.value = false;
|
22728
|
+
clearStore();
|
22729
|
+
}
|
22730
|
+
};
|
22731
|
+
var setStoreStart = function setStoreStart(row, index) {
|
22732
|
+
store.start = {
|
22733
|
+
index: index !== null && index !== void 0 ? index : null,
|
22734
|
+
row: row !== null && row !== void 0 ? row : null
|
22735
|
+
};
|
22736
|
+
};
|
22737
|
+
var clearStoreStart = function clearStoreStart() {
|
22738
|
+
setStoreStart();
|
22739
|
+
};
|
22740
|
+
var setStore = function setStore(row, index) {
|
22741
|
+
if (store.start === null && store.end === null) {
|
22742
|
+
store.start = {
|
22705
22743
|
index: index,
|
22706
|
-
|
22707
|
-
|
22708
|
-
|
22744
|
+
row: row
|
22745
|
+
};
|
22746
|
+
return false;
|
22747
|
+
}
|
22748
|
+
store.end = {
|
22749
|
+
index: index,
|
22750
|
+
row: row
|
22709
22751
|
};
|
22710
|
-
|
22711
|
-
|
22712
|
-
|
22713
|
-
|
22714
|
-
|
22715
|
-
|
22716
|
-
|
22717
|
-
|
22718
|
-
|
22719
|
-
|
22720
|
-
|
22721
|
-
|
22722
|
-
|
22752
|
+
return true;
|
22753
|
+
};
|
22754
|
+
var clearStore = function clearStore() {
|
22755
|
+
store.start = null;
|
22756
|
+
store.end = null;
|
22757
|
+
};
|
22758
|
+
if (props.shiftMultiChecked) {
|
22759
|
+
window.addEventListener('keydown', handleKeyDown);
|
22760
|
+
window.addEventListener('keyup', handleKeyUp);
|
22761
|
+
}
|
22762
|
+
var getStore = function getStore() {
|
22763
|
+
return store;
|
22764
|
+
};
|
22765
|
+
var removeMultiCheckedEvents = function removeMultiCheckedEvents() {
|
22766
|
+
if (props.shiftMultiChecked) {
|
22767
|
+
window.removeEventListener('keydown', handleKeyDown);
|
22768
|
+
window.removeEventListener('keyup', handleKeyUp);
|
22769
|
+
}
|
22770
|
+
};
|
22771
|
+
return {
|
22772
|
+
isShiftKeyDown: isShiftKeyDown,
|
22773
|
+
setStore: setStore,
|
22774
|
+
getStore: getStore,
|
22775
|
+
clearStore: clearStore,
|
22776
|
+
setStoreStart: setStoreStart,
|
22777
|
+
clearStoreStart: clearStoreStart,
|
22778
|
+
removeMultiCheckedEvents: removeMultiCheckedEvents
|
22779
|
+
};
|
22780
|
+
};
|
22781
|
+
/* harmony default export */ const use_shift_key = (multiShiftKey);
|
22782
|
+
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-render.tsx
|
22783
|
+
|
22784
|
+
|
22785
|
+
|
22786
|
+
/*
|
22787
|
+
* Tencent is pleased to support the open source community by making
|
22788
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
22789
|
+
*
|
22790
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
22791
|
+
*
|
22792
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
22793
|
+
*
|
22794
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
22795
|
+
*
|
22796
|
+
* ---------------------------------------------------
|
22797
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
22798
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
22799
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
22800
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
22801
|
+
*
|
22802
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
22803
|
+
* the Software.
|
22804
|
+
*
|
22805
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
22806
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
22807
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
22808
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
22809
|
+
* IN THE SOFTWARE.
|
22810
|
+
*/
|
22811
|
+
|
22812
|
+
|
22813
|
+
|
22814
|
+
|
22815
|
+
|
22816
|
+
|
22817
|
+
|
22818
|
+
|
22819
|
+
|
22820
|
+
|
22821
|
+
|
22822
|
+
|
22823
|
+
|
22824
|
+
|
22825
|
+
function use_render_isSlot(s) {
|
22826
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
|
22827
|
+
}
|
22828
|
+
/* harmony default export */ const use_render = (function (_ref) {
|
22829
|
+
var props = _ref.props,
|
22830
|
+
ctx = _ref.ctx,
|
22831
|
+
columns = _ref.columns,
|
22832
|
+
rows = _ref.rows,
|
22833
|
+
pagination = _ref.pagination,
|
22834
|
+
settings = _ref.settings;
|
22835
|
+
var t = (0,config_provider_namespaceObject.useLocale)('table');
|
22836
|
+
var uuid = esm_browser_v4();
|
22837
|
+
var dragEvents = {};
|
22838
|
+
var multiShiftKey = use_shift_key(props);
|
22839
|
+
/**
|
22840
|
+
* 渲染table colgroup
|
22841
|
+
* @returns
|
22842
|
+
*/
|
22843
|
+
var renderColgroup = function renderColgroup() {
|
22844
|
+
return (0,external_vue_namespaceObject.createVNode)("colgroup", null, [(columns.visibleColumns || []).map(function (column, _index) {
|
22845
|
+
var width = "".concat(resolveWidth(columns.getColumnOrderWidth(column))).replace(/px$/i, '');
|
22846
|
+
var minWidth = columns.getColumnAttribute(column, COLUMN_ATTRIBUTE.COL_MIN_WIDTH);
|
22847
|
+
return (0,external_vue_namespaceObject.createVNode)("col", {
|
22848
|
+
"style": {
|
22849
|
+
width: resolveNumberOrStringToPix(width, 'auto'),
|
22850
|
+
minWidth: resolveNumberOrStringToPix(minWidth, 'auto')
|
22851
|
+
}
|
22852
|
+
}, null);
|
22853
|
+
})]);
|
22854
|
+
};
|
22855
|
+
/**
|
22856
|
+
* 渲染Table Header
|
22857
|
+
* @returns
|
22858
|
+
*/
|
22859
|
+
var renderHeader = function renderHeader() {
|
22860
|
+
var config = resolveHeadConfig(props);
|
22861
|
+
var rowStyle = {
|
22862
|
+
// @ts-ignore:next-line
|
22863
|
+
'--row-height': "".concat(resolvePropVal(config, 'height', ['thead']), "px"),
|
22864
|
+
backgroundColor: props.thead.color
|
22865
|
+
};
|
22866
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("thead", {
|
22867
|
+
"style": rowStyle
|
22868
|
+
}, [(0,external_vue_namespaceObject.createVNode)(table_row, null, {
|
22869
|
+
"default": function _default() {
|
22870
|
+
return [(0,external_vue_namespaceObject.createVNode)("tr", null, [columns.visibleColumns.map(function (column, index) {
|
22871
|
+
var _useHead = use_head({
|
22872
|
+
props: props,
|
22873
|
+
ctx: ctx,
|
22874
|
+
columns: columns,
|
22875
|
+
column: column,
|
22723
22876
|
index: index,
|
22724
|
-
|
22725
|
-
})
|
22726
|
-
|
22727
|
-
|
22728
|
-
}
|
22729
|
-
ctx.emit(EMIT_EVENTS.ROW_SELECT, {
|
22730
|
-
row: row,
|
22731
|
-
index: index,
|
22732
|
-
checked: true,
|
22733
|
-
data: props.data,
|
22734
|
-
isShiftKeyDown: true
|
22735
|
-
});
|
22736
|
-
ctx.emit(EMIT_EVENTS.ROW_SELECT_CHANGE, {
|
22737
|
-
row: row,
|
22738
|
-
index: index,
|
22739
|
-
checked: true,
|
22740
|
-
data: props.data,
|
22741
|
-
isShiftKeyDown: true
|
22742
|
-
});
|
22743
|
-
return Promise.resolve(!result);
|
22877
|
+
rows: rows
|
22878
|
+
}),
|
22879
|
+
getTH = _useHead.getTH;
|
22880
|
+
return getTH();
|
22881
|
+
})])];
|
22744
22882
|
}
|
22745
|
-
|
22746
|
-
|
22747
|
-
|
22748
|
-
|
22749
|
-
|
22750
|
-
|
22751
|
-
|
22752
|
-
|
22753
|
-
|
22754
|
-
|
22755
|
-
"beforeChange": beforeRowChange,
|
22756
|
-
"disabled": !isEnable,
|
22757
|
-
"indeterminate": indeterminate,
|
22758
|
-
"modelValue": isChecked,
|
22759
|
-
"onChange": handleChecked
|
22760
|
-
}, null);
|
22883
|
+
})])]);
|
22884
|
+
};
|
22885
|
+
var renderColumns = function renderColumns() {
|
22886
|
+
if (!props.showHead) {
|
22887
|
+
return null;
|
22888
|
+
}
|
22889
|
+
return (0,external_vue_namespaceObject.createVNode)("table", {
|
22890
|
+
"cellpadding": 0,
|
22891
|
+
"cellspacing": 0
|
22892
|
+
}, [renderColgroup(), renderHeader()]);
|
22761
22893
|
};
|
22894
|
+
/** **************************************** Rows Render ******************************* **/
|
22762
22895
|
/**
|
22763
|
-
*
|
22764
|
-
* @param row 当前行
|
22765
|
-
* @param column 当前列
|
22766
|
-
* @param index 当前列
|
22767
|
-
* @param rows 当前列
|
22896
|
+
* 渲染Table Body
|
22768
22897
|
* @returns
|
22769
22898
|
*/
|
22770
|
-
var
|
22771
|
-
var
|
22772
|
-
var
|
22773
|
-
var
|
22774
|
-
|
22775
|
-
|
22776
|
-
|
22777
|
-
|
22778
|
-
|
22779
|
-
|
22780
|
-
|
22781
|
-
|
22782
|
-
|
22783
|
-
|
22784
|
-
|
22785
|
-
|
22786
|
-
|
22787
|
-
|
22788
|
-
|
22789
|
-
|
22790
|
-
|
22791
|
-
|
22792
|
-
|
22793
|
-
|
22794
|
-
|
22795
|
-
|
22796
|
-
|
22899
|
+
var renderRows = function renderRows(dataList) {
|
22900
|
+
var preRow = {};
|
22901
|
+
var rowSpanMap = new WeakMap();
|
22902
|
+
var needRowSpan = columns.needRowSpan.value;
|
22903
|
+
return (0,external_vue_namespaceObject.createVNode)("tbody", null, [dataList.map(function (row, rowIndex) {
|
22904
|
+
var result = getRowRender(row, rowIndex, preRow, dataList, rowSpanMap, needRowSpan);
|
22905
|
+
preRow = row;
|
22906
|
+
return result;
|
22907
|
+
})]);
|
22908
|
+
};
|
22909
|
+
var getRowHeight = function getRowHeight(row, rowIndex) {
|
22910
|
+
var _settings$options = settings.options,
|
22911
|
+
size = _settings$options.size,
|
22912
|
+
height = _settings$options.height;
|
22913
|
+
if (height !== null && height !== undefined) {
|
22914
|
+
return resolvePropVal(settings.options, 'height', ['tbody', row, rowIndex, size]);
|
22915
|
+
}
|
22916
|
+
return resolvePropVal(props, 'rowHeight', ['tbody', row, rowIndex]);
|
22917
|
+
};
|
22918
|
+
var setDragEvents = function setDragEvents(events) {
|
22919
|
+
dragEvents = events;
|
22920
|
+
};
|
22921
|
+
/**
|
22922
|
+
* 渲染Table主体
|
22923
|
+
* @param rows 表格数据
|
22924
|
+
* @returns
|
22925
|
+
*/
|
22926
|
+
var renderTBody = function renderTBody(list) {
|
22927
|
+
var dataList = list !== null && list !== void 0 ? list : rows.pageRowList;
|
22928
|
+
var localEmptyText = (0,external_vue_namespaceObject.computed)(function () {
|
22929
|
+
if (props.emptyText === undefined) {
|
22930
|
+
return t.value.emptyText;
|
22797
22931
|
}
|
22798
|
-
return
|
22799
|
-
};
|
22800
|
-
|
22801
|
-
|
22802
|
-
|
22803
|
-
|
22804
|
-
|
22805
|
-
|
22806
|
-
},
|
22807
|
-
|
22808
|
-
|
22809
|
-
|
22932
|
+
return props.emptyText;
|
22933
|
+
});
|
22934
|
+
if (!dataList.length) {
|
22935
|
+
var _ctx$slots$empty, _ctx$slots$empty2, _ctx$slots;
|
22936
|
+
return (_ctx$slots$empty = (_ctx$slots$empty2 = (_ctx$slots = ctx.slots).empty) === null || _ctx$slots$empty2 === void 0 ? void 0 : _ctx$slots$empty2.call(_ctx$slots)) !== null && _ctx$slots$empty !== void 0 ? _ctx$slots$empty : (0,external_vue_namespaceObject.createVNode)(body_empty, {
|
22937
|
+
"emptyText": localEmptyText.value,
|
22938
|
+
"filterList": dataList,
|
22939
|
+
"list": props.data
|
22940
|
+
}, null);
|
22941
|
+
}
|
22942
|
+
return (0,external_vue_namespaceObject.createVNode)("table", {
|
22943
|
+
"cellpadding": 0,
|
22944
|
+
"cellspacing": 0,
|
22945
|
+
"data-table-uuid": uuid
|
22946
|
+
}, [renderColgroup(), renderRows(dataList)]);
|
22947
|
+
};
|
22948
|
+
/**
|
22949
|
+
* table row click handle
|
22950
|
+
* @param e
|
22951
|
+
* @param row
|
22952
|
+
* @param index
|
22953
|
+
* @param rows
|
22954
|
+
*/
|
22955
|
+
var handleRowClick = function handleRowClick(e, row, index, rows) {
|
22956
|
+
ctx.emit(EMIT_EVENTS.ROW_CLICK, e, row, index, rows);
|
22957
|
+
};
|
22958
|
+
/**
|
22959
|
+
* table row click handle
|
22960
|
+
* @param e
|
22961
|
+
* @param row
|
22962
|
+
* @param index
|
22963
|
+
* @param rows
|
22964
|
+
*/
|
22965
|
+
var handleRowDblClick = function handleRowDblClick(e, row, index, rows) {
|
22966
|
+
ctx.emit(EMIT_EVENTS.ROW_DBL_CLICK, e, row, index, rows);
|
22967
|
+
};
|
22968
|
+
var handleRowEnter = function handleRowEnter(e, row, index, rows) {
|
22969
|
+
ctx.emit(EMIT_EVENTS.ROW_MOUSE_ENTER, e, row, index, rows);
|
22970
|
+
};
|
22971
|
+
var handleRowLeave = function handleRowLeave(e, row, index, rows) {
|
22972
|
+
ctx.emit(EMIT_EVENTS.ROW_MOUSE_LEAVE, e, row, index, rows);
|
22810
22973
|
};
|
22811
22974
|
var getRowSpanConfig = function getRowSpanConfig(row, rowIndex, preRow, col, store) {
|
22812
22975
|
var _store$get$get, _store$get;
|
@@ -22892,6 +23055,20 @@ function use_render_isSlot(s) {
|
|
22892
23055
|
'expand-row': rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND),
|
22893
23056
|
'is-last': rowIndex + rowspan >= rowLength
|
22894
23057
|
}]);
|
23058
|
+
var columnKey = "".concat(rowId, "_").concat(index);
|
23059
|
+
var cellKey = "".concat(rowId, "_").concat(index, "_cell");
|
23060
|
+
var _useCell = use_cell({
|
23061
|
+
props: props,
|
23062
|
+
rows: rows,
|
23063
|
+
ctx: ctx,
|
23064
|
+
columns: columns,
|
23065
|
+
row: row,
|
23066
|
+
index: index,
|
23067
|
+
column: column,
|
23068
|
+
isChild: isChild,
|
23069
|
+
multiShiftKey: multiShiftKey
|
23070
|
+
}),
|
23071
|
+
renderCell = _useCell.renderCell;
|
22895
23072
|
var handleEmit = function handleEmit(event, type) {
|
22896
23073
|
var args = {
|
22897
23074
|
event: event,
|
@@ -22899,7 +23076,7 @@ function use_render_isSlot(s) {
|
|
22899
23076
|
column: column,
|
22900
23077
|
cell: {
|
22901
23078
|
getValue: function getValue() {
|
22902
|
-
return renderCell(
|
23079
|
+
return renderCell();
|
22903
23080
|
}
|
22904
23081
|
},
|
22905
23082
|
rowIndex: rowIndex,
|
@@ -22907,14 +23084,13 @@ function use_render_isSlot(s) {
|
|
22907
23084
|
};
|
22908
23085
|
ctx.emit(type, args);
|
22909
23086
|
};
|
22910
|
-
var columnKey = "".concat(rowId, "_").concat(index);
|
22911
|
-
var cellKey = "".concat(rowId, "_").concat(index, "_cell");
|
22912
23087
|
return (0,external_vue_namespaceObject.createVNode)("td", {
|
22913
23088
|
"key": columnKey,
|
22914
23089
|
"style": cellStyle,
|
22915
23090
|
"class": cellClass,
|
22916
23091
|
"colspan": colspan,
|
22917
23092
|
"rowspan": rowspan,
|
23093
|
+
"data-id": columnKey,
|
22918
23094
|
"onClick": function onClick(event) {
|
22919
23095
|
return handleEmit(event, EMIT_EVENTS.CELL_CLICK);
|
22920
23096
|
},
|
@@ -22923,12 +23099,13 @@ function use_render_isSlot(s) {
|
|
22923
23099
|
}
|
22924
23100
|
}, [(0,external_vue_namespaceObject.createVNode)(table_cell, {
|
22925
23101
|
"key": cellKey,
|
23102
|
+
"data-id": cellKey,
|
22926
23103
|
"class": tdCtxClass,
|
22927
23104
|
"column": column,
|
22928
23105
|
"observerResize": props.observerResize,
|
22929
23106
|
"parentSetting": props.showOverflowTooltip,
|
22930
23107
|
"row": row
|
22931
|
-
}, use_render_isSlot(_slot = renderCell(
|
23108
|
+
}, use_render_isSlot(_slot = renderCell()) ? _slot : {
|
22932
23109
|
"default": function _default() {
|
22933
23110
|
return [_slot];
|
22934
23111
|
}
|
@@ -22942,7 +23119,7 @@ function use_render_isSlot(s) {
|
|
22942
23119
|
var renderExpandRow = function renderExpandRow(row, rowClass, _rowIndex) {
|
22943
23120
|
var isExpand = rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_EXPAND);
|
22944
23121
|
if (isExpand) {
|
22945
|
-
var _ctx$slots$expandRow, _ctx$slots$expandRow2, _ctx$
|
23122
|
+
var _ctx$slots$expandRow, _ctx$slots$expandRow2, _ctx$slots2;
|
22946
23123
|
var resovledClass = [].concat(_toConsumableArray(rowClass), [{
|
22947
23124
|
row_expend: true
|
22948
23125
|
}]);
|
@@ -22962,7 +23139,7 @@ function use_render_isSlot(s) {
|
|
22962
23139
|
}, [(0,external_vue_namespaceObject.createVNode)("td", {
|
22963
23140
|
"colspan": columns.visibleColumns.length,
|
22964
23141
|
"rowspan": 1
|
22965
|
-
}, [(_ctx$slots$expandRow = (_ctx$slots$expandRow2 = (_ctx$
|
23142
|
+
}, [(_ctx$slots$expandRow = (_ctx$slots$expandRow2 = (_ctx$slots2 = ctx.slots).expandRow) === null || _ctx$slots$expandRow2 === void 0 ? void 0 : _ctx$slots$expandRow2.call(_ctx$slots2, row)) !== null && _ctx$slots$expandRow !== void 0 ? _ctx$slots$expandRow : (0,external_vue_namespaceObject.createVNode)("div", {
|
22966
23143
|
"class": "expand-cell-ctx"
|
22967
23144
|
}, [(0,external_vue_namespaceObject.createTextVNode)("Expand Row")])])])];
|
22968
23145
|
}
|
@@ -23003,6 +23180,9 @@ function use_render_isSlot(s) {
|
|
23003
23180
|
}), null);
|
23004
23181
|
}
|
23005
23182
|
};
|
23183
|
+
(0,external_vue_namespaceObject.onUnmounted)(function () {
|
23184
|
+
multiShiftKey.removeMultiCheckedEvents();
|
23185
|
+
});
|
23006
23186
|
return {
|
23007
23187
|
renderColumns: renderColumns,
|
23008
23188
|
renderTBody: renderTBody,
|
@@ -23305,90 +23485,6 @@ var useRows = function useRows(props) {
|
|
23305
23485
|
};
|
23306
23486
|
};
|
23307
23487
|
/* harmony default export */ const use_rows = (useRows);
|
23308
|
-
;// CONCATENATED MODULE: external "../loading"
|
23309
|
-
var loading_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
23310
|
-
var loading_y = x => () => x
|
23311
|
-
const loading_namespaceObject = loading_x({ ["BkLoadingMode"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__.BkLoadingMode, ["BkLoadingSize"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__.BkLoadingSize, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__["default"] });
|
23312
|
-
;// CONCATENATED MODULE: external "../loading/loading.less"
|
23313
|
-
var loading_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
23314
|
-
var loading_less_y = x => () => x
|
23315
|
-
const loading_less_namespaceObject = loading_less_x({ });
|
23316
|
-
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-scroll-loading.tsx
|
23317
|
-
|
23318
|
-
|
23319
|
-
/*
|
23320
|
-
* Tencent is pleased to support the open source community by making
|
23321
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
23322
|
-
*
|
23323
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
23324
|
-
*
|
23325
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
23326
|
-
*
|
23327
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
23328
|
-
*
|
23329
|
-
* ---------------------------------------------------
|
23330
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
23331
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
23332
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
23333
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
23334
|
-
*
|
23335
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
23336
|
-
* the Software.
|
23337
|
-
*
|
23338
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
23339
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23340
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
23341
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
23342
|
-
* IN THE SOFTWARE.
|
23343
|
-
*/
|
23344
|
-
|
23345
|
-
|
23346
|
-
|
23347
|
-
|
23348
|
-
/* harmony default export */ const use_scroll_loading = (function (props, ctx) {
|
23349
|
-
var refScrollLoading = (0,external_vue_namespaceObject.toRef)(props, 'scrollLoading');
|
23350
|
-
var getLoadingOption = function getLoadingOption() {
|
23351
|
-
if (typeof refScrollLoading.value === 'boolean') {
|
23352
|
-
return {
|
23353
|
-
loading: !!refScrollLoading.value,
|
23354
|
-
inline: true,
|
23355
|
-
title: '',
|
23356
|
-
size: loading_namespaceObject.BkLoadingSize.Normal,
|
23357
|
-
mode: loading_namespaceObject.BkLoadingMode.Default,
|
23358
|
-
indicator: null
|
23359
|
-
};
|
23360
|
-
}
|
23361
|
-
return refScrollLoading.value;
|
23362
|
-
};
|
23363
|
-
var isRender = (0,external_vue_namespaceObject.computed)(function () {
|
23364
|
-
return refScrollLoading.value !== null && (typeof refScrollLoading.value === 'boolean' && refScrollLoading.value || typeof_typeof(refScrollLoading.value) === 'object');
|
23365
|
-
});
|
23366
|
-
var renderScrollLoading = function renderScrollLoading() {
|
23367
|
-
var _ctx$slots$fixedBotto3, _ctx$slots$fixedBotto4, _ctx$slots2;
|
23368
|
-
if (isRender.value) {
|
23369
|
-
var _ctx$slots$fixedBotto, _ctx$slots$fixedBotto2, _ctx$slots;
|
23370
|
-
var _getLoadingOption = getLoadingOption(),
|
23371
|
-
loading = _getLoadingOption.loading,
|
23372
|
-
size = _getLoadingOption.size,
|
23373
|
-
mode = _getLoadingOption.mode,
|
23374
|
-
title = _getLoadingOption.title,
|
23375
|
-
inline = _getLoadingOption.inline,
|
23376
|
-
indicator = _getLoadingOption.indicator;
|
23377
|
-
return (_ctx$slots$fixedBotto = (_ctx$slots$fixedBotto2 = (_ctx$slots = ctx.slots).fixedBottom) === null || _ctx$slots$fixedBotto2 === void 0 ? void 0 : _ctx$slots$fixedBotto2.call(_ctx$slots)) !== null && _ctx$slots$fixedBotto !== void 0 ? _ctx$slots$fixedBotto : (0,external_vue_namespaceObject.createVNode)(loading_namespaceObject["default"], {
|
23378
|
-
loading: loading,
|
23379
|
-
size: size,
|
23380
|
-
mode: mode,
|
23381
|
-
title: title,
|
23382
|
-
inline: inline,
|
23383
|
-
indicator: indicator
|
23384
|
-
}, null);
|
23385
|
-
}
|
23386
|
-
return (_ctx$slots$fixedBotto3 = (_ctx$slots$fixedBotto4 = (_ctx$slots2 = ctx.slots).fixedBottom) === null || _ctx$slots$fixedBotto4 === void 0 ? void 0 : _ctx$slots$fixedBotto4.call(_ctx$slots2)) !== null && _ctx$slots$fixedBotto3 !== void 0 ? _ctx$slots$fixedBotto3 : null;
|
23387
|
-
};
|
23388
|
-
return {
|
23389
|
-
renderScrollLoading: renderScrollLoading
|
23390
|
-
};
|
23391
|
-
});
|
23392
23488
|
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-settings.tsx
|
23393
23489
|
|
23394
23490
|
|
@@ -23763,7 +23859,6 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23763
23859
|
|
23764
23860
|
|
23765
23861
|
|
23766
|
-
|
23767
23862
|
/* harmony default export */ const table = ((0,external_vue_namespaceObject.defineComponent)({
|
23768
23863
|
name: 'Table',
|
23769
23864
|
props: tableProps,
|
@@ -23774,6 +23869,7 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23774
23869
|
var pagination = use_pagination(props);
|
23775
23870
|
var _useLayout = use_layout(props, ctx),
|
23776
23871
|
renderContainer = _useLayout.renderContainer,
|
23872
|
+
renderFixedBottom = _useLayout.renderFixedBottom,
|
23777
23873
|
renderBody = _useLayout.renderBody,
|
23778
23874
|
renderHeader = _useLayout.renderHeader,
|
23779
23875
|
renderFooter = _useLayout.renderFooter,
|
@@ -23790,7 +23886,8 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23790
23886
|
*/
|
23791
23887
|
var afterSetting = function afterSetting(fields) {
|
23792
23888
|
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
|
23793
|
-
|
23889
|
+
var _refBody$value;
|
23890
|
+
(_refBody$value = refBody.value) === null || _refBody$value === void 0 || _refBody$value.scrollTo(0, 0);
|
23794
23891
|
}
|
23795
23892
|
};
|
23796
23893
|
var settings = use_settings(props, ctx, columns, afterSetting);
|
@@ -23812,14 +23909,14 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23812
23909
|
resolveColumns = _useColumnTemplate.resolveColumns;
|
23813
23910
|
var instance = (0,external_vue_namespaceObject.getCurrentInstance)();
|
23814
23911
|
var initTableColumns = function initTableColumns() {
|
23815
|
-
|
23912
|
+
var _instance$subTree$chi, _instance$subTree;
|
23913
|
+
var children = (_instance$subTree$chi = (_instance$subTree = instance.subTree) === null || _instance$subTree === void 0 ? void 0 : _instance$subTree.children) !== null && _instance$subTree$chi !== void 0 ? _instance$subTree$chi : [];
|
23914
|
+
columns.debounceUpdateColumns(resolveColumns(children));
|
23816
23915
|
};
|
23817
23916
|
(0,external_vue_namespaceObject.provide)(PROVIDE_KEY_INIT_COL, initTableColumns);
|
23818
23917
|
var _useFixedColumn = use_fixed_column(props, columns),
|
23819
23918
|
renderFixedRows = _useFixedColumn.renderFixedRows,
|
23820
23919
|
resolveFixedColumnStyle = _useFixedColumn.resolveFixedColumnStyle;
|
23821
|
-
var _useScrollLoading = use_scroll_loading(props, ctx),
|
23822
|
-
renderScrollLoading = _useScrollLoading.renderScrollLoading;
|
23823
23920
|
/**
|
23824
23921
|
* Column配置改变或者容器Resize之后,根据Columns配置
|
23825
23922
|
* 计算每一列的实际宽度
|
@@ -23891,6 +23988,7 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23891
23988
|
});
|
23892
23989
|
};
|
23893
23990
|
use_observer_resize(refRoot, function () {
|
23991
|
+
var _refBody$value2;
|
23894
23992
|
if ((props.height === '100%' || props.virtualEnabled) && (0,lodash.isElement)(refRoot.value)) {
|
23895
23993
|
if (isResizeBodyHeight.value) {
|
23896
23994
|
setTimeout(function () {
|
@@ -23905,6 +24003,8 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23905
24003
|
setOffsetRight();
|
23906
24004
|
}
|
23907
24005
|
computedColumnRect();
|
24006
|
+
(_refBody$value2 = refBody.value) === null || _refBody$value2 === void 0 || _refBody$value2.scrollTo(0, 0);
|
24007
|
+
setOffsetRight();
|
23908
24008
|
});
|
23909
24009
|
(0,external_vue_namespaceObject.watch)(function () {
|
23910
24010
|
return [dragOffsetX.value];
|
@@ -23940,7 +24040,9 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23940
24040
|
(0,external_vue_namespaceObject.watch)(function () {
|
23941
24041
|
return [pagination.options.count, pagination.options.limit, pagination.options.current, props.data];
|
23942
24042
|
}, function () {
|
24043
|
+
var _refBody$value3;
|
23943
24044
|
setTableData();
|
24045
|
+
(_refBody$value3 = refBody.value) === null || _refBody$value3 === void 0 || _refBody$value3.scrollTo(0, 0);
|
23944
24046
|
}, {
|
23945
24047
|
immediate: true
|
23946
24048
|
});
|
@@ -23958,7 +24060,7 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23958
24060
|
}
|
23959
24061
|
});
|
23960
24062
|
return function () {
|
23961
|
-
return renderContainer([renderHeader(renderColumns, settings.renderSettings), renderBody(rows.pageRowList, renderTBody, renderFixedRows,
|
24063
|
+
return renderContainer([renderHeader(renderColumns, settings.renderSettings, renderFixedRows), renderBody(rows.pageRowList, renderTBody, renderFixedRows), renderFixedBottom(), renderFooter(renderTFoot())]);
|
23962
24064
|
};
|
23963
24065
|
}
|
23964
24066
|
}));
|