bkui-vue 2.0.1-beta.15.table.10 → 2.0.1-beta.15.table.12
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 +49 -49
- package/dist/index.esm.js +7966 -7941
- package/dist/index.umd.js +48 -48
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/cascader/index.js +1 -0
- package/lib/checkbox/checkbox.d.ts +7 -7
- package/lib/checkbox/index.d.ts +11 -11
- package/lib/checkbox/index.js +9 -1
- package/lib/date-picker/date-picker.d.ts +0 -1
- package/lib/date-picker/index.d.ts +0 -3
- package/lib/date-picker/index.js +34 -13
- package/lib/dialog/dialog.d.ts +7 -2
- package/lib/dialog/index.d.ts +15 -4
- package/lib/dialog/props.d.ts +3 -1
- package/lib/index.js +1 -1
- package/lib/modal/index.d.ts +18 -5
- package/lib/modal/index.js +7 -1
- package/lib/modal/modal.d.ts +7 -2
- package/lib/modal/props.mixin.d.ts +3 -1
- package/lib/radio/index.d.ts +21 -21
- package/lib/radio/index.js +18 -7
- package/lib/radio/radio-button.d.ts +7 -7
- package/lib/radio/radio-group.d.ts +7 -7
- package/lib/radio/radio.d.ts +7 -7
- package/lib/select/common.d.ts +4 -4
- package/lib/select/index.d.ts +27 -9
- package/lib/select/index.js +99 -80
- package/lib/select/select.css +3 -4
- package/lib/select/select.d.ts +11 -3
- package/lib/select/select.less +3 -4
- package/lib/select/select.variable.css +3 -4
- package/lib/sideslider/index.d.ts +15 -4
- package/lib/sideslider/sideslider.d.ts +7 -2
- package/lib/table/components/ghost-body.d.ts +2 -0
- package/lib/table/components/table-column.d.ts +3 -45
- package/lib/table/hooks/use-column-template.d.ts +0 -1
- package/lib/table/hooks/use-settings.d.ts +1 -0
- package/lib/table/index.d.ts +7 -60
- package/lib/table/index.js +107 -50
- package/lib/table/props.d.ts +1 -3
- package/lib/table/table.css +5 -6
- package/lib/table/table.d.ts +2 -7
- package/lib/table/table.less +6 -9
- package/lib/table/table.variable.css +5 -6
- package/lib/table-column/index.d.ts +9 -135
- package/lib/table-column/index.js +17282 -20
- package/lib/virtual-render/index.js +2 -3
- package/package.json +1 -1
@@ -79,51 +79,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
79
|
} & {
|
80
80
|
default: number;
|
81
81
|
};
|
82
|
-
}, {
|
83
|
-
|
84
|
-
|
85
|
-
resizable?: boolean;
|
86
|
-
minWidth?: string | number;
|
87
|
-
index?: number;
|
88
|
-
columnKey?: string;
|
89
|
-
colspan?: import("../props").SpanFunctionString;
|
90
|
-
rowspan?: import("../props").SpanFunctionString;
|
91
|
-
render?: import("../props").RenderFunctionString;
|
92
|
-
sort?: string | boolean | {
|
93
|
-
sortFn?: Function;
|
94
|
-
sortScope?: import("../props").SortScope;
|
95
|
-
value?: import("../const").SORT_OPTION;
|
96
|
-
};
|
97
|
-
filter?: string | boolean | {
|
98
|
-
list: any[];
|
99
|
-
filterFn?: Function;
|
100
|
-
match?: import("../props").FullEnum;
|
101
|
-
checked?: any[];
|
102
|
-
filterScope?: import("../props").SortScope;
|
103
|
-
btnSave?: string | boolean;
|
104
|
-
btnReset?: string | boolean;
|
105
|
-
height?: number;
|
106
|
-
maxHeight?: number;
|
107
|
-
};
|
108
|
-
type?: "index" | "expand" | "__COL_TYPE_NONE" | "selection";
|
109
|
-
label?: import("../props").LabelFunctionString;
|
110
|
-
width?: string | number;
|
111
|
-
className?: import("../props").RowClassFunctionString;
|
112
|
-
align?: "" | "left" | "right" | "center";
|
113
|
-
showOverflowTooltip?: boolean | {
|
114
|
-
content: string | ((col: import("../props").Column, row: any) => string);
|
115
|
-
disabled?: boolean | ((col: import("../props").Column, row: any) => boolean);
|
116
|
-
allowHtml?: boolean;
|
117
|
-
watchCellResize?: boolean;
|
118
|
-
mode?: "auto" | "static";
|
119
|
-
popoverOption?: any;
|
120
|
-
resizerWay?: import("../props").ResizerWay;
|
121
|
-
showHead?: boolean;
|
122
|
-
};
|
123
|
-
field: import("../props").LabelFunctionString;
|
124
|
-
prop?: import("../props").LabelFunctionString;
|
125
|
-
};
|
126
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
82
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
83
|
+
[key: string]: any;
|
84
|
+
}>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
127
85
|
label: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
|
128
86
|
field: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
|
129
87
|
render: import("vue-types").VueTypeDef<import("../props").RenderFunctionString>;
|
@@ -3,6 +3,7 @@ import { TablePropTypes } from '../props';
|
|
3
3
|
import { UseColumns } from './use-columns';
|
4
4
|
declare const useSettings: (props: TablePropTypes, ctx: SetupContext, columns: UseColumns, afterSetting: any) => {
|
5
5
|
options: {
|
6
|
+
enabled: boolean;
|
6
7
|
fields: any[];
|
7
8
|
checked: any[];
|
8
9
|
limit: number;
|
package/lib/table/index.d.ts
CHANGED
@@ -29,9 +29,7 @@ declare const BkTable: {
|
|
29
29
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
30
30
|
default: string | number;
|
31
31
|
};
|
32
|
-
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber
|
33
|
-
default: import("./props").RowHeightFunctionNumber;
|
34
|
-
};
|
32
|
+
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber>;
|
35
33
|
headHeight: import("vue-types").VueTypeValidableDef<number> & {
|
36
34
|
default: number;
|
37
35
|
} & {
|
@@ -200,9 +198,7 @@ declare const BkTable: {
|
|
200
198
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
201
199
|
default: string | number;
|
202
200
|
};
|
203
|
-
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber
|
204
|
-
default: import("./props").RowHeightFunctionNumber;
|
205
|
-
};
|
201
|
+
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber>;
|
206
202
|
headHeight: import("vue-types").VueTypeValidableDef<number> & {
|
207
203
|
default: number;
|
208
204
|
} & {
|
@@ -368,7 +364,6 @@ declare const BkTable: {
|
|
368
364
|
columnPick: "disabled" | "single" | "multi";
|
369
365
|
columns: import("./props").Column[];
|
370
366
|
stripe: boolean;
|
371
|
-
rowHeight: import("./props").RowHeightFunctionNumber;
|
372
367
|
showHead: boolean;
|
373
368
|
sortValFormat: any[];
|
374
369
|
virtualEnabled: boolean;
|
@@ -424,9 +419,7 @@ declare const BkTable: {
|
|
424
419
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
425
420
|
default: string | number;
|
426
421
|
};
|
427
|
-
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber
|
428
|
-
default: import("./props").RowHeightFunctionNumber;
|
429
|
-
};
|
422
|
+
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber>;
|
430
423
|
headHeight: import("vue-types").VueTypeValidableDef<number> & {
|
431
424
|
default: number;
|
432
425
|
} & {
|
@@ -592,7 +585,6 @@ declare const BkTable: {
|
|
592
585
|
columnPick: "disabled" | "single" | "multi";
|
593
586
|
columns: import("./props").Column[];
|
594
587
|
stripe: boolean;
|
595
|
-
rowHeight: import("./props").RowHeightFunctionNumber;
|
596
588
|
showHead: boolean;
|
597
589
|
sortValFormat: any[];
|
598
590
|
virtualEnabled: boolean;
|
@@ -645,9 +637,7 @@ declare const BkTable: {
|
|
645
637
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
646
638
|
default: string | number;
|
647
639
|
};
|
648
|
-
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber
|
649
|
-
default: import("./props").RowHeightFunctionNumber;
|
650
|
-
};
|
640
|
+
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber>;
|
651
641
|
headHeight: import("vue-types").VueTypeValidableDef<number> & {
|
652
642
|
default: number;
|
653
643
|
} & {
|
@@ -813,7 +803,6 @@ declare const BkTable: {
|
|
813
803
|
columnPick: "disabled" | "single" | "multi";
|
814
804
|
columns: import("./props").Column[];
|
815
805
|
stripe: boolean;
|
816
|
-
rowHeight: import("./props").RowHeightFunctionNumber;
|
817
806
|
showHead: boolean;
|
818
807
|
sortValFormat: any[];
|
819
808
|
virtualEnabled: boolean;
|
@@ -877,51 +866,9 @@ declare const BkTable: {
|
|
877
866
|
} & {
|
878
867
|
default: number;
|
879
868
|
};
|
880
|
-
}, {
|
881
|
-
|
882
|
-
|
883
|
-
resizable?: boolean;
|
884
|
-
minWidth?: string | number;
|
885
|
-
index?: number;
|
886
|
-
columnKey?: string;
|
887
|
-
colspan?: import("./props").SpanFunctionString;
|
888
|
-
rowspan?: import("./props").SpanFunctionString;
|
889
|
-
render?: import("./props").RenderFunctionString;
|
890
|
-
sort?: string | boolean | {
|
891
|
-
sortFn?: Function;
|
892
|
-
sortScope?: import("./props").SortScope;
|
893
|
-
value?: import("./const").SORT_OPTION;
|
894
|
-
};
|
895
|
-
filter?: string | boolean | {
|
896
|
-
list: any[];
|
897
|
-
filterFn?: Function;
|
898
|
-
match?: import("./props").FullEnum;
|
899
|
-
checked?: any[];
|
900
|
-
filterScope?: import("./props").SortScope;
|
901
|
-
btnSave?: string | boolean;
|
902
|
-
btnReset?: string | boolean;
|
903
|
-
height?: number;
|
904
|
-
maxHeight?: number;
|
905
|
-
};
|
906
|
-
type?: "index" | "expand" | "__COL_TYPE_NONE" | "selection";
|
907
|
-
label?: import("./props").LabelFunctionString;
|
908
|
-
width?: string | number;
|
909
|
-
className?: import("./props").RowClassFunctionString;
|
910
|
-
align?: "" | "left" | "right" | "center";
|
911
|
-
showOverflowTooltip?: boolean | {
|
912
|
-
content: string | ((col: import("./props").Column, row: any) => string);
|
913
|
-
disabled?: boolean | ((col: import("./props").Column, row: any) => boolean);
|
914
|
-
allowHtml?: boolean;
|
915
|
-
watchCellResize?: boolean;
|
916
|
-
mode?: "auto" | "static";
|
917
|
-
popoverOption?: any;
|
918
|
-
resizerWay?: import("./props").ResizerWay;
|
919
|
-
showHead?: boolean;
|
920
|
-
};
|
921
|
-
field: import("./props").LabelFunctionString;
|
922
|
-
prop?: import("./props").LabelFunctionString;
|
923
|
-
};
|
924
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
869
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
870
|
+
[key: string]: any;
|
871
|
+
}>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
925
872
|
label: import("vue-types").VueTypeDef<import("./props").LabelFunctionString>;
|
926
873
|
field: import("vue-types").VueTypeDef<import("./props").LabelFunctionString>;
|
927
874
|
render: import("vue-types").VueTypeDef<import("./props").RenderFunctionString>;
|
package/lib/table/index.js
CHANGED
@@ -17694,7 +17694,7 @@ var tableProps = {
|
|
17694
17694
|
* 设置表格最小高度
|
17695
17695
|
* 默认:LINE_HEIGHT * 4
|
17696
17696
|
*/
|
17697
|
-
minHeight: StringNumberType(LINE_HEIGHT *
|
17697
|
+
minHeight: StringNumberType(LINE_HEIGHT * 3),
|
17698
17698
|
/**
|
17699
17699
|
* 设置表格最d大高度
|
17700
17700
|
* 默认:auto,依赖外层高度
|
@@ -17704,7 +17704,7 @@ var tableProps = {
|
|
17704
17704
|
* 行高,可以为固定数值类型
|
17705
17705
|
* 可以是函数,返回当前行的高度,返回值为数值类型
|
17706
17706
|
*/
|
17707
|
-
rowHeight: RowHeightFunctionNumberType
|
17707
|
+
rowHeight: RowHeightFunctionNumberType,
|
17708
17708
|
/**
|
17709
17709
|
* Thead行高,可以为固定数值类型
|
17710
17710
|
*/
|
@@ -17913,8 +17913,9 @@ var tableProps = {
|
|
17913
17913
|
}
|
17914
17914
|
}).def(null)
|
17915
17915
|
};
|
17916
|
+
// EXTERNAL MODULE: ../../node_modules/lodash/lodash.js
|
17917
|
+
var lodash = __webpack_require__(6635);
|
17916
17918
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
17917
|
-
|
17918
17919
|
/*
|
17919
17920
|
* Tencent is pleased to support the open source community by making
|
17920
17921
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -17944,6 +17945,7 @@ var tableProps = {
|
|
17944
17945
|
|
17945
17946
|
|
17946
17947
|
|
17948
|
+
|
17947
17949
|
var TableColumnProp = {
|
17948
17950
|
label: LabelFunctionStringType,
|
17949
17951
|
field: LabelFunctionStringType,
|
@@ -17967,15 +17969,16 @@ var TableColumnProp = {
|
|
17967
17969
|
/* harmony default export */ const table_column = ((0,external_vue_namespaceObject.defineComponent)({
|
17968
17970
|
name: 'TableColumn',
|
17969
17971
|
props: TableColumnProp,
|
17970
|
-
setup: function setup(props) {
|
17972
|
+
setup: function setup(props, _ref) {
|
17973
|
+
var slots = _ref.slots;
|
17971
17974
|
var initTableColumns = (0,external_vue_namespaceObject.inject)(PROVIDE_KEY_INIT_COL, function () {});
|
17972
|
-
var column = (0,external_vue_namespaceObject.reactive)(Object.assign({}, props, {
|
17973
|
-
field: props.prop || props.field
|
17974
|
-
}));
|
17975
17975
|
(0,external_vue_namespaceObject.watch)(function () {
|
17976
17976
|
return [props];
|
17977
|
-
}, function () {
|
17978
|
-
|
17977
|
+
}, function (oldVal, newVal) {
|
17978
|
+
var _newVal$;
|
17979
|
+
if (!(0,lodash.isEqual)((0,external_vue_namespaceObject.toRaw)(oldVal === null || oldVal === void 0 ? void 0 : oldVal[0]), (0,external_vue_namespaceObject.toRaw)((_newVal$ = newVal === null || newVal === void 0 ? void 0 : newVal[0]) !== null && _newVal$ !== void 0 ? _newVal$ : {}))) {
|
17980
|
+
initTableColumns();
|
17981
|
+
}
|
17979
17982
|
}, {
|
17980
17983
|
immediate: true,
|
17981
17984
|
deep: true
|
@@ -17983,19 +17986,14 @@ var TableColumnProp = {
|
|
17983
17986
|
(0,external_vue_namespaceObject.onUnmounted)(function () {
|
17984
17987
|
initTableColumns();
|
17985
17988
|
});
|
17986
|
-
return {
|
17987
|
-
|
17989
|
+
return function () {
|
17990
|
+
var _slots$default;
|
17991
|
+
return (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots, {
|
17992
|
+
row: {}
|
17993
|
+
});
|
17988
17994
|
};
|
17989
|
-
},
|
17990
|
-
render: function render() {
|
17991
|
-
var _this$$slots$default, _this$$slots;
|
17992
|
-
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, {
|
17993
|
-
row: {}
|
17994
|
-
})]);
|
17995
17995
|
}
|
17996
17996
|
}));
|
17997
|
-
// EXTERNAL MODULE: ../../node_modules/lodash/lodash.js
|
17998
|
-
var lodash = __webpack_require__(6635);
|
17999
17997
|
;// CONCATENATED MODULE: ../../packages/table/src/events.ts
|
18000
17998
|
|
18001
17999
|
var _EMIT_EVENT_TYPES;
|
@@ -18409,12 +18407,18 @@ function v4(options, buf, offset) {
|
|
18409
18407
|
var columns = [];
|
18410
18408
|
var columnIndex = 0;
|
18411
18409
|
var columnCache = new WeakMap();
|
18410
|
+
var getPropRawData = function getPropRawData(prop) {
|
18411
|
+
if ((0,external_vue_namespaceObject.isRef)(prop)) {
|
18412
|
+
return (0,external_vue_namespaceObject.unref)(prop);
|
18413
|
+
}
|
18414
|
+
return (0,external_vue_namespaceObject.toRaw)(prop);
|
18415
|
+
};
|
18412
18416
|
var copyProps = function copyProps(props) {
|
18413
18417
|
return Object.keys(props !== null && props !== void 0 ? props : {}).reduce(function (result, key) {
|
18414
18418
|
var target = key.replace(/-(\w)/g, function (_, letter) {
|
18415
18419
|
return letter.toUpperCase();
|
18416
18420
|
});
|
18417
|
-
return Object.assign(result, defineProperty_defineProperty({}, target, props[key]));
|
18421
|
+
return Object.assign(result, defineProperty_defineProperty({}, target, getPropRawData(props[key])));
|
18418
18422
|
}, {});
|
18419
18423
|
};
|
18420
18424
|
var getNodeCtxUid = function getNodeCtxUid(ctx) {
|
@@ -18445,6 +18449,9 @@ function v4(options, buf, offset) {
|
|
18445
18449
|
}
|
18446
18450
|
return;
|
18447
18451
|
}
|
18452
|
+
if (Array.isArray(node)) {
|
18453
|
+
node.forEach(resolveChildNode);
|
18454
|
+
}
|
18448
18455
|
if (Array.isArray(node === null || node === void 0 ? void 0 : node.children)) {
|
18449
18456
|
node.children.forEach(resolveChildNode);
|
18450
18457
|
}
|
@@ -18458,26 +18465,24 @@ function v4(options, buf, offset) {
|
|
18458
18465
|
}
|
18459
18466
|
return;
|
18460
18467
|
};
|
18461
|
-
var setNodeInstanceId = function setNodeInstanceId(column, uniqueId) {
|
18462
|
-
if (!columnCache.has(column)) {
|
18463
|
-
columnCache.set(columnCache, {
|
18464
|
-
uniqueId: uniqueId,
|
18465
|
-
column: column
|
18466
|
-
});
|
18467
|
-
}
|
18468
|
-
};
|
18469
18468
|
var resolveColumns = function resolveColumns(children) {
|
18470
18469
|
columns.length = 0;
|
18471
18470
|
columnIndex = 0;
|
18472
|
-
children.
|
18471
|
+
var GhostBody = children.find(function (node) {
|
18472
|
+
var _node$type3;
|
18473
|
+
return ((_node$type3 = node.type) === null || _node$type3 === void 0 ? void 0 : _node$type3.name) === 'GhostBody';
|
18474
|
+
});
|
18475
|
+
if (GhostBody) {
|
18476
|
+
var _GhostBody$children$d, _GhostBody$children, _GhostBody$children$d2;
|
18477
|
+
((_GhostBody$children$d = (_GhostBody$children = GhostBody.children) === null || _GhostBody$children === void 0 || (_GhostBody$children$d2 = _GhostBody$children["default"]) === null || _GhostBody$children$d2 === void 0 ? void 0 : _GhostBody$children$d2.call(_GhostBody$children)) !== null && _GhostBody$children$d !== void 0 ? _GhostBody$children$d : []).forEach(resolveChildNode);
|
18478
|
+
}
|
18473
18479
|
columns.sort(function (col1, col2) {
|
18474
18480
|
return col1.index - col2.index;
|
18475
18481
|
});
|
18476
18482
|
return columns;
|
18477
18483
|
};
|
18478
18484
|
return {
|
18479
|
-
resolveColumns: resolveColumns
|
18480
|
-
setNodeInstanceId: setNodeInstanceId
|
18485
|
+
resolveColumns: resolveColumns
|
18481
18486
|
};
|
18482
18487
|
});
|
18483
18488
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
@@ -20243,6 +20248,7 @@ var useColumns = function useColumns(props) {
|
|
20243
20248
|
* @param columns
|
20244
20249
|
*/
|
20245
20250
|
var formatColumns = function formatColumns() {
|
20251
|
+
sortColumns.length = 0;
|
20246
20252
|
resolveDraggableColumn();
|
20247
20253
|
var skipColNum = 0;
|
20248
20254
|
(tableColumnList || []).forEach(function (col, index) {
|
@@ -20866,6 +20872,51 @@ const loading_less_namespaceObject = loading_less_x({ });
|
|
20866
20872
|
renderScrollLoading: renderScrollLoading
|
20867
20873
|
};
|
20868
20874
|
});
|
20875
|
+
;// CONCATENATED MODULE: ../../packages/table/src/components/ghost-body.tsx
|
20876
|
+
|
20877
|
+
/*
|
20878
|
+
* Tencent is pleased to support the open source community by making
|
20879
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
20880
|
+
*
|
20881
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
20882
|
+
*
|
20883
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
20884
|
+
*
|
20885
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
20886
|
+
*
|
20887
|
+
* ---------------------------------------------------
|
20888
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
20889
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
20890
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
20891
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
20892
|
+
*
|
20893
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
20894
|
+
* the Software.
|
20895
|
+
*
|
20896
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
20897
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20898
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
20899
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
20900
|
+
* IN THE SOFTWARE.
|
20901
|
+
*/
|
20902
|
+
|
20903
|
+
/* harmony default export */ const ghost_body = ((0,external_vue_namespaceObject.defineComponent)({
|
20904
|
+
name: 'GhostBody',
|
20905
|
+
setup: function setup(_, ctx) {
|
20906
|
+
var columnGhostStyle = {
|
20907
|
+
zIndex: -1,
|
20908
|
+
width: 0,
|
20909
|
+
height: 0,
|
20910
|
+
display: 'none'
|
20911
|
+
};
|
20912
|
+
return function () {
|
20913
|
+
var _ctx$slots$default, _ctx$slots;
|
20914
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
20915
|
+
"style": columnGhostStyle
|
20916
|
+
}, [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)]);
|
20917
|
+
};
|
20918
|
+
}
|
20919
|
+
}));
|
20869
20920
|
;// CONCATENATED MODULE: ../../packages/table/src/hooks/use-layout.tsx
|
20870
20921
|
|
20871
20922
|
|
@@ -20907,6 +20958,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
20907
20958
|
|
20908
20959
|
|
20909
20960
|
|
20961
|
+
|
20910
20962
|
/* harmony default export */ const use_layout = (function (props, ctx) {
|
20911
20963
|
var _props$rowHeight;
|
20912
20964
|
var refRoot = (0,external_vue_namespaceObject.ref)(null);
|
@@ -20991,23 +21043,19 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
20991
21043
|
});
|
20992
21044
|
var bodyClass = defineProperty_defineProperty({}, resolveClassName('table-body'), true);
|
20993
21045
|
var footerClass = (0,external_vue_namespaceObject.computed)(function () {
|
20994
|
-
return (0,shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-footer'), true), 'is-hidden',
|
21046
|
+
return (0,shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-footer'), true), 'is-hidden', footHeight.value === 0));
|
20995
21047
|
});
|
20996
|
-
var columnGhostStyle = {
|
20997
|
-
zIndex: -1,
|
20998
|
-
width: 0,
|
20999
|
-
height: 0,
|
21000
|
-
display: 'none'
|
21001
|
-
};
|
21002
21048
|
var renderContainer = function renderContainer(childrend) {
|
21003
21049
|
var _ctx$slots$default, _ctx$slots;
|
21004
21050
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
21005
21051
|
"ref": refRoot,
|
21006
21052
|
"style": tableStyle.value,
|
21007
21053
|
"class": tableClass.value
|
21008
|
-
}, [childrend, (0,external_vue_namespaceObject.createVNode)(
|
21009
|
-
"
|
21010
|
-
|
21054
|
+
}, [childrend, (0,external_vue_namespaceObject.createVNode)(ghost_body, null, {
|
21055
|
+
"default": function _default() {
|
21056
|
+
return [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)];
|
21057
|
+
}
|
21058
|
+
})]);
|
21011
21059
|
};
|
21012
21060
|
var renderHeader = function renderHeader(childrend, settings, fixedRows) {
|
21013
21061
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
@@ -21101,6 +21149,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
21101
21149
|
'offset-x': true,
|
21102
21150
|
'resize-column': true
|
21103
21151
|
};
|
21152
|
+
var scrollContentClass = resolveClassName('table-content');
|
21104
21153
|
var fixedWrapperClass = resolveClassName('table-fixed');
|
21105
21154
|
var fixedBottomRow = resolveClassName('table-fixed-bottom');
|
21106
21155
|
var fixedBottomLoadingStyle = (0,external_vue_namespaceObject.computed)(function () {
|
@@ -21130,6 +21179,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
21130
21179
|
"ref": refBody,
|
21131
21180
|
"height": bodyHeight.value,
|
21132
21181
|
"class": bodyClass,
|
21182
|
+
"contentClassName": scrollContentClass,
|
21133
21183
|
"enabled": props.virtualEnabled,
|
21134
21184
|
"lineHeight": lineHeight.value,
|
21135
21185
|
"list": list,
|
@@ -21342,10 +21392,7 @@ var usePagination = function usePagination(props) {
|
|
21342
21392
|
* 判定条件:启用了分页组件 & 分页总数 > 1
|
21343
21393
|
*/
|
21344
21394
|
var isShowPagination = (0,external_vue_namespaceObject.computed)(function () {
|
21345
|
-
|
21346
|
-
return pagination.count > pagination.limit;
|
21347
|
-
}
|
21348
|
-
return false;
|
21395
|
+
return pagination.enabled;
|
21349
21396
|
});
|
21350
21397
|
return {
|
21351
21398
|
options: pagination,
|
@@ -22898,13 +22945,17 @@ function use_render_isSlot(s) {
|
|
22898
22945
|
})]);
|
22899
22946
|
};
|
22900
22947
|
var getRowHeight = function getRowHeight(row, rowIndex) {
|
22948
|
+
if (typeof props.rowHeight === 'function' || /^\d+/.test("".concat(props.rowHeight))) {
|
22949
|
+
return resolvePropVal(props, 'rowHeight', ['tbody', row, rowIndex]);
|
22950
|
+
}
|
22901
22951
|
var _settings$options = settings.options,
|
22902
22952
|
size = _settings$options.size,
|
22903
|
-
height = _settings$options.height
|
22904
|
-
|
22953
|
+
height = _settings$options.height,
|
22954
|
+
enabled = _settings$options.enabled;
|
22955
|
+
if (enabled && height !== null && height !== undefined) {
|
22905
22956
|
return resolvePropVal(settings.options, 'height', ['tbody', row, rowIndex, size]);
|
22906
22957
|
}
|
22907
|
-
return
|
22958
|
+
return LINE_HEIGHT;
|
22908
22959
|
};
|
22909
22960
|
var setDragEvents = function setDragEvents(events) {
|
22910
22961
|
dragEvents = events;
|
@@ -23144,7 +23195,7 @@ function use_render_isSlot(s) {
|
|
23144
23195
|
ctx.emit(EMIT_EVENTS.PAGE_LIMIT_CHANGE, limit);
|
23145
23196
|
};
|
23146
23197
|
var handlePageChange = function handlePageChange(current) {
|
23147
|
-
if (typeof_typeof(props.pagination) === 'object' && current !==
|
23198
|
+
if (typeof_typeof(props.pagination) === 'object' && current !== pagination.options.current) {
|
23148
23199
|
pagination.setPagination({
|
23149
23200
|
current: current,
|
23150
23201
|
value: current
|
@@ -23531,6 +23582,7 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23531
23582
|
};
|
23532
23583
|
var getDefaultSettings = function getDefaultSettings() {
|
23533
23584
|
return {
|
23585
|
+
enabled: true,
|
23534
23586
|
fields: props.columns.map(function (col) {
|
23535
23587
|
return Object.assign({}, col, {
|
23536
23588
|
field: col.field || col.type
|
@@ -23547,9 +23599,14 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
|
|
23547
23599
|
};
|
23548
23600
|
};
|
23549
23601
|
var getSettings = function getSettings(settings) {
|
23550
|
-
if (typeof settings === 'boolean') {
|
23602
|
+
if (typeof settings === 'boolean' && settings !== false) {
|
23551
23603
|
return getDefaultSettings();
|
23552
23604
|
}
|
23605
|
+
if (!settings) {
|
23606
|
+
return {
|
23607
|
+
enabled: false
|
23608
|
+
};
|
23609
|
+
}
|
23553
23610
|
return Object.assign({}, getDefaultSettings(), settings);
|
23554
23611
|
};
|
23555
23612
|
var refSetting = (0,external_vue_namespaceObject.ref)(null);
|
package/lib/table/props.d.ts
CHANGED
@@ -294,9 +294,7 @@ export declare const tableProps: {
|
|
294
294
|
* 行高,可以为固定数值类型
|
295
295
|
* 可以是函数,返回当前行的高度,返回值为数值类型
|
296
296
|
*/
|
297
|
-
rowHeight: import("vue-types").VueTypeDef<RowHeightFunctionNumber
|
298
|
-
default: RowHeightFunctionNumber;
|
299
|
-
};
|
297
|
+
rowHeight: import("vue-types").VueTypeDef<RowHeightFunctionNumber>;
|
300
298
|
/**
|
301
299
|
* Thead行高,可以为固定数值类型
|
302
300
|
*/
|
package/lib/table/table.css
CHANGED
@@ -1328,6 +1328,9 @@
|
|
1328
1328
|
.bk-table .bk-table-body table td .cell.selection {
|
1329
1329
|
padding: 0;
|
1330
1330
|
text-align: center;
|
1331
|
+
display: flex;
|
1332
|
+
align-items: center;
|
1333
|
+
justify-content: center;
|
1331
1334
|
}
|
1332
1335
|
.bk-table .bk-table-head table th .cell.expand-cell,
|
1333
1336
|
.bk-table .bk-table-body table th .cell.expand-cell,
|
@@ -1445,7 +1448,7 @@
|
|
1445
1448
|
.bk-table .bk-table-body table tbody tr td .cell {
|
1446
1449
|
display: block;
|
1447
1450
|
width: 100%;
|
1448
|
-
line-height: calc(var(--row-height) -
|
1451
|
+
line-height: calc(var(--row-height) - 4px);
|
1449
1452
|
box-sizing: border-box;
|
1450
1453
|
}
|
1451
1454
|
.bk-table .bk-table-head table tbody tr td .cell.drag,
|
@@ -1467,6 +1470,7 @@
|
|
1467
1470
|
z-index: 2;
|
1468
1471
|
overflow: hidden;
|
1469
1472
|
background-color: var(--background-color);
|
1473
|
+
height: var(--row-height);
|
1470
1474
|
}
|
1471
1475
|
.bk-table .bk-table-head .col-resize-drag {
|
1472
1476
|
position: absolute;
|
@@ -1529,13 +1533,8 @@
|
|
1529
1533
|
border-right: 1px solid var(--table-border-color);
|
1530
1534
|
border-left: 1px solid var(--table-border-color);
|
1531
1535
|
}
|
1532
|
-
.bk-table.bordered-outer .bk-table-footer {
|
1533
|
-
border-bottom: 1px solid var(--table-border-color);
|
1534
|
-
}
|
1535
1536
|
.bk-table.bordered-horizontal {
|
1536
1537
|
border-top: 1px solid var(--table-border-color);
|
1537
|
-
}
|
1538
|
-
.bk-table.bordered-horizontal .bk-table-footer {
|
1539
1538
|
border-bottom: 1px solid var(--table-border-color);
|
1540
1539
|
}
|
1541
1540
|
.bk-table.bordered-outer .__is-empty .bk-table-body-content,
|
package/lib/table/table.d.ts
CHANGED
@@ -23,9 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
23
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
24
24
|
default: string | number;
|
25
25
|
};
|
26
|
-
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber
|
27
|
-
default: import("./props").RowHeightFunctionNumber;
|
28
|
-
};
|
26
|
+
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber>;
|
29
27
|
headHeight: import("vue-types").VueTypeValidableDef<number> & {
|
30
28
|
default: number;
|
31
29
|
} & {
|
@@ -194,9 +192,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
194
192
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
195
193
|
default: string | number;
|
196
194
|
};
|
197
|
-
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber
|
198
|
-
default: import("./props").RowHeightFunctionNumber;
|
199
|
-
};
|
195
|
+
rowHeight: import("vue-types").VueTypeDef<import("./props").RowHeightFunctionNumber>;
|
200
196
|
headHeight: import("vue-types").VueTypeValidableDef<number> & {
|
201
197
|
default: number;
|
202
198
|
} & {
|
@@ -362,7 +358,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
362
358
|
columnPick: "disabled" | "single" | "multi";
|
363
359
|
columns: import("./props").Column[];
|
364
360
|
stripe: boolean;
|
365
|
-
rowHeight: import("./props").RowHeightFunctionNumber;
|
366
361
|
showHead: boolean;
|
367
362
|
sortValFormat: any[];
|
368
363
|
virtualEnabled: boolean;
|
package/lib/table/table.less
CHANGED
@@ -137,6 +137,9 @@
|
|
137
137
|
&.selection {
|
138
138
|
padding: 0;
|
139
139
|
text-align: center;
|
140
|
+
display: flex;
|
141
|
+
align-items: center;
|
142
|
+
justify-content: center;
|
140
143
|
}
|
141
144
|
|
142
145
|
&.expand-cell {
|
@@ -253,7 +256,7 @@
|
|
253
256
|
.cell {
|
254
257
|
display: block;
|
255
258
|
width: 100%;
|
256
|
-
line-height: calc(var(--row-height) -
|
259
|
+
line-height: calc(var(--row-height) - 4px);
|
257
260
|
box-sizing: border-box;
|
258
261
|
|
259
262
|
&.drag {
|
@@ -289,6 +292,7 @@
|
|
289
292
|
z-index: 2;
|
290
293
|
overflow: hidden;
|
291
294
|
background-color: var(--background-color);
|
295
|
+
height: var(--row-height);
|
292
296
|
|
293
297
|
.col-resize-drag {
|
294
298
|
position: absolute;
|
@@ -369,18 +373,11 @@
|
|
369
373
|
border-top: 1px solid @table-border-color;
|
370
374
|
border-right: 1px solid @table-border-color;
|
371
375
|
border-left: 1px solid @table-border-color;
|
372
|
-
|
373
|
-
.@{bk-prefix}-table-footer {
|
374
|
-
border-bottom: 1px solid @table-border-color;
|
375
|
-
}
|
376
376
|
}
|
377
377
|
|
378
378
|
&.bordered-horizontal {
|
379
379
|
border-top: 1px solid @table-border-color;
|
380
|
-
|
381
|
-
.@{bk-prefix}-table-footer {
|
382
|
-
border-bottom: 1px solid @table-border-color;
|
383
|
-
}
|
380
|
+
border-bottom: 1px solid @table-border-color;
|
384
381
|
}
|
385
382
|
|
386
383
|
&.bordered-outer,
|