bkui-vue 0.0.2-beta.4 → 0.0.2-beta.40
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 +54 -54
- package/dist/index.esm.js +15195 -14791
- package/dist/index.umd.js +67 -67
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.d.ts +1 -1
- package/lib/affix/index.d.ts +4 -4
- package/lib/alert/alert.css +1 -0
- package/lib/alert/alert.less +119 -119
- package/lib/alert/alert.variable.css +1 -0
- package/lib/alert/index.d.ts +1 -1
- package/lib/animate-number/index.d.ts +1 -1
- package/lib/backtop/index.d.ts +1 -1
- package/lib/badge/badge.d.ts +2 -2
- package/lib/badge/index.d.ts +7 -7
- package/lib/breadcrumb/index.d.ts +1 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/card/card.d.ts +1 -1
- package/lib/card/index.d.ts +4 -4
- package/lib/cascader/cascader.d.ts +1 -12
- package/lib/cascader/index.d.ts +4 -19
- package/lib/cascader/index.js +1 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/code-diff/index.d.ts +1 -1
- package/lib/collapse/index.d.ts +1 -1
- package/lib/color-picker/index.d.ts +1 -1
- package/lib/color-picker/index.js +1 -1
- package/lib/components.d.ts +1 -1
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/index.d.ts +5 -1
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/container/index.d.ts +1 -1
- package/lib/container/index.js +1 -1
- package/lib/date-picker/index.d.ts +1 -1
- package/lib/dialog/index.d.ts +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +3 -2
- package/lib/divider/index.d.ts +1 -1
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/dropdown/index.d.ts +6 -6
- package/lib/exception/index.d.ts +1 -1
- package/lib/fixed-navbar/index.d.ts +1 -1
- package/lib/form/index.d.ts +1 -1
- package/lib/icon/assistant.d.ts +4 -0
- package/lib/icon/assistant.js +1 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +1 -1
- package/lib/image/index.d.ts +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/input/index.d.ts +86 -50
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +12 -0
- package/lib/input/input.d.ts +44 -11
- package/lib/input/input.less +26 -5
- package/lib/input/input.variable.css +12 -0
- package/lib/link/index.d.ts +4 -4
- package/lib/link/link.d.ts +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/locale/index.js +1 -1
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/index.d.ts +1 -1
- package/lib/message/index.js +1 -1
- package/lib/message/message.css +18 -8
- package/lib/message/message.less +65 -53
- package/lib/message/message.variable.css +18 -8
- package/lib/message/messageConstructor.d.ts +30 -8
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/index.js +1 -1
- package/lib/navigation/index.d.ts +4 -1
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation.d.ts +1 -0
- package/lib/notify/index.js +1 -1
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/overflow-title/index.d.ts +1 -1
- package/lib/pagination/index.d.ts +1 -1
- package/lib/plugin-popover/index.js +1 -1
- package/lib/pop-confirm/index.d.ts +1 -1
- package/lib/popover/const.d.ts +22 -9
- package/lib/popover/content.d.ts +33 -0
- package/lib/popover/index.d.ts +158 -73
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.d.ts +66 -30
- package/lib/popover/props.d.ts +30 -7
- package/lib/popover/use-floating.d.ts +2 -2
- package/lib/popover/use-popover-init.d.ts +2 -1
- package/lib/popover2/index.d.ts +1 -1
- package/lib/preset.d.ts +2 -0
- package/lib/process/index.d.ts +1 -1
- package/lib/progress/index.d.ts +1 -1
- package/lib/radio/index.d.ts +1 -1
- package/lib/rate/index.d.ts +8 -4
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +2 -1
- package/lib/resize-layout/index.d.ts +1 -1
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.css +12 -0
- package/lib/resize-layout/resize-layout.less +12 -0
- package/lib/resize-layout/resize-layout.variable.css +12 -0
- package/lib/search-select/index.d.ts +55 -22
- package/lib/search-select/index.js +1 -1
- package/lib/search-select/input.d.ts +5 -1
- package/lib/search-select/menu.d.ts +33 -2
- package/lib/search-select/search-select.css +31 -11
- package/lib/search-select/search-select.d.ts +19 -16
- package/lib/search-select/search-select.less +29 -10
- package/lib/search-select/search-select.variable.css +31 -11
- package/lib/search-select/selected.d.ts +5 -1
- package/lib/search-select/utils.d.ts +13 -5
- package/lib/select/index.d.ts +143 -67
- package/lib/select/index.js +1 -1
- package/lib/select/select.css +9 -0
- package/lib/select/select.d.ts +66 -33
- package/lib/select/select.less +11 -0
- package/lib/select/select.variable.css +9 -0
- package/lib/select/selectTagInput.d.ts +3 -0
- package/lib/shared/index.js +1 -1
- package/lib/shared/mask-manager.d.ts +3 -4
- package/lib/shared/pop-manager.d.ts +6 -2
- package/lib/sideslider/index.d.ts +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/steps/index.js +1 -1
- package/lib/styles/mixins/popper.less +6 -5
- package/lib/swiper/index.d.ts +1 -1
- package/lib/swiper/index.js +1 -1
- package/lib/swiper/swiper.css +0 -6
- package/lib/swiper/swiper.less +0 -8
- package/lib/swiper/swiper.variable.css +0 -6
- package/lib/switcher/index.d.ts +1 -1
- package/lib/switcher/index.js +1 -1
- package/lib/tab/index.d.ts +2 -2
- package/lib/tab/tab-panel.d.ts +1 -1
- package/lib/table/components/table-cell.d.ts +22 -15
- package/lib/table/components/table-column.d.ts +151 -217
- package/lib/table/const.d.ts +16 -54
- package/lib/table/events.d.ts +180 -0
- package/lib/table/index.d.ts +678 -425
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.d.ts +3 -7
- package/lib/table/plugins/head-sort.d.ts +3 -7
- package/lib/table/plugins/settings.d.ts +12 -26
- package/lib/table/plugins/use-fixed-column.d.ts +3 -2
- package/lib/table/props.d.ts +168 -173
- package/lib/table/render.d.ts +6 -4
- package/lib/table/table.css +30 -4
- package/lib/table/table.d.ts +185 -92
- package/lib/table/table.less +41 -7
- package/lib/table/table.variable.css +30 -4
- package/lib/table/use-column.d.ts +50 -1
- package/lib/table/use-common.d.ts +16 -9
- package/lib/table/utils.d.ts +1 -0
- package/lib/table-column/index.d.ts +228 -521
- package/lib/table-column/index.js +1 -1
- package/lib/tag/index.d.ts +1 -1
- package/lib/tag-input/index.d.ts +52 -22
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/tag-input.css +1 -1
- package/lib/tag-input/tag-input.d.ts +48 -14
- package/lib/tag-input/tag-input.less +4 -4
- package/lib/tag-input/tag-input.variable.css +1 -1
- package/lib/tag-input/tag-props.d.ts +17 -7
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/timeline/index.d.ts +1 -1
- package/lib/transfer/index.d.ts +1 -1
- package/lib/tree/index.d.ts +1 -1
- package/lib/tree/index.js +1 -1
- package/lib/tree/tree.d.ts +10 -0
- package/lib/tree/use-node-attribute.d.ts +1 -1
- package/lib/upload/index.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +19 -1
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +8 -0
- package/lib/virtual-render/virtual-render.d.ts +11 -0
- package/package.json +2 -2
package/lib/table/props.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ExtractPropTypes
|
2
|
-
import { ROW_HOVER, SORT_OPTION } from './const';
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
2
|
+
import { IHeadColor, ROW_HOVER, SORT_OPTION } from './const';
|
3
3
|
export declare enum SortScope {
|
4
4
|
CURRENT = "current",
|
5
5
|
ALL = "all"
|
@@ -12,7 +12,7 @@ export declare enum OverflowModeEnum {
|
|
12
12
|
STATIC = "static",
|
13
13
|
AUTO = "auto"
|
14
14
|
}
|
15
|
-
export declare const
|
15
|
+
export declare const EnumOverflowModeType: import("vue-types").VueTypeDef<"auto" | "static">;
|
16
16
|
export declare enum ColumnTypeEnum {
|
17
17
|
SELECTION = "selection",
|
18
18
|
INDEX = "index",
|
@@ -43,15 +43,37 @@ export declare enum FixedEnum {
|
|
43
43
|
RIGHT = "right"
|
44
44
|
}
|
45
45
|
export declare const fixedType: import("vue-types").VueTypeValidableDef<"right" | "left">;
|
46
|
-
export type
|
46
|
+
export type IOverflowTooltipProp = {
|
47
47
|
content: string | Function;
|
48
48
|
disabled?: boolean;
|
49
49
|
watchCellResize?: boolean;
|
50
50
|
mode?: `${OverflowModeEnum}`;
|
51
|
-
|
51
|
+
popoverOption?: any;
|
52
|
+
resizerWay?: ResizerWay;
|
53
|
+
} | boolean;
|
54
|
+
export type IOverflowTooltip = IOverflowTooltipProp;
|
55
|
+
export declare const IOverflowTooltipPropType: import("vue-types").VueTypeDef<IOverflowTooltipProp>;
|
52
56
|
export type ISortOption = {
|
53
57
|
[key: string]: SORT_OPTION;
|
54
58
|
};
|
59
|
+
export declare const ISortType: import("vue-types").VueTypeDef<ISortPropShape>;
|
60
|
+
export type ISortShape = {
|
61
|
+
sortFn?: Function;
|
62
|
+
sortScope?: SortScope;
|
63
|
+
value?: SORT_OPTION;
|
64
|
+
};
|
65
|
+
export type ISortPropShape = ISortShape | boolean | string;
|
66
|
+
export type IFilterShape = {
|
67
|
+
list: any[];
|
68
|
+
filterFn?: Function;
|
69
|
+
match?: FullEnum;
|
70
|
+
checked?: any[];
|
71
|
+
filterScope?: SortScope;
|
72
|
+
btnSave?: boolean | string;
|
73
|
+
btnReset?: boolean | string;
|
74
|
+
};
|
75
|
+
export type IFilterPropShape = IFilterShape | boolean | string;
|
76
|
+
export declare const IFilterType: import("vue-types").VueTypeDef<IFilterPropShape>;
|
55
77
|
export declare enum ColumnPickEnum {
|
56
78
|
MULTI = "multi",
|
57
79
|
SINGLE = "single",
|
@@ -61,67 +83,127 @@ export declare enum ResizerWay {
|
|
61
83
|
DEBOUNCE = "debounce",
|
62
84
|
THROTTLE = "throttle"
|
63
85
|
}
|
64
|
-
export declare const IColumnType:
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
86
|
+
export declare const IColumnType: import("vue-types").VueTypeDef<Column>;
|
87
|
+
export declare const ITableSettings: import("vue-types").VueTypeDef<ISettingPropType>;
|
88
|
+
/**
|
89
|
+
* 配置自定义行高选项
|
90
|
+
*/
|
91
|
+
export type SizeItem = {
|
92
|
+
value?: string;
|
93
|
+
label?: string;
|
94
|
+
height?: number;
|
95
|
+
};
|
96
|
+
export type Settings = {
|
97
|
+
fields?: Field[];
|
98
|
+
checked?: string[];
|
99
|
+
limit?: number;
|
100
|
+
size?: string;
|
101
|
+
sizeList?: SizeItem[];
|
102
|
+
showLineHeight?: boolean;
|
103
|
+
};
|
104
|
+
export type ISettingPropType = Settings | boolean;
|
105
|
+
export type Field = {
|
106
|
+
label: string;
|
107
|
+
field?: string;
|
108
|
+
disabled?: boolean;
|
109
|
+
id?: string;
|
110
|
+
name?: string;
|
111
|
+
};
|
112
|
+
export type LabelFunctionString = ((_column: any, _index: any) => string | JSX.Element) | string;
|
113
|
+
export declare const LabelFunctionStringType: import("vue-types").VueTypeDef<LabelFunctionString>;
|
114
|
+
export type RenderFunctionString = ({ cell, data, row, column, index, rows, }: {
|
115
|
+
cell: any;
|
116
|
+
data: any;
|
117
|
+
row: any;
|
118
|
+
column: any;
|
119
|
+
index: any;
|
120
|
+
rows: any;
|
121
|
+
}) => string | JSX.Element;
|
122
|
+
export declare const RenderFunctionStringType: import("vue-types").VueTypeDef<RenderFunctionString>;
|
123
|
+
export type SpanFunctionString = (({ column, colIndex, row, rowIndex, }: {
|
124
|
+
column: any;
|
125
|
+
colIndex: any;
|
126
|
+
row: any;
|
127
|
+
rowIndex: any;
|
128
|
+
}) => number) | Number;
|
129
|
+
export declare const SpanFunctionStringType: import("vue-types").VueTypeDef<SpanFunctionString>;
|
130
|
+
export type RowClassFunctionString = ((row: any) => string) | string;
|
131
|
+
export declare const RowClassFunctionStringType: import("vue-types").VueTypeDef<RowClassFunctionString>;
|
132
|
+
export type RowHeightFunctionNumber = ((_type: string, _row: any, _rowIndex: number, _size?: any) => number) | number;
|
133
|
+
export declare const RowHeightFunctionNumberType: import("vue-types").VueTypeDef<RowHeightFunctionNumber>;
|
134
|
+
type FunctionNumber = Function | number;
|
135
|
+
export declare const FunctionNumberType: import("vue-types").VueTypeDef<FunctionNumber>;
|
136
|
+
type StringNumber = string | number;
|
137
|
+
export declare const StringNumberType: (val: number | string) => import("vue-types").VueTypeDef<StringNumber> & {
|
138
|
+
default: StringNumber;
|
139
|
+
};
|
140
|
+
/**
|
141
|
+
* 表格字段解释说明
|
142
|
+
*/
|
143
|
+
export type IColumnExplain = {
|
144
|
+
content: LabelFunctionString;
|
145
|
+
head: LabelFunctionString | boolean;
|
146
|
+
} | boolean;
|
147
|
+
export type Column = {
|
148
|
+
label: LabelFunctionString;
|
149
|
+
field?: LabelFunctionString;
|
150
|
+
render?: RenderFunctionString;
|
151
|
+
renderHead?: RenderFunctionString;
|
152
|
+
width?: number | string;
|
153
|
+
minWidth?: number | string;
|
154
|
+
columnKey?: string;
|
155
|
+
showOverflowTooltip?: boolean | IOverflowTooltip;
|
156
|
+
type?: string;
|
157
|
+
fixed?: string | boolean;
|
158
|
+
resizable?: boolean;
|
159
|
+
sort?: ISortShape | boolean | string;
|
160
|
+
filter?: IFilterShape | boolean | string;
|
161
|
+
colspan?: SpanFunctionString;
|
162
|
+
rowspan?: SpanFunctionString;
|
163
|
+
textAlign?: string;
|
164
|
+
className?: RowClassFunctionString;
|
165
|
+
align?: string;
|
166
|
+
prop?: LabelFunctionString;
|
167
|
+
index?: Number;
|
168
|
+
explain?: IColumnExplain;
|
169
|
+
};
|
170
|
+
export declare const IColumnProp: import("vue-types").VueTypeDef<Column>;
|
171
|
+
export type Thead = {
|
172
|
+
height?: Number;
|
173
|
+
isShow?: boolean;
|
174
|
+
cellFn?: Function;
|
175
|
+
color?: IHeadColor | string;
|
176
|
+
};
|
177
|
+
export type Columns = ReadonlyArray<Column>;
|
178
|
+
export type TablePropTypes = Readonly<ExtractPropTypes<typeof tableProps>>;
|
179
|
+
export type GroupColumn = {
|
180
|
+
calcWidth?: number;
|
181
|
+
resizeWidth?: number;
|
182
|
+
isHidden?: boolean;
|
183
|
+
listeners?: Map<string, any>;
|
184
|
+
} & Column;
|
185
|
+
export type IColumnActive = {
|
186
|
+
index: number;
|
187
|
+
active: boolean;
|
188
|
+
};
|
189
|
+
export type IReactiveProp = {
|
190
|
+
activeColumns: IColumnActive[];
|
191
|
+
rowActions: Record<string, any>;
|
192
|
+
scrollTranslateY: Number;
|
193
|
+
scrollTranslateX: Number;
|
194
|
+
pos: Record<string, any>;
|
195
|
+
settings: Settings | boolean;
|
196
|
+
setting: {
|
197
|
+
size: string;
|
198
|
+
height: Number;
|
118
199
|
};
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
200
|
+
defaultSort: Record<string, any>;
|
201
|
+
};
|
202
|
+
export type Colgroups = Column & {
|
203
|
+
calcWidth: number;
|
204
|
+
resizeWidth: number;
|
205
|
+
listeners: Map<string, Function>;
|
123
206
|
};
|
124
|
-
export type TableColumnProps = Partial<ExtractPropTypes<typeof IColumnType>>;
|
125
207
|
export declare const tableProps: {
|
126
208
|
/**
|
127
209
|
* 渲染列表
|
@@ -153,29 +235,37 @@ export declare const tableProps: {
|
|
153
235
|
* 默认:auto 根据行数自动填充高度
|
154
236
|
* 100%,依赖初始化时父级容器高度
|
155
237
|
*/
|
156
|
-
height: import("vue-types").VueTypeDef<
|
157
|
-
default:
|
238
|
+
height: import("vue-types").VueTypeDef<StringNumber> & {
|
239
|
+
default: StringNumber;
|
240
|
+
};
|
241
|
+
/**
|
242
|
+
* 是否为斑马纹 Table
|
243
|
+
*/
|
244
|
+
stripe: import("vue-types").VueTypeValidableDef<boolean> & {
|
245
|
+
default: boolean;
|
246
|
+
} & {
|
247
|
+
default: boolean;
|
158
248
|
};
|
159
249
|
/**
|
160
250
|
* 设置表格最小高度
|
161
251
|
* 默认:300
|
162
252
|
*/
|
163
|
-
minHeight: import("vue-types").VueTypeDef<
|
164
|
-
default:
|
253
|
+
minHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
254
|
+
default: StringNumber;
|
165
255
|
};
|
166
256
|
/**
|
167
257
|
* 设置表格最d大高度
|
168
258
|
* 默认:auto,依赖外层高度
|
169
259
|
*/
|
170
|
-
maxHeight: import("vue-types").VueTypeDef<
|
171
|
-
default:
|
260
|
+
maxHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
261
|
+
default: StringNumber;
|
172
262
|
};
|
173
263
|
/**
|
174
264
|
* 行高,可以为固定数值类型
|
175
265
|
* 可以是函数,返回当前行的高度,返回值为数值类型
|
176
266
|
*/
|
177
|
-
rowHeight: import("vue-types").VueTypeDef<
|
178
|
-
default:
|
267
|
+
rowHeight: import("vue-types").VueTypeDef<RowHeightFunctionNumber> & {
|
268
|
+
default: RowHeightFunctionNumber;
|
179
269
|
};
|
180
270
|
/**
|
181
271
|
* Thead行高,可以为固定数值类型
|
@@ -196,7 +286,9 @@ export declare const tableProps: {
|
|
196
286
|
/**
|
197
287
|
* table header config
|
198
288
|
*/
|
199
|
-
thead: import("vue-types").
|
289
|
+
thead: import("vue-types").VueTypeDef<Thead> & {
|
290
|
+
default: () => Thead;
|
291
|
+
};
|
200
292
|
/**
|
201
293
|
* 是否启用虚拟渲染 & 滚动
|
202
294
|
* 当数据量很大时,启用虚拟渲染可以解决压面卡顿问题
|
@@ -253,23 +345,7 @@ export declare const tableProps: {
|
|
253
345
|
/**
|
254
346
|
* bk-table-setting-content
|
255
347
|
*/
|
256
|
-
settings: import("vue-types").VueTypeDef<
|
257
|
-
fields: Field[] | (() => Field[]);
|
258
|
-
checked: string[] | (() => string[]);
|
259
|
-
limit: number;
|
260
|
-
size: "small" | "medium" | "large";
|
261
|
-
sizeList: SizeItem[] | (object & (() => SizeItem[]));
|
262
|
-
showLineHeight: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
|
263
|
-
}> & {
|
264
|
-
default: boolean | (() => {
|
265
|
-
fields: Field[] | (() => Field[]);
|
266
|
-
checked: string[] | (() => string[]);
|
267
|
-
limit: number;
|
268
|
-
size: "small" | "medium" | "large";
|
269
|
-
sizeList: SizeItem[] | (object & (() => SizeItem[]));
|
270
|
-
showLineHeight: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
|
271
|
-
});
|
272
|
-
};
|
348
|
+
settings: import("vue-types").VueTypeDef<ISettingPropType>;
|
273
349
|
/**
|
274
350
|
* 行的 class 的回调方法,也可以使用一个固定的 Object 为所有行设置一样的 Style
|
275
351
|
*/
|
@@ -346,9 +422,7 @@ export declare const tableProps: {
|
|
346
422
|
* 当内容过长被隐藏时显示 tooltip, 此处为全局配置, 如果只配置此处,整个table都启用
|
347
423
|
* column内部可以单个配置覆盖此配置
|
348
424
|
*/
|
349
|
-
showOverflowTooltip: import("vue-types").VueTypeDef<
|
350
|
-
default: boolean | (() => IOverflowTooltip);
|
351
|
-
};
|
425
|
+
showOverflowTooltip: import("vue-types").VueTypeDef<IOverflowTooltipProp>;
|
352
426
|
/**
|
353
427
|
* 为避免不必要的数据修改导致的不可控组件更新
|
354
428
|
* 默认组件不会对传入组件的data进行任何修改
|
@@ -409,83 +483,4 @@ export declare const tableProps: {
|
|
409
483
|
default: () => import("vue").CSSProperties;
|
410
484
|
};
|
411
485
|
};
|
412
|
-
|
413
|
-
* 配置自定义行高选项
|
414
|
-
*/
|
415
|
-
export type SizeItem = {
|
416
|
-
value?: string;
|
417
|
-
label?: string;
|
418
|
-
height?: number;
|
419
|
-
};
|
420
|
-
export type Settings = {
|
421
|
-
fields?: Field[];
|
422
|
-
checked?: string[];
|
423
|
-
limit?: number;
|
424
|
-
size?: string;
|
425
|
-
sizeList?: SizeItem[];
|
426
|
-
showLineHeight?: boolean;
|
427
|
-
};
|
428
|
-
export type Field = {
|
429
|
-
label: string;
|
430
|
-
field?: string;
|
431
|
-
disabled?: boolean;
|
432
|
-
};
|
433
|
-
export type Column = {
|
434
|
-
label: Function | string;
|
435
|
-
field?: Function | string;
|
436
|
-
render?: Function | string | Slot;
|
437
|
-
width?: number | string;
|
438
|
-
minWidth?: number | string;
|
439
|
-
columnKey?: string;
|
440
|
-
showOverflowTooltip?: boolean | IOverflowTooltip;
|
441
|
-
type?: string;
|
442
|
-
fixed?: string | boolean;
|
443
|
-
resizable?: boolean;
|
444
|
-
sort?: {
|
445
|
-
sortFn?: Function;
|
446
|
-
sortScope?: string;
|
447
|
-
value?: string;
|
448
|
-
} | boolean | string;
|
449
|
-
filter?: {
|
450
|
-
list?: any;
|
451
|
-
filterFn?: Function;
|
452
|
-
checked?: any;
|
453
|
-
} | boolean | string;
|
454
|
-
colspan?: Function | Number;
|
455
|
-
rowspan?: Function | Number;
|
456
|
-
textAlign?: String;
|
457
|
-
className?: string | Function;
|
458
|
-
align?: string;
|
459
|
-
};
|
460
|
-
export type Thead = {
|
461
|
-
height?: Number;
|
462
|
-
isShow?: boolean;
|
463
|
-
cellFn?: Function;
|
464
|
-
};
|
465
|
-
export type GroupColumn = {
|
466
|
-
calcWidth?: number;
|
467
|
-
resizeWidth?: number;
|
468
|
-
isHidden?: boolean;
|
469
|
-
listeners?: Map<string, any>;
|
470
|
-
} & Column;
|
471
|
-
export type Columns = ReadonlyArray<Column>;
|
472
|
-
export type TablePropTypes = Readonly<ExtractPropTypes<typeof tableProps>>;
|
473
|
-
export type IColumnActive = {
|
474
|
-
index: number;
|
475
|
-
active: boolean;
|
476
|
-
};
|
477
|
-
export type IReactiveProp = {
|
478
|
-
activeColumns: IColumnActive[];
|
479
|
-
rowActions: Record<string, any>;
|
480
|
-
scrollTranslateY: Number;
|
481
|
-
scrollTranslateX: Number;
|
482
|
-
pos: Record<string, any>;
|
483
|
-
settings: any;
|
484
|
-
setting: any;
|
485
|
-
defaultSort: Record<string, any>;
|
486
|
-
};
|
487
|
-
export type Colgroups = Column & {
|
488
|
-
calcWidth: number;
|
489
|
-
resizeWidth: number;
|
490
|
-
listeners: Map<string, Function>;
|
491
|
-
};
|
486
|
+
export {};
|
package/lib/table/render.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
import { ComputedRef, Ref } from 'vue';
|
1
|
+
import { ComputedRef, Ref, SetupContext } from 'vue';
|
2
2
|
import type { Language } from '../locale';
|
3
3
|
import { TablePlugins } from './plugins';
|
4
4
|
import { GroupColumn, IColumnActive, IReactiveProp, TablePropTypes } from './props';
|
5
5
|
export default class TableRender {
|
6
6
|
props: TablePropTypes;
|
7
|
-
context:
|
8
|
-
reactiveProp:
|
7
|
+
context: SetupContext;
|
8
|
+
reactiveProp: IReactiveProp;
|
9
9
|
colgroups: GroupColumn[];
|
10
10
|
uuid: string;
|
11
11
|
events: Map<string, any[]>;
|
@@ -26,7 +26,9 @@ export default class TableRender {
|
|
26
26
|
* @param rows 表格数据
|
27
27
|
* @returns
|
28
28
|
*/
|
29
|
-
renderTableBodySchema(rows: any[]):
|
29
|
+
renderTableBodySchema(rows: any[]): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
30
|
+
[key: string]: any;
|
31
|
+
}>[] | JSX.Element;
|
30
32
|
renderTableFooter(options: any): JSX.Element;
|
31
33
|
getRowHeight: (row?: any, rowIndex?: number) => any;
|
32
34
|
/**
|
package/lib/table/table.css
CHANGED
@@ -1004,6 +1004,12 @@
|
|
1004
1004
|
.bk-table .bk-table-body .prepend-row {
|
1005
1005
|
transform: translateX(var(--prepend-left));
|
1006
1006
|
}
|
1007
|
+
.bk-table .bk-table-body-content.bk-stripe table tbody tr:nth-child(even) td {
|
1008
|
+
background-color: #FAFBFD;
|
1009
|
+
}
|
1010
|
+
.bk-table .bk-table-body-content.bk-stripe table tbody tr td {
|
1011
|
+
border-bottom: none;
|
1012
|
+
}
|
1007
1013
|
.bk-table .bk-fixed-bottom-border {
|
1008
1014
|
position: sticky;
|
1009
1015
|
bottom: 0;
|
@@ -1022,8 +1028,8 @@
|
|
1022
1028
|
}
|
1023
1029
|
.bk-table .bk-table-head::-webkit-scrollbar,
|
1024
1030
|
.bk-table .bk-table-body::-webkit-scrollbar {
|
1025
|
-
width:
|
1026
|
-
height:
|
1031
|
+
width: 5px;
|
1032
|
+
height: 8px;
|
1027
1033
|
}
|
1028
1034
|
.bk-table .bk-table-head::-webkit-scrollbar-thumb,
|
1029
1035
|
.bk-table .bk-table-body::-webkit-scrollbar-thumb {
|
@@ -1044,6 +1050,7 @@
|
|
1044
1050
|
width: 100%;
|
1045
1051
|
height: 100%;
|
1046
1052
|
padding-bottom: 20px;
|
1053
|
+
position: relative;
|
1047
1054
|
}
|
1048
1055
|
.bk-table .bk-table-head table,
|
1049
1056
|
.bk-table .bk-table-body table {
|
@@ -1083,6 +1090,13 @@
|
|
1083
1090
|
.bk-table .bk-table-body table td .cell.has-sort {
|
1084
1091
|
cursor: pointer;
|
1085
1092
|
}
|
1093
|
+
.bk-table .bk-table-head table th .cell.explain,
|
1094
|
+
.bk-table .bk-table-body table th .cell.explain,
|
1095
|
+
.bk-table .bk-table-head table td .cell.explain,
|
1096
|
+
.bk-table .bk-table-body table td .cell.explain {
|
1097
|
+
text-decoration-style: dashed;
|
1098
|
+
text-decoration-line: underline;
|
1099
|
+
}
|
1086
1100
|
.bk-table .bk-table-head table th .cell .head-text,
|
1087
1101
|
.bk-table .bk-table-body table th .cell .head-text,
|
1088
1102
|
.bk-table .bk-table-head table td .cell .head-text,
|
@@ -1123,7 +1137,6 @@
|
|
1123
1137
|
.bk-table .bk-table-body table td.column_fixed {
|
1124
1138
|
position: sticky;
|
1125
1139
|
z-index: 1;
|
1126
|
-
background: #fff;
|
1127
1140
|
}
|
1128
1141
|
.bk-table .bk-table-head table th.column_fixed.column_fixed_left,
|
1129
1142
|
.bk-table .bk-table-body table th.column_fixed.column_fixed_left,
|
@@ -1174,6 +1187,7 @@
|
|
1174
1187
|
.bk-table .bk-table-head table thead th,
|
1175
1188
|
.bk-table .bk-table-body table thead th {
|
1176
1189
|
font-weight: 400;
|
1190
|
+
background-color: var(--background-color);
|
1177
1191
|
}
|
1178
1192
|
.bk-table .bk-table-head table thead th .cell,
|
1179
1193
|
.bk-table .bk-table-body table thead th .cell {
|
@@ -1187,11 +1201,16 @@
|
|
1187
1201
|
.bk-table .bk-table-head table thead th:hover,
|
1188
1202
|
.bk-table .bk-table-body table thead th:hover {
|
1189
1203
|
background: #f0f1f5;
|
1204
|
+
cursor: pointer;
|
1190
1205
|
}
|
1191
1206
|
.bk-table .bk-table-head table thead th.column_fixed,
|
1192
1207
|
.bk-table .bk-table-body table thead th.column_fixed {
|
1193
1208
|
transform: translateX(var(--scroll-left));
|
1194
1209
|
}
|
1210
|
+
.bk-table .bk-table-head table tbody tr td,
|
1211
|
+
.bk-table .bk-table-body table tbody tr td {
|
1212
|
+
background-color: #fff;
|
1213
|
+
}
|
1195
1214
|
.bk-table .bk-table-head table tbody tr td.empty-cell,
|
1196
1215
|
.bk-table .bk-table-body table tbody tr td.empty-cell {
|
1197
1216
|
padding-bottom: 30px;
|
@@ -1242,7 +1261,9 @@
|
|
1242
1261
|
}
|
1243
1262
|
.bk-table .bk-table-footer {
|
1244
1263
|
height: var(--footer-height);
|
1245
|
-
|
1264
|
+
width: 100%;
|
1265
|
+
display: flex;
|
1266
|
+
align-items: center;
|
1246
1267
|
}
|
1247
1268
|
.bk-table .bk-table-footer.is-hidden {
|
1248
1269
|
display: none;
|
@@ -1292,7 +1313,9 @@
|
|
1292
1313
|
top: 0;
|
1293
1314
|
right: 0;
|
1294
1315
|
bottom: var(--footer-height);
|
1316
|
+
max-height: var(--fix-max-height);
|
1295
1317
|
left: 0;
|
1318
|
+
height: var(--fix-height);
|
1296
1319
|
pointer-events: none;
|
1297
1320
|
}
|
1298
1321
|
.bk-table .bk-table-fixed .column_fixed {
|
@@ -1331,3 +1354,6 @@
|
|
1331
1354
|
.bk-table .bk-pagination .is-last {
|
1332
1355
|
margin-left: auto;
|
1333
1356
|
}
|
1357
|
+
.bk-table .stripe-row {
|
1358
|
+
background: #FAFBFD;
|
1359
|
+
}
|