bkui-vue 0.0.2-beta.2 → 0.0.2-beta.20
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 +65 -65
- package/dist/index.esm.js +16959 -16663
- package/dist/index.umd.js +63 -63
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/index.js +1 -1
- package/lib/alert/alert.css +1 -0
- package/lib/alert/alert.less +119 -119
- package/lib/alert/alert.variable.css +1 -0
- package/lib/backtop/index.js +1 -1
- package/lib/badge/badge.d.ts +1 -0
- package/lib/badge/index.d.ts +3 -0
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts +4 -4
- package/lib/button/button-group.d.ts +2 -2
- package/lib/button/index.d.ts +2 -2
- package/lib/button/index.js +1 -1
- package/lib/cascader/cascader-panel.d.ts +1 -0
- package/lib/cascader/cascader.d.ts +2 -12
- package/lib/cascader/cascader.less +4 -4
- package/lib/cascader/index.d.ts +7 -18
- package/lib/cascader/index.js +1 -1
- package/lib/checkbox/checkbox-group.d.ts +3 -1
- package/lib/checkbox/checkbox.d.ts +8 -8
- package/lib/checkbox/index.d.ts +15 -13
- package/lib/checkbox/index.js +1 -1
- package/lib/collapse-transition/collapse-transition.d.ts +1 -0
- package/lib/collapse-transition/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +1 -1
- package/lib/color-picker/index.d.ts +3 -3
- package/lib/color-picker/index.js +1 -1
- package/lib/components.d.ts +1 -1
- package/lib/container/index.js +1 -1
- package/lib/date-picker/base/confirm.d.ts +1 -0
- package/lib/date-picker/base/date-table.d.ts +1 -0
- package/lib/date-picker/base/month-table.d.ts +1 -0
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -0
- package/lib/date-picker/base/time-spinner.d.ts +2 -1
- package/lib/date-picker/base/year-table.d.ts +1 -0
- package/lib/date-picker/date-picker.d.ts +3 -2
- package/lib/date-picker/index.d.ts +9 -6
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/panel/date-range.d.ts +1 -0
- package/lib/date-picker/panel/date.d.ts +1 -0
- package/lib/date-picker/panel/time-range.d.ts +3 -2
- package/lib/date-picker/panel/time.d.ts +3 -2
- package/lib/date-picker/time-picker.d.ts +3 -2
- package/lib/dialog/dialog.d.ts +4 -3
- package/lib/dialog/index.d.ts +10 -7
- package/lib/dialog/index.js +1 -1
- package/lib/dialog/props.d.ts +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +1 -0
- package/lib/divider/divider.less +3 -4
- package/lib/divider/index.js +1 -1
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/dropdown/index.d.ts +5 -5
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/image/image-viewer.less +5 -3
- package/lib/image/image-viewer.variable.css +122 -0
- package/lib/image/image.css +142 -0
- package/lib/image/image.d.ts +0 -1
- package/lib/image/image.less +4 -1
- package/lib/image/image.variable.css +264 -0
- package/lib/image/index.js +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/input/index.d.ts +74 -56
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +12 -0
- package/lib/input/input.d.ts +29 -13
- package/lib/input/input.less +26 -5
- package/lib/input/input.variable.css +12 -0
- package/lib/link/index.d.ts +3 -0
- package/lib/link/index.js +1 -1
- package/lib/link/link.d.ts +1 -0
- package/lib/loading/index.js +1 -1
- package/lib/message/index.js +1 -1
- package/lib/message/message.css +16 -8
- package/lib/message/message.less +66 -56
- package/lib/message/message.variable.css +16 -8
- package/lib/message/messageConstructor.d.ts +9 -6
- package/lib/modal/index.d.ts +8 -8
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +3 -3
- package/lib/modal/props.mixin.d.ts +1 -1
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/pagination/index.d.ts +7 -7
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.d.ts +4 -4
- package/lib/plugin-popover/index.js +1 -1
- package/lib/pop-confirm/index.js +1 -1
- package/lib/pop-confirm/pop-confirm.less +9 -8
- package/lib/popover/const.d.ts +22 -9
- package/lib/popover/content.d.ts +1 -0
- package/lib/popover/index.d.ts +84 -57
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.d.ts +26 -23
- package/lib/popover/props.d.ts +5 -5
- package/lib/popover/use-floating.d.ts +1 -1
- package/lib/progress/index.d.ts +7 -7
- package/lib/progress/progress.d.ts +4 -4
- package/lib/radio/index.d.ts +3 -3
- package/lib/radio/radio-button.d.ts +3 -3
- package/lib/radio/radio-group.d.ts +1 -1
- package/lib/radio/radio.less +1 -1
- package/lib/rate/index.d.ts +4 -4
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +2 -2
- package/lib/rate/rate.less +5 -3
- package/lib/rate/rate.variable.css +122 -0
- package/lib/rate/star.less +6 -4
- package/lib/rate/star.variable.css +122 -0
- package/lib/resize-layout/index.js +1 -1
- package/lib/search-select/index.d.ts +3 -0
- package/lib/search-select/index.js +1 -1
- package/lib/search-select/search-select.d.ts +1 -0
- package/lib/search-select/utils.d.ts +1 -0
- package/lib/select/index.d.ts +26 -39
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +1 -0
- package/lib/select/optionGroup.d.ts +1 -0
- package/lib/select/select.d.ts +11 -20
- package/lib/select/selectTagInput.d.ts +1 -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/shared/vue-types.d.ts +2 -2
- package/lib/sideslider/index.d.ts +7 -7
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.d.ts +3 -3
- package/lib/slider/index.js +1 -1
- package/lib/slider/slider.less +6 -6
- package/lib/steps/index.d.ts +7 -7
- package/lib/steps/index.js +1 -1
- package/lib/steps/steps.d.ts +4 -4
- package/lib/styles/index.d.ts +2 -0
- package/lib/styles/mixins/popper.less +6 -5
- package/lib/styles/reset.less +4 -2
- package/lib/styles/reset.variable.css +122 -0
- package/lib/switcher/index.d.ts +4 -4
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.d.ts +2 -2
- package/lib/tab/index.d.ts +3 -0
- package/lib/tab/index.js +1 -1
- package/lib/tab/tab-nav.d.ts +1 -0
- package/lib/tab/tab.d.ts +1 -0
- package/lib/table/components/table-cell.d.ts +15 -6
- package/lib/table/components/table-column.d.ts +136 -228
- package/lib/table/const.d.ts +17 -55
- package/lib/table/events.d.ts +180 -0
- package/lib/table/index.d.ts +697 -440
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.d.ts +6 -5
- package/lib/table/plugins/head-filter.less +5 -7
- package/lib/table/plugins/head-sort.d.ts +6 -5
- package/lib/table/plugins/settings.d.ts +8 -12
- package/lib/table/plugins/settings.less +3 -3
- package/lib/table/plugins/use-fixed-column.d.ts +3 -2
- package/lib/table/props.d.ts +185 -169
- package/lib/table/render.d.ts +6 -4
- package/lib/table/table.css +11 -1
- package/lib/table/table.d.ts +202 -91
- package/lib/table/table.less +26 -1
- package/lib/table/table.variable.css +11 -1
- package/lib/table/use-column.d.ts +51 -1
- package/lib/table/use-common.d.ts +13 -9
- package/lib/table/utils.d.ts +1 -0
- package/lib/table-column/index.d.ts +182 -562
- package/lib/table-column/index.js +1 -1
- package/lib/tag-input/index.d.ts +15 -27
- package/lib/tag-input/tag-input.css +1 -1
- package/lib/tag-input/tag-input.d.ts +8 -16
- 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 +3 -7
- package/lib/time-picker/index.d.ts +9 -6
- package/lib/time-picker/time-picker.less +39 -39
- package/lib/tree/index.d.ts +3 -3
- package/lib/tree/index.js +1 -1
- package/lib/tree/tree.d.ts +1 -1
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/virtual-render.less +5 -6
- package/package.json +1 -1
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",
|
@@ -49,9 +49,48 @@ export type IOverflowTooltip = {
|
|
49
49
|
watchCellResize?: boolean;
|
50
50
|
mode?: `${OverflowModeEnum}`;
|
51
51
|
};
|
52
|
+
export type IOverflowTooltipProp = {
|
53
|
+
content: string | Function;
|
54
|
+
disabled?: boolean;
|
55
|
+
watchCellResize?: boolean;
|
56
|
+
mode?: `${OverflowModeEnum}`;
|
57
|
+
} | boolean;
|
58
|
+
export declare const IOverflowTooltipPropType: import("vue-types").VueTypeDef<IOverflowTooltipProp> & {
|
59
|
+
default: boolean | (() => {
|
60
|
+
content: string | Function;
|
61
|
+
disabled?: boolean;
|
62
|
+
watchCellResize?: boolean;
|
63
|
+
mode?: `${OverflowModeEnum}`;
|
64
|
+
});
|
65
|
+
};
|
66
|
+
export declare const IOverflowTooltipType: import("vue-types").VueTypeDef<IOverflowTooltip> & {
|
67
|
+
default: () => IOverflowTooltip;
|
68
|
+
};
|
52
69
|
export type ISortOption = {
|
53
70
|
[key: string]: SORT_OPTION;
|
54
71
|
};
|
72
|
+
export declare const ISortType: import("vue-types").VueTypeDef<ISortPropShape> & {
|
73
|
+
default: string | boolean | (() => ISortShape);
|
74
|
+
};
|
75
|
+
export type ISortShape = {
|
76
|
+
sortFn?: Function;
|
77
|
+
sortScope?: SortScope;
|
78
|
+
value?: SORT_OPTION;
|
79
|
+
};
|
80
|
+
export type ISortPropShape = ISortShape | boolean | string;
|
81
|
+
export type IFilterShape = {
|
82
|
+
list: any[];
|
83
|
+
filterFn?: Function;
|
84
|
+
match?: FullEnum;
|
85
|
+
checked?: any[];
|
86
|
+
filterScope?: SortScope;
|
87
|
+
btnSave?: boolean | string;
|
88
|
+
btnReset?: boolean | string;
|
89
|
+
};
|
90
|
+
export type IFilterPropShape = IFilterShape | boolean | string;
|
91
|
+
export declare const IFilterType: import("vue-types").VueTypeDef<IFilterPropShape> & {
|
92
|
+
default: string | boolean | (() => IFilterShape);
|
93
|
+
};
|
55
94
|
export declare enum ColumnPickEnum {
|
56
95
|
MULTI = "multi",
|
57
96
|
SINGLE = "single",
|
@@ -61,67 +100,122 @@ export declare enum ResizerWay {
|
|
61
100
|
DEBOUNCE = "debounce",
|
62
101
|
THROTTLE = "throttle"
|
63
102
|
}
|
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
|
-
|
103
|
+
export declare const IColumnType: import("vue-types").VueTypeDef<Column> & {
|
104
|
+
default: () => Column;
|
105
|
+
};
|
106
|
+
export declare const ITableSettings: import("vue-types").VueTypeDef<ISettingPropType> & {
|
107
|
+
default: boolean | (() => Settings);
|
108
|
+
};
|
109
|
+
/**
|
110
|
+
* 配置自定义行高选项
|
111
|
+
*/
|
112
|
+
export type SizeItem = {
|
113
|
+
value?: string;
|
114
|
+
label?: string;
|
115
|
+
height?: number;
|
116
|
+
};
|
117
|
+
export type Settings = {
|
118
|
+
fields?: Field[];
|
119
|
+
checked?: string[];
|
120
|
+
limit?: number;
|
121
|
+
size?: string;
|
122
|
+
sizeList?: SizeItem[];
|
123
|
+
showLineHeight?: boolean;
|
124
|
+
};
|
125
|
+
export type ISettingPropType = Settings | boolean;
|
126
|
+
export type Field = {
|
127
|
+
label: string;
|
128
|
+
field?: string;
|
129
|
+
disabled?: boolean;
|
130
|
+
id?: string;
|
131
|
+
name?: string;
|
132
|
+
};
|
133
|
+
export type LabelFunctionString = (_column: any, _index: any) => string | string;
|
134
|
+
export declare const LabelFunctionStringType: import("vue-types").VueTypeDef<LabelFunctionString>;
|
135
|
+
export type RenderFunctionString = ({ cell, data, row, column, index, rows, }: {
|
136
|
+
cell: any;
|
137
|
+
data: any;
|
138
|
+
row: any;
|
139
|
+
column: any;
|
140
|
+
index: any;
|
141
|
+
rows: any;
|
142
|
+
}) => any;
|
143
|
+
export declare const RenderFunctionStringType: import("vue-types").VueTypeDef<RenderFunctionString>;
|
144
|
+
export type SpanFunctionString = ({ column, colIndex, row, rowIndex, }: {
|
145
|
+
column: any;
|
146
|
+
colIndex: any;
|
147
|
+
row: any;
|
148
|
+
rowIndex: any;
|
149
|
+
}) => number | Number;
|
150
|
+
export declare const SpanFunctionStringType: import("vue-types").VueTypeDef<SpanFunctionString>;
|
151
|
+
export type RowClassFunctionString = (row: any) => string | string;
|
152
|
+
export declare const RowClassFunctionStringType: import("vue-types").VueTypeDef<RowClassFunctionString>;
|
153
|
+
export type RowHeightFunctionNumber = (_type: string, _row: any, _rowIndex: number, _size?: any) => number | number;
|
154
|
+
export declare const RowHeightFunctionNumberType: import("vue-types").VueTypeDef<RowHeightFunctionNumber>;
|
155
|
+
type FunctionNumber = Function | number;
|
156
|
+
export declare const FunctionNumberType: import("vue-types").VueTypeDef<FunctionNumber>;
|
157
|
+
type StringNumber = string | number;
|
158
|
+
export declare const StringNumberType: import("vue-types").VueTypeDef<StringNumber>;
|
159
|
+
export type Column = {
|
160
|
+
label: LabelFunctionString;
|
161
|
+
field?: LabelFunctionString;
|
162
|
+
render?: RenderFunctionString;
|
163
|
+
width?: number | string;
|
164
|
+
minWidth?: number | string;
|
165
|
+
columnKey?: string;
|
166
|
+
showOverflowTooltip?: boolean | IOverflowTooltip;
|
167
|
+
type?: string;
|
168
|
+
fixed?: string | boolean;
|
169
|
+
resizable?: boolean;
|
170
|
+
sort?: ISortShape | boolean | string;
|
171
|
+
filter?: IFilterShape | boolean | string;
|
172
|
+
colspan?: SpanFunctionString;
|
173
|
+
rowspan?: SpanFunctionString;
|
174
|
+
textAlign?: string;
|
175
|
+
className?: RowClassFunctionString;
|
176
|
+
align?: string;
|
177
|
+
prop?: LabelFunctionString;
|
178
|
+
index?: Number;
|
179
|
+
};
|
180
|
+
export declare const IColumnProp: import("vue-types").VueTypeDef<Column> & {
|
181
|
+
default: () => Column;
|
182
|
+
};
|
183
|
+
export type Thead = {
|
184
|
+
height?: Number;
|
185
|
+
isShow?: boolean;
|
186
|
+
cellFn?: Function;
|
187
|
+
color?: IHeadColor | string;
|
188
|
+
};
|
189
|
+
export type Columns = ReadonlyArray<Column>;
|
190
|
+
export type TablePropTypes = Readonly<ExtractPropTypes<typeof tableProps>>;
|
191
|
+
export type GroupColumn = {
|
192
|
+
calcWidth?: number;
|
193
|
+
resizeWidth?: number;
|
194
|
+
isHidden?: boolean;
|
195
|
+
listeners?: Map<string, any>;
|
196
|
+
} & Column;
|
197
|
+
export type IColumnActive = {
|
198
|
+
index: number;
|
199
|
+
active: boolean;
|
200
|
+
};
|
201
|
+
export type IReactiveProp = {
|
202
|
+
activeColumns: IColumnActive[];
|
203
|
+
rowActions: Record<string, any>;
|
204
|
+
scrollTranslateY: Number;
|
205
|
+
scrollTranslateX: Number;
|
206
|
+
pos: Record<string, any>;
|
207
|
+
settings: Settings | boolean;
|
208
|
+
setting: {
|
209
|
+
size: string;
|
210
|
+
height: Number;
|
118
211
|
};
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
212
|
+
defaultSort: Record<string, any>;
|
213
|
+
};
|
214
|
+
export type Colgroups = Column & {
|
215
|
+
calcWidth: number;
|
216
|
+
resizeWidth: number;
|
217
|
+
listeners: Map<string, Function>;
|
123
218
|
};
|
124
|
-
export type TableColumnProps = Partial<ExtractPropTypes<typeof IColumnType>>;
|
125
219
|
export declare const tableProps: {
|
126
220
|
/**
|
127
221
|
* 渲染列表
|
@@ -153,29 +247,37 @@ export declare const tableProps: {
|
|
153
247
|
* 默认:auto 根据行数自动填充高度
|
154
248
|
* 100%,依赖初始化时父级容器高度
|
155
249
|
*/
|
156
|
-
height: import("vue-types").VueTypeDef<
|
157
|
-
default:
|
250
|
+
height: import("vue-types").VueTypeDef<StringNumber> & {
|
251
|
+
default: StringNumber;
|
252
|
+
};
|
253
|
+
/**
|
254
|
+
* 是否为斑马纹 Table
|
255
|
+
*/
|
256
|
+
stripe: import("vue-types").VueTypeValidableDef<boolean> & {
|
257
|
+
default: boolean;
|
258
|
+
} & {
|
259
|
+
default: boolean;
|
158
260
|
};
|
159
261
|
/**
|
160
262
|
* 设置表格最小高度
|
161
263
|
* 默认:300
|
162
264
|
*/
|
163
|
-
minHeight: import("vue-types").VueTypeDef<
|
164
|
-
default:
|
265
|
+
minHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
266
|
+
default: StringNumber;
|
165
267
|
};
|
166
268
|
/**
|
167
269
|
* 设置表格最d大高度
|
168
270
|
* 默认:auto,依赖外层高度
|
169
271
|
*/
|
170
|
-
maxHeight: import("vue-types").VueTypeDef<
|
171
|
-
default:
|
272
|
+
maxHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
273
|
+
default: StringNumber;
|
172
274
|
};
|
173
275
|
/**
|
174
276
|
* 行高,可以为固定数值类型
|
175
277
|
* 可以是函数,返回当前行的高度,返回值为数值类型
|
176
278
|
*/
|
177
|
-
rowHeight: import("vue-types").VueTypeDef<
|
178
|
-
default:
|
279
|
+
rowHeight: import("vue-types").VueTypeDef<RowHeightFunctionNumber> & {
|
280
|
+
default: RowHeightFunctionNumber;
|
179
281
|
};
|
180
282
|
/**
|
181
283
|
* Thead行高,可以为固定数值类型
|
@@ -196,7 +298,9 @@ export declare const tableProps: {
|
|
196
298
|
/**
|
197
299
|
* table header config
|
198
300
|
*/
|
199
|
-
thead: import("vue-types").
|
301
|
+
thead: import("vue-types").VueTypeDef<Thead> & {
|
302
|
+
default: () => Thead;
|
303
|
+
};
|
200
304
|
/**
|
201
305
|
* 是否启用虚拟渲染 & 滚动
|
202
306
|
* 当数据量很大时,启用虚拟渲染可以解决压面卡顿问题
|
@@ -253,22 +357,8 @@ export declare const tableProps: {
|
|
253
357
|
/**
|
254
358
|
* bk-table-setting-content
|
255
359
|
*/
|
256
|
-
settings: import("vue-types").VueTypeDef<
|
257
|
-
|
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
|
-
});
|
360
|
+
settings: import("vue-types").VueTypeDef<ISettingPropType> & {
|
361
|
+
default: boolean | (() => Settings);
|
272
362
|
};
|
273
363
|
/**
|
274
364
|
* 行的 class 的回调方法,也可以使用一个固定的 Object 为所有行设置一样的 Style
|
@@ -346,8 +436,13 @@ export declare const tableProps: {
|
|
346
436
|
* 当内容过长被隐藏时显示 tooltip, 此处为全局配置, 如果只配置此处,整个table都启用
|
347
437
|
* column内部可以单个配置覆盖此配置
|
348
438
|
*/
|
349
|
-
showOverflowTooltip: import("vue-types").VueTypeDef<
|
350
|
-
default: boolean | (() =>
|
439
|
+
showOverflowTooltip: import("vue-types").VueTypeDef<IOverflowTooltipProp> & {
|
440
|
+
default: boolean | (() => {
|
441
|
+
content: string | Function;
|
442
|
+
disabled?: boolean;
|
443
|
+
watchCellResize?: boolean;
|
444
|
+
mode?: `${OverflowModeEnum}`;
|
445
|
+
});
|
351
446
|
};
|
352
447
|
/**
|
353
448
|
* 为避免不必要的数据修改导致的不可控组件更新
|
@@ -409,83 +504,4 @@ export declare const tableProps: {
|
|
409
504
|
default: () => import("vue").CSSProperties;
|
410
505
|
};
|
411
506
|
};
|
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
|
-
};
|
507
|
+
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;
|
@@ -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 {
|
@@ -1059,6 +1066,7 @@
|
|
1059
1066
|
height: var(--row-height);
|
1060
1067
|
min-width: 30px;
|
1061
1068
|
clear: both;
|
1069
|
+
background-color: #fff;
|
1062
1070
|
}
|
1063
1071
|
.bk-table .bk-table-head table th.expand-row .expand-btn-action,
|
1064
1072
|
.bk-table .bk-table-body table th.expand-row .expand-btn-action,
|
@@ -1123,7 +1131,6 @@
|
|
1123
1131
|
.bk-table .bk-table-body table td.column_fixed {
|
1124
1132
|
position: sticky;
|
1125
1133
|
z-index: 1;
|
1126
|
-
background: #fff;
|
1127
1134
|
}
|
1128
1135
|
.bk-table .bk-table-head table th.column_fixed.column_fixed_left,
|
1129
1136
|
.bk-table .bk-table-body table th.column_fixed.column_fixed_left,
|
@@ -1331,3 +1338,6 @@
|
|
1331
1338
|
.bk-table .bk-pagination .is-last {
|
1332
1339
|
margin-left: auto;
|
1333
1340
|
}
|
1341
|
+
.bk-table .stripe-row {
|
1342
|
+
background: #FAFBFD;
|
1343
|
+
}
|