bkui-vue 0.0.2-beta.5 → 0.0.2-beta.51
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 +80 -72
- package/dist/index.esm.js +16586 -15975
- package/dist/index.umd.js +80 -72
- 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 +2 -2
- package/lib/button/index.d.ts +2 -2
- 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 +5 -20
- package/lib/cascader/index.js +1 -1
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox-group.d.ts +6 -3
- package/lib/checkbox/checkbox.d.ts +4 -4
- package/lib/checkbox/index.d.ts +22 -19
- package/lib/checkbox/index.js +1 -1
- package/lib/code-diff/index.d.ts +1 -1
- package/lib/collapse/index.d.ts +2 -2
- package/lib/collapse-transition/index.d.ts +128 -2
- package/lib/collapse-transition/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +16 -0
- package/lib/color-picker/components/recommend-colors.d.ts +16 -0
- package/lib/color-picker/index.d.ts +19 -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 +2 -2
- package/lib/container/index.js +1 -1
- package/lib/date-picker/date-picker.d.ts +3 -1
- package/lib/date-picker/index.d.ts +12 -5
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/panel/date-range.d.ts +2 -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.css +1 -0
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/dropdown/dropdown.variable.css +1 -0
- package/lib/dropdown/index.d.ts +7 -7
- package/lib/exception/index.d.ts +2 -2
- package/lib/fixed-navbar/index.d.ts +1 -1
- package/lib/form/index.d.ts +3 -3
- 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/image/index.js +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/input/index.d.ts +128 -50
- package/lib/input/index.js +2 -1
- package/lib/input/index.js.LICENSE.txt +1 -0
- package/lib/input/input.css +22 -6
- package/lib/input/input.d.ts +84 -11
- package/lib/input/input.less +37 -14
- package/lib/input/input.variable.css +22 -6
- package/lib/input/util.d.ts +6 -0
- package/lib/link/index.d.ts +4 -4
- package/lib/link/link.d.ts +1 -1
- package/lib/loading/index.d.ts +2 -2
- package/lib/locale/index.js +1 -1
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/index.d.ts +2 -2
- 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 +2 -2
- 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/components/overflow-title.d.ts +257 -1
- package/lib/overflow-title/index.d.ts +387 -2
- package/lib/overflow-title/index.js +1 -1
- package/lib/overflow-title/props.d.ts +129 -0
- package/lib/pagination/index.d.ts +2 -2
- 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.css +1 -0
- package/lib/popover/popover.d.ts +66 -30
- package/lib/popover/popover.less +3 -2
- package/lib/popover/popover.variable.css +1 -0
- 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 +23 -23
- package/lib/radio/radio-button.d.ts +4 -4
- package/lib/radio/radio-group.d.ts +4 -4
- package/lib/radio/radio.d.ts +4 -4
- 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 +4 -4
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.css +12 -0
- package/lib/resize-layout/resize-layout.d.ts +1 -1
- 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 +56 -23
- 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 +145 -69
- package/lib/select/index.js +1 -1
- package/lib/select/select.css +9 -1
- package/lib/select/select.d.ts +66 -33
- package/lib/select/select.less +11 -1
- package/lib/select/select.variable.css +9 -1
- package/lib/select/selectTagInput.d.ts +3 -0
- package/lib/shared/helper.d.ts +1 -1
- 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/popover.d.ts +2 -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 +30 -16
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.d.ts +74 -5
- package/lib/tab/index.d.ts +3 -3
- package/lib/tab/tab-nav.d.ts +12 -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 +153 -219
- package/lib/table/const.d.ts +16 -54
- package/lib/table/events.d.ts +180 -0
- package/lib/table/index.d.ts +694 -425
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.css +3 -0
- package/lib/table/plugins/head-filter.d.ts +3 -7
- package/lib/table/plugins/head-filter.less +3 -0
- package/lib/table/plugins/head-filter.variable.css +3 -0
- package/lib/table/plugins/head-sort.d.ts +3 -7
- package/lib/table/plugins/settings.d.ts +12 -26
- package/lib/table/plugins/use-column-resize.d.ts +1 -1
- package/lib/table/plugins/use-fixed-column.d.ts +3 -2
- package/lib/table/props.d.ts +191 -173
- package/lib/table/render.d.ts +6 -4
- package/lib/table/table.css +58 -4
- package/lib/table/table.d.ts +192 -90
- package/lib/table/table.less +68 -7
- package/lib/table/table.variable.css +58 -4
- package/lib/table/use-column.d.ts +51 -1
- package/lib/table/use-common.d.ts +17 -10
- package/lib/table/utils.d.ts +8 -7
- package/lib/table-column/index.d.ts +234 -527
- 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 -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 +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/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/lib/volar.components.d.ts +24 -24
- package/package.json +17 -16
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,137 @@ 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 | number | boolean | JSX.Element) | string | number | boolean;
|
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 | number | boolean | 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
|
207
|
+
export declare enum IColSortBehavior {
|
208
|
+
/**
|
209
|
+
* 列排序是相互依赖的
|
210
|
+
*/
|
211
|
+
interdependent = "interdependent",
|
212
|
+
/**
|
213
|
+
* 列排序是独立的
|
214
|
+
*/
|
215
|
+
independent = "independent"
|
216
|
+
}
|
125
217
|
export declare const tableProps: {
|
126
218
|
/**
|
127
219
|
* 渲染列表
|
@@ -153,29 +245,37 @@ export declare const tableProps: {
|
|
153
245
|
* 默认:auto 根据行数自动填充高度
|
154
246
|
* 100%,依赖初始化时父级容器高度
|
155
247
|
*/
|
156
|
-
height: import("vue-types").VueTypeDef<
|
157
|
-
default:
|
248
|
+
height: import("vue-types").VueTypeDef<StringNumber> & {
|
249
|
+
default: StringNumber;
|
250
|
+
};
|
251
|
+
/**
|
252
|
+
* 是否为斑马纹 Table
|
253
|
+
*/
|
254
|
+
stripe: import("vue-types").VueTypeValidableDef<boolean> & {
|
255
|
+
default: boolean;
|
256
|
+
} & {
|
257
|
+
default: boolean;
|
158
258
|
};
|
159
259
|
/**
|
160
260
|
* 设置表格最小高度
|
161
261
|
* 默认:300
|
162
262
|
*/
|
163
|
-
minHeight: import("vue-types").VueTypeDef<
|
164
|
-
default:
|
263
|
+
minHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
264
|
+
default: StringNumber;
|
165
265
|
};
|
166
266
|
/**
|
167
267
|
* 设置表格最d大高度
|
168
268
|
* 默认:auto,依赖外层高度
|
169
269
|
*/
|
170
|
-
maxHeight: import("vue-types").VueTypeDef<
|
171
|
-
default:
|
270
|
+
maxHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
271
|
+
default: StringNumber;
|
172
272
|
};
|
173
273
|
/**
|
174
274
|
* 行高,可以为固定数值类型
|
175
275
|
* 可以是函数,返回当前行的高度,返回值为数值类型
|
176
276
|
*/
|
177
|
-
rowHeight: import("vue-types").VueTypeDef<
|
178
|
-
default:
|
277
|
+
rowHeight: import("vue-types").VueTypeDef<RowHeightFunctionNumber> & {
|
278
|
+
default: RowHeightFunctionNumber;
|
179
279
|
};
|
180
280
|
/**
|
181
281
|
* Thead行高,可以为固定数值类型
|
@@ -196,7 +296,9 @@ export declare const tableProps: {
|
|
196
296
|
/**
|
197
297
|
* table header config
|
198
298
|
*/
|
199
|
-
thead: import("vue-types").
|
299
|
+
thead: import("vue-types").VueTypeDef<Thead> & {
|
300
|
+
default: () => Thead;
|
301
|
+
};
|
200
302
|
/**
|
201
303
|
* 是否启用虚拟渲染 & 滚动
|
202
304
|
* 当数据量很大时,启用虚拟渲染可以解决压面卡顿问题
|
@@ -251,25 +353,15 @@ export declare const tableProps: {
|
|
251
353
|
default: string;
|
252
354
|
};
|
253
355
|
/**
|
254
|
-
*
|
356
|
+
* 单元格数据为空展示
|
255
357
|
*/
|
256
|
-
|
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
|
-
});
|
358
|
+
emptyCellText: import("vue-types").VueTypeDef<any> & {
|
359
|
+
default: any;
|
272
360
|
};
|
361
|
+
/**
|
362
|
+
* bk-table-setting-content
|
363
|
+
*/
|
364
|
+
settings: import("vue-types").VueTypeDef<ISettingPropType>;
|
273
365
|
/**
|
274
366
|
* 行的 class 的回调方法,也可以使用一个固定的 Object 为所有行设置一样的 Style
|
275
367
|
*/
|
@@ -346,9 +438,7 @@ export declare const tableProps: {
|
|
346
438
|
* 当内容过长被隐藏时显示 tooltip, 此处为全局配置, 如果只配置此处,整个table都启用
|
347
439
|
* column内部可以单个配置覆盖此配置
|
348
440
|
*/
|
349
|
-
showOverflowTooltip: import("vue-types").VueTypeDef<
|
350
|
-
default: boolean | (() => IOverflowTooltip);
|
351
|
-
};
|
441
|
+
showOverflowTooltip: import("vue-types").VueTypeDef<IOverflowTooltipProp>;
|
352
442
|
/**
|
353
443
|
* 为避免不必要的数据修改导致的不可控组件更新
|
354
444
|
* 默认组件不会对传入组件的data进行任何修改
|
@@ -408,84 +498,12 @@ export declare const tableProps: {
|
|
408
498
|
prependStyle: import("vue-types").VueTypeDef<import("vue").CSSProperties> & {
|
409
499
|
default: () => import("vue").CSSProperties;
|
410
500
|
};
|
501
|
+
/**
|
502
|
+
* 列排序行为
|
503
|
+
* independent:列与列之间的排序是独立的,互斥的
|
504
|
+
* interdependent:列排序是相互影响、依赖的
|
505
|
+
*
|
506
|
+
*/
|
507
|
+
colSortBehavior: import("vue-types").VueTypeDef<IColSortBehavior>;
|
411
508
|
};
|
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
|
-
};
|
509
|
+
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
@@ -710,6 +710,7 @@
|
|
710
710
|
}
|
711
711
|
.bk-popover.bk-pop2-content .bk-pop2-arrow {
|
712
712
|
position: absolute;
|
713
|
+
z-index: -1;
|
713
714
|
width: 8px;
|
714
715
|
height: 8px;
|
715
716
|
background: #333;
|
@@ -732,6 +733,9 @@
|
|
732
733
|
cursor: pointer;
|
733
734
|
align-items: center;
|
734
735
|
}
|
736
|
+
.bk-table-head-action:last-of-type {
|
737
|
+
margin-right: -10px;
|
738
|
+
}
|
735
739
|
.bk-table-head-action.active {
|
736
740
|
color: #3a84ff;
|
737
741
|
}
|
@@ -1004,6 +1008,12 @@
|
|
1004
1008
|
.bk-table .bk-table-body .prepend-row {
|
1005
1009
|
transform: translateX(var(--prepend-left));
|
1006
1010
|
}
|
1011
|
+
.bk-table .bk-table-body-content.bk-stripe table tbody tr:nth-child(even) td {
|
1012
|
+
background-color: #FAFBFD;
|
1013
|
+
}
|
1014
|
+
.bk-table .bk-table-body-content.bk-stripe table tbody tr td {
|
1015
|
+
border-bottom: none;
|
1016
|
+
}
|
1007
1017
|
.bk-table .bk-fixed-bottom-border {
|
1008
1018
|
position: sticky;
|
1009
1019
|
bottom: 0;
|
@@ -1022,8 +1032,8 @@
|
|
1022
1032
|
}
|
1023
1033
|
.bk-table .bk-table-head::-webkit-scrollbar,
|
1024
1034
|
.bk-table .bk-table-body::-webkit-scrollbar {
|
1025
|
-
width:
|
1026
|
-
height:
|
1035
|
+
width: 5px;
|
1036
|
+
height: 8px;
|
1027
1037
|
}
|
1028
1038
|
.bk-table .bk-table-head::-webkit-scrollbar-thumb,
|
1029
1039
|
.bk-table .bk-table-body::-webkit-scrollbar-thumb {
|
@@ -1044,6 +1054,7 @@
|
|
1044
1054
|
width: 100%;
|
1045
1055
|
height: 100%;
|
1046
1056
|
padding-bottom: 20px;
|
1057
|
+
position: relative;
|
1047
1058
|
}
|
1048
1059
|
.bk-table .bk-table-head table,
|
1049
1060
|
.bk-table .bk-table-body table {
|
@@ -1083,6 +1094,13 @@
|
|
1083
1094
|
.bk-table .bk-table-body table td .cell.has-sort {
|
1084
1095
|
cursor: pointer;
|
1085
1096
|
}
|
1097
|
+
.bk-table .bk-table-head table th .cell.explain,
|
1098
|
+
.bk-table .bk-table-body table th .cell.explain,
|
1099
|
+
.bk-table .bk-table-head table td .cell.explain,
|
1100
|
+
.bk-table .bk-table-body table td .cell.explain {
|
1101
|
+
text-decoration-style: dashed;
|
1102
|
+
text-decoration-line: underline;
|
1103
|
+
}
|
1086
1104
|
.bk-table .bk-table-head table th .cell .head-text,
|
1087
1105
|
.bk-table .bk-table-body table th .cell .head-text,
|
1088
1106
|
.bk-table .bk-table-head table td .cell .head-text,
|
@@ -1123,7 +1141,6 @@
|
|
1123
1141
|
.bk-table .bk-table-body table td.column_fixed {
|
1124
1142
|
position: sticky;
|
1125
1143
|
z-index: 1;
|
1126
|
-
background: #fff;
|
1127
1144
|
}
|
1128
1145
|
.bk-table .bk-table-head table th.column_fixed.column_fixed_left,
|
1129
1146
|
.bk-table .bk-table-body table th.column_fixed.column_fixed_left,
|
@@ -1174,6 +1191,21 @@
|
|
1174
1191
|
.bk-table .bk-table-head table thead th,
|
1175
1192
|
.bk-table .bk-table-body table thead th {
|
1176
1193
|
font-weight: 400;
|
1194
|
+
background-color: var(--background-color);
|
1195
|
+
position: relative;
|
1196
|
+
}
|
1197
|
+
.bk-table .bk-table-head table thead th.col-resize-hover::after,
|
1198
|
+
.bk-table .bk-table-body table thead th.col-resize-hover::after {
|
1199
|
+
content: '';
|
1200
|
+
position: absolute;
|
1201
|
+
right: 0;
|
1202
|
+
top: 0;
|
1203
|
+
bottom: 0;
|
1204
|
+
width: 6px;
|
1205
|
+
transform: translateX(50%);
|
1206
|
+
background-color: #3785FF;
|
1207
|
+
z-index: 1;
|
1208
|
+
pointer-events: none;
|
1177
1209
|
}
|
1178
1210
|
.bk-table .bk-table-head table thead th .cell,
|
1179
1211
|
.bk-table .bk-table-body table thead th .cell {
|
@@ -1187,11 +1219,16 @@
|
|
1187
1219
|
.bk-table .bk-table-head table thead th:hover,
|
1188
1220
|
.bk-table .bk-table-body table thead th:hover {
|
1189
1221
|
background: #f0f1f5;
|
1222
|
+
cursor: pointer;
|
1190
1223
|
}
|
1191
1224
|
.bk-table .bk-table-head table thead th.column_fixed,
|
1192
1225
|
.bk-table .bk-table-body table thead th.column_fixed {
|
1193
1226
|
transform: translateX(var(--scroll-left));
|
1194
1227
|
}
|
1228
|
+
.bk-table .bk-table-head table tbody tr td,
|
1229
|
+
.bk-table .bk-table-body table tbody tr td {
|
1230
|
+
background-color: #fff;
|
1231
|
+
}
|
1195
1232
|
.bk-table .bk-table-head table tbody tr td.empty-cell,
|
1196
1233
|
.bk-table .bk-table-body table tbody tr td.empty-cell {
|
1197
1234
|
padding-bottom: 30px;
|
@@ -1217,6 +1254,16 @@
|
|
1217
1254
|
position: relative;
|
1218
1255
|
transform: translateX(var(--scroll-head-left));
|
1219
1256
|
}
|
1257
|
+
.bk-table .bk-table-head .col-resize-drag {
|
1258
|
+
position: absolute;
|
1259
|
+
right: 0;
|
1260
|
+
top: 0;
|
1261
|
+
bottom: 0;
|
1262
|
+
width: 6px;
|
1263
|
+
transform: translateX(-50%);
|
1264
|
+
background-color: #3785FF;
|
1265
|
+
z-index: 1;
|
1266
|
+
}
|
1220
1267
|
.bk-table .bk-table-head .table-head-settings {
|
1221
1268
|
position: absolute;
|
1222
1269
|
top: 0;
|
@@ -1242,7 +1289,9 @@
|
|
1242
1289
|
}
|
1243
1290
|
.bk-table .bk-table-footer {
|
1244
1291
|
height: var(--footer-height);
|
1245
|
-
|
1292
|
+
width: 100%;
|
1293
|
+
display: flex;
|
1294
|
+
align-items: center;
|
1246
1295
|
}
|
1247
1296
|
.bk-table .bk-table-footer.is-hidden {
|
1248
1297
|
display: none;
|
@@ -1292,7 +1341,9 @@
|
|
1292
1341
|
top: 0;
|
1293
1342
|
right: 0;
|
1294
1343
|
bottom: var(--footer-height);
|
1344
|
+
max-height: var(--fix-max-height);
|
1295
1345
|
left: 0;
|
1346
|
+
height: var(--fix-height);
|
1296
1347
|
pointer-events: none;
|
1297
1348
|
}
|
1298
1349
|
.bk-table .bk-table-fixed .column_fixed {
|
@@ -1331,3 +1382,6 @@
|
|
1331
1382
|
.bk-table .bk-pagination .is-last {
|
1332
1383
|
margin-left: auto;
|
1333
1384
|
}
|
1385
|
+
.bk-table .stripe-row {
|
1386
|
+
background: #FAFBFD;
|
1387
|
+
}
|