bkui-vue 2.0.1-beta.27 → 2.0.1-beta.28
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 +38 -38
- package/dist/index.esm.js +9297 -9278
- package/dist/index.umd.js +49 -49
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/index.js +1 -1
- package/lib/scrollbar/index.js +33 -1
- package/lib/scrollbar/scrollbar-core/index.d.ts +15 -15
- package/lib/select/index.d.ts +6 -0
- package/lib/select/index.js +10 -1
- package/lib/select/select.d.ts +2 -0
- package/lib/table/const.d.ts +2 -2
- package/lib/table/hooks/use-column-template.d.ts +2 -2
- package/lib/table/hooks/use-columns.d.ts +15 -8
- package/lib/table/hooks/use-layout.d.ts +2 -2
- package/lib/table/hooks/use-rows.d.ts +7 -7
- package/lib/table/index.js +60 -36
- package/lib/table/props.d.ts +23 -20
- package/lib/table/table.css +25 -1
- package/lib/table/table.less +35 -2
- package/lib/table/table.variable.css +25 -1
- package/lib/table/utils.d.ts +8 -5
- package/lib/table-column/index.js +1 -1
- package/lib/tree/index.js +0 -3
- package/lib/virtual-render/index.d.ts +8 -8
- package/lib/virtual-render/index.js +17285 -19
- package/lib/virtual-render/use-fix-top.d.ts +1 -1
- package/lib/virtual-render/v-virtual-render.d.ts +1 -1
- package/lib/virtual-render/virtual-render.d.ts +4 -4
- package/package.json +1 -1
package/lib/table/props.d.ts
CHANGED
@@ -44,12 +44,12 @@ export declare enum FixedEnum {
|
|
44
44
|
}
|
45
45
|
export declare const fixedType: import("vue-types").VueTypeValidableDef<"left" | "right">;
|
46
46
|
export type IOverflowTooltipOption = {
|
47
|
-
content: ((col: Column, row:
|
48
|
-
disabled?: ((col: Column, row:
|
47
|
+
content: ((col: Column, row: Record<string, object>) => string) | string;
|
48
|
+
disabled?: ((col: Column, row: Record<string, object>) => boolean) | boolean;
|
49
49
|
allowHtml?: boolean;
|
50
50
|
watchCellResize?: boolean;
|
51
51
|
mode?: `${OverflowModeEnum}`;
|
52
|
-
popoverOption?:
|
52
|
+
popoverOption?: Record<string, object>;
|
53
53
|
resizerWay?: ResizerWay;
|
54
54
|
showHead?: boolean;
|
55
55
|
};
|
@@ -61,16 +61,19 @@ export type ISortOption = {
|
|
61
61
|
};
|
62
62
|
export declare const ISortType: import("vue-types").VueTypeDef<ISortPropShape>;
|
63
63
|
export type ISortShape = {
|
64
|
-
sortFn?:
|
64
|
+
sortFn?: (...args: any[]) => boolean;
|
65
65
|
sortScope?: SortScope;
|
66
66
|
value?: SORT_OPTION;
|
67
67
|
};
|
68
68
|
export type ISortPropShape = ISortShape | boolean | string;
|
69
69
|
export type IFilterShape = {
|
70
|
-
list:
|
71
|
-
|
70
|
+
list: {
|
71
|
+
label: string;
|
72
|
+
value: string;
|
73
|
+
}[];
|
74
|
+
filterFn?: (...args: any[]) => boolean;
|
72
75
|
match?: FullEnum;
|
73
|
-
checked?:
|
76
|
+
checked?: string[];
|
74
77
|
filterScope?: SortScope;
|
75
78
|
btnSave?: boolean | string;
|
76
79
|
btnReset?: boolean | string;
|
@@ -119,12 +122,12 @@ export type Field = {
|
|
119
122
|
export type LabelFunctionString = ((_column: any, _index: any) => JSX.Element | boolean | number | string) | boolean | number | string;
|
120
123
|
export declare const LabelFunctionStringType: import("vue-types").VueTypeDef<LabelFunctionString>;
|
121
124
|
export type HeadRenderArgs = {
|
122
|
-
cell?:
|
123
|
-
data?:
|
124
|
-
row?:
|
125
|
+
cell?: Record<string, object>;
|
126
|
+
data?: Record<string, object>[];
|
127
|
+
row?: Record<string, object>;
|
125
128
|
column: Column;
|
126
129
|
index: number;
|
127
|
-
rows?:
|
130
|
+
rows?: Record<string, object>[];
|
128
131
|
};
|
129
132
|
export type RenderFunctionString = (args: HeadRenderArgs) => JSX.Element | boolean | number | string;
|
130
133
|
export declare const RenderFunctionStringType: import("vue-types").VueTypeDef<RenderFunctionString>;
|
@@ -135,11 +138,11 @@ export type SpanFunctionString = (({ column, colIndex, row, rowIndex }: {
|
|
135
138
|
rowIndex: any;
|
136
139
|
}) => number) | number;
|
137
140
|
export declare const SpanFunctionStringType: import("vue-types").VueTypeDef<SpanFunctionString>;
|
138
|
-
export type RowClassFunctionString = ((row:
|
141
|
+
export type RowClassFunctionString = ((row: Record<string, object>) => string) | string;
|
139
142
|
export declare const RowClassFunctionStringType: import("vue-types").VueTypeDef<RowClassFunctionString>;
|
140
|
-
export type RowHeightFunctionNumber = ((
|
143
|
+
export type RowHeightFunctionNumber = ((type: string, row: Record<string, object>, rowIndex: number, size?: any) => number) | number;
|
141
144
|
export declare const RowHeightFunctionNumberType: import("vue-types").VueTypeDef<RowHeightFunctionNumber>;
|
142
|
-
type FunctionNumber =
|
145
|
+
type FunctionNumber = ((...args: any[]) => void) | number;
|
143
146
|
export declare const FunctionNumberType: import("vue-types").VueTypeDef<FunctionNumber>;
|
144
147
|
type StringNumber = number | string;
|
145
148
|
export declare const StringNumberType: (val: number | string) => import("vue-types").VueTypeDef<StringNumber> & {
|
@@ -186,7 +189,7 @@ export declare const IColumnProp: import("vue-types").VueTypeDef<Column>;
|
|
186
189
|
export type Thead = {
|
187
190
|
height?: number;
|
188
191
|
isShow?: boolean;
|
189
|
-
cellFn?:
|
192
|
+
cellFn?: (...args: any[]) => void;
|
190
193
|
color?: IHeadColor | string;
|
191
194
|
};
|
192
195
|
export type Columns = ReadonlyArray<Column>;
|
@@ -195,7 +198,7 @@ export type GroupColumn = {
|
|
195
198
|
calcWidth?: number;
|
196
199
|
resizeWidth?: number;
|
197
200
|
isHidden?: boolean;
|
198
|
-
listeners?: Map<string, any>;
|
201
|
+
listeners?: Map<string, (...args: any[]) => void>;
|
199
202
|
} & Column;
|
200
203
|
export type IColumnActive = {
|
201
204
|
index: number;
|
@@ -203,21 +206,21 @@ export type IColumnActive = {
|
|
203
206
|
};
|
204
207
|
export type IReactiveProp = {
|
205
208
|
activeColumns: IColumnActive[];
|
206
|
-
rowActions: Record<string,
|
209
|
+
rowActions: Record<string, object>;
|
207
210
|
scrollTranslateY: number;
|
208
211
|
scrollTranslateX: number;
|
209
|
-
pos: Record<string,
|
212
|
+
pos: Record<string, object>;
|
210
213
|
settings: Settings | boolean;
|
211
214
|
setting: {
|
212
215
|
size: string;
|
213
216
|
height: number;
|
214
217
|
};
|
215
|
-
defaultSort: Record<string,
|
218
|
+
defaultSort: Record<string, object>;
|
216
219
|
};
|
217
220
|
export type Colgroups = Column & {
|
218
221
|
calcWidth: number;
|
219
222
|
resizeWidth: number;
|
220
|
-
listeners: Map<string,
|
223
|
+
listeners: Map<string, (...args: any[]) => void>;
|
221
224
|
};
|
222
225
|
export declare enum IColSortBehavior {
|
223
226
|
/**
|
package/lib/table/table.css
CHANGED
@@ -1235,9 +1235,21 @@
|
|
1235
1235
|
}
|
1236
1236
|
.bk-table .bk-table-body {
|
1237
1237
|
position: relative;
|
1238
|
-
overflow:
|
1238
|
+
overflow: auto;
|
1239
1239
|
flex: 1;
|
1240
1240
|
}
|
1241
|
+
.bk-table .bk-table-body::-webkit-scrollbar {
|
1242
|
+
width: 8px;
|
1243
|
+
height: 8px;
|
1244
|
+
}
|
1245
|
+
.bk-table .bk-table-body::-webkit-scrollbar-thumb {
|
1246
|
+
background: #ddd;
|
1247
|
+
border-radius: 20px;
|
1248
|
+
box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);
|
1249
|
+
}
|
1250
|
+
.bk-table .bk-table-body.is-bk-scrollbar {
|
1251
|
+
overflow: hidden;
|
1252
|
+
}
|
1241
1253
|
.bk-table .bk-table-body .prepend-row {
|
1242
1254
|
transform: translate3d(var(--translate-x), 0, 0);
|
1243
1255
|
}
|
@@ -1561,15 +1573,27 @@
|
|
1561
1573
|
.bk-table.bordered-horizontal .__is-empty .bk-table-body-content {
|
1562
1574
|
border-bottom: 1px solid var(--table-border-color);
|
1563
1575
|
}
|
1576
|
+
.bk-table.bordered-col .bk-table-head {
|
1577
|
+
border-right: 1px solid var(--table-border-color);
|
1578
|
+
}
|
1564
1579
|
.bk-table.bordered-col th {
|
1565
1580
|
border-right: 1px solid var(--table-border-color);
|
1566
1581
|
}
|
1567
1582
|
.bk-table.bordered-col th:last-child {
|
1568
1583
|
border-right: none;
|
1569
1584
|
}
|
1585
|
+
.bk-table.bordered-col .bk-table-body {
|
1586
|
+
border-right: 1px solid var(--table-border-color);
|
1587
|
+
}
|
1570
1588
|
.bk-table.bordered-col .bk-table-body tbody tr td {
|
1571
1589
|
border-right-color: var(--table-border-color);
|
1572
1590
|
}
|
1591
|
+
.bk-table.bordered-col .bk-table-body tbody tr td:last-child {
|
1592
|
+
border-right: none;
|
1593
|
+
}
|
1594
|
+
.bk-table.bordered-col .bk-table-body tbody tr:hover.hover-highlight td:not(.empty-cell) {
|
1595
|
+
border-right-color: var(--table-border-color);
|
1596
|
+
}
|
1573
1597
|
.bk-table th,
|
1574
1598
|
.bk-table td {
|
1575
1599
|
border-right: 1px solid var(--table-bg-color);
|
package/lib/table/table.less
CHANGED
@@ -22,9 +22,24 @@
|
|
22
22
|
|
23
23
|
.@{bk-prefix}-table-body {
|
24
24
|
position: relative;
|
25
|
-
overflow:
|
25
|
+
overflow: auto;
|
26
26
|
flex: 1;
|
27
27
|
|
28
|
+
&::-webkit-scrollbar {
|
29
|
+
width: 8px;
|
30
|
+
height: 8px;
|
31
|
+
}
|
32
|
+
|
33
|
+
&::-webkit-scrollbar-thumb {
|
34
|
+
background: #ddd;
|
35
|
+
border-radius: 20px;
|
36
|
+
box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);
|
37
|
+
}
|
38
|
+
|
39
|
+
&.is-bk-scrollbar {
|
40
|
+
overflow: hidden;
|
41
|
+
}
|
42
|
+
|
28
43
|
.prepend-row {
|
29
44
|
transform: translate3d(var(--translate-x), 0, 0);
|
30
45
|
}
|
@@ -389,6 +404,9 @@
|
|
389
404
|
}
|
390
405
|
|
391
406
|
&.bordered-col {
|
407
|
+
.@{bk-prefix}-table-head {
|
408
|
+
border-right: 1px solid @table-border-color;
|
409
|
+
}
|
392
410
|
th {
|
393
411
|
border-right: 1px solid @table-border-color;
|
394
412
|
|
@@ -397,11 +415,26 @@
|
|
397
415
|
}
|
398
416
|
}
|
399
417
|
|
400
|
-
|
418
|
+
.@{bk-prefix}-table-body {
|
419
|
+
border-right: 1px solid @table-border-color;
|
401
420
|
tbody {
|
402
421
|
tr {
|
403
422
|
td {
|
404
423
|
border-right-color: @table-border-color;
|
424
|
+
|
425
|
+
&:last-child {
|
426
|
+
border-right: none;
|
427
|
+
}
|
428
|
+
}
|
429
|
+
|
430
|
+
&:hover {
|
431
|
+
&.hover-highlight {
|
432
|
+
td {
|
433
|
+
&:not(.empty-cell) {
|
434
|
+
border-right-color: @table-border-color;
|
435
|
+
}
|
436
|
+
}
|
437
|
+
}
|
405
438
|
}
|
406
439
|
}
|
407
440
|
}
|
@@ -1625,9 +1625,21 @@
|
|
1625
1625
|
}
|
1626
1626
|
.bk-table .bk-table-body {
|
1627
1627
|
position: relative;
|
1628
|
-
overflow:
|
1628
|
+
overflow: auto;
|
1629
1629
|
flex: 1;
|
1630
1630
|
}
|
1631
|
+
.bk-table .bk-table-body::-webkit-scrollbar {
|
1632
|
+
width: 8px;
|
1633
|
+
height: 8px;
|
1634
|
+
}
|
1635
|
+
.bk-table .bk-table-body::-webkit-scrollbar-thumb {
|
1636
|
+
background: #ddd;
|
1637
|
+
border-radius: 20px;
|
1638
|
+
box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);
|
1639
|
+
}
|
1640
|
+
.bk-table .bk-table-body.is-bk-scrollbar {
|
1641
|
+
overflow: hidden;
|
1642
|
+
}
|
1631
1643
|
.bk-table .bk-table-body .prepend-row {
|
1632
1644
|
transform: translate3d(var(--translate-x), 0, 0);
|
1633
1645
|
}
|
@@ -1951,15 +1963,27 @@
|
|
1951
1963
|
.bk-table.bordered-horizontal .__is-empty .bk-table-body-content {
|
1952
1964
|
border-bottom: 1px solid var(--table-border-color);
|
1953
1965
|
}
|
1966
|
+
.bk-table.bordered-col .bk-table-head {
|
1967
|
+
border-right: 1px solid var(--table-border-color);
|
1968
|
+
}
|
1954
1969
|
.bk-table.bordered-col th {
|
1955
1970
|
border-right: 1px solid var(--table-border-color);
|
1956
1971
|
}
|
1957
1972
|
.bk-table.bordered-col th:last-child {
|
1958
1973
|
border-right: none;
|
1959
1974
|
}
|
1975
|
+
.bk-table.bordered-col .bk-table-body {
|
1976
|
+
border-right: 1px solid var(--table-border-color);
|
1977
|
+
}
|
1960
1978
|
.bk-table.bordered-col .bk-table-body tbody tr td {
|
1961
1979
|
border-right-color: var(--table-border-color);
|
1962
1980
|
}
|
1981
|
+
.bk-table.bordered-col .bk-table-body tbody tr td:last-child {
|
1982
|
+
border-right: none;
|
1983
|
+
}
|
1984
|
+
.bk-table.bordered-col .bk-table-body tbody tr:hover.hover-highlight td:not(.empty-cell) {
|
1985
|
+
border-right-color: var(--table-border-color);
|
1986
|
+
}
|
1963
1987
|
.bk-table th,
|
1964
1988
|
.bk-table td {
|
1965
1989
|
border-right: 1px solid var(--table-bg-color);
|
package/lib/table/utils.d.ts
CHANGED
@@ -117,7 +117,7 @@ export declare const getNextSortType: (sortType: string) => string;
|
|
117
117
|
export declare const resolveSort: (sort: ISortPropShape, column: any, format?: any[]) => ({
|
118
118
|
sortFn: ((_a: any, _b: any) => boolean) | ((_a: any, _b: any, index0: any, index1: any) => number);
|
119
119
|
} & import("./props").ISortShape) | {
|
120
|
-
sortFn?:
|
120
|
+
sortFn?: (...args: any[]) => boolean;
|
121
121
|
sortScope?: import("./props").SortScope;
|
122
122
|
value: string;
|
123
123
|
};
|
@@ -129,17 +129,20 @@ export declare const isRowSelectEnable: (props: any, { row, index, isCheckAll }:
|
|
129
129
|
export declare const getRowId: (row: any, defVal: any, props: any) => any;
|
130
130
|
export declare const resolveColumnSortProp: (col: Column, props: TablePropTypes) => {
|
131
131
|
type: string;
|
132
|
-
fn:
|
132
|
+
fn: ((...args: any[]) => boolean) | ((((_a: any, _b: any) => boolean) | ((_a: any, _b: any, index0: any, index1: any) => number)) & ((...args: any[]) => boolean));
|
133
133
|
scope: import("./props").SortScope;
|
134
134
|
active: boolean;
|
135
135
|
enabled: boolean;
|
136
136
|
};
|
137
137
|
export declare const resolveColumnFilterProp: (col: Column) => {
|
138
138
|
enabled: boolean;
|
139
|
-
list:
|
140
|
-
|
139
|
+
list: {
|
140
|
+
label: string;
|
141
|
+
value: string;
|
142
|
+
}[];
|
143
|
+
filterFn?: (...args: any[]) => boolean;
|
141
144
|
match?: import("./props").FullEnum;
|
142
|
-
checked?:
|
145
|
+
checked?: string[];
|
143
146
|
filterScope?: import("./props").SortScope;
|
144
147
|
btnSave?: string | boolean;
|
145
148
|
btnReset?: string | boolean;
|
@@ -17442,7 +17442,7 @@ var COLUMN_ATTRIBUTE = {
|
|
17442
17442
|
/**
|
17443
17443
|
* Y 轴滚动条宽度
|
17444
17444
|
*/
|
17445
|
-
var SCROLLY_WIDTH =
|
17445
|
+
var SCROLLY_WIDTH = 8;
|
17446
17446
|
/**
|
17447
17447
|
* 默认行高
|
17448
17448
|
*/
|
package/lib/tree/index.js
CHANGED
@@ -19933,9 +19933,6 @@ var use_tree_init_this = undefined;
|
|
19933
19933
|
}
|
19934
19934
|
setNodeAttribute(item, [NODE_ATTRIBUTES.IS_MATCH], [isMatch], isTreeUI.value && isMatch);
|
19935
19935
|
});
|
19936
|
-
(0,external_vue_namespaceObject.nextTick)(function () {
|
19937
|
-
scrollToTop();
|
19938
|
-
});
|
19939
19936
|
});
|
19940
19937
|
if (!isSearchDisabled) {
|
19941
19938
|
(0,external_vue_namespaceObject.watch)([refSearch], function () {
|
@@ -312,10 +312,10 @@ declare const BkVirtualRender: {
|
|
312
312
|
autoReset: boolean;
|
313
313
|
autoIndex: boolean;
|
314
314
|
}, true, {}, import("vue").SlotsType<{
|
315
|
-
default?:
|
316
|
-
beforeContent?:
|
317
|
-
afterContent?:
|
318
|
-
afterSection?:
|
315
|
+
default?: Record<string, object>;
|
316
|
+
beforeContent?: Record<string, object>;
|
317
|
+
afterContent?: Record<string, object>;
|
318
|
+
afterSection?: Record<string, object>;
|
319
319
|
}>, {
|
320
320
|
P: {};
|
321
321
|
B: {};
|
@@ -674,9 +674,9 @@ declare const BkVirtualRender: {
|
|
674
674
|
autoReset: boolean;
|
675
675
|
autoIndex: boolean;
|
676
676
|
}, {}, string, import("vue").SlotsType<{
|
677
|
-
default?:
|
678
|
-
beforeContent?:
|
679
|
-
afterContent?:
|
680
|
-
afterSection?:
|
677
|
+
default?: Record<string, object>;
|
678
|
+
beforeContent?: Record<string, object>;
|
679
|
+
afterContent?: Record<string, object>;
|
680
|
+
afterSection?: Record<string, object>;
|
681
681
|
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]>;
|
682
682
|
export default BkVirtualRender;
|