bkui-vue 0.0.2-beta.3 → 0.0.2-beta.31
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 +63 -63
- package/dist/index.cjs.source.js +45938 -0
- package/dist/index.esm.js +16922 -16471
- package/dist/index.esm.source.js +45938 -0
- package/dist/index.umd.js +61 -61
- package/dist/index.umd.source.js +45941 -0
- 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/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/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/backtop/index.js +1 -1
- package/lib/badge/badge.d.ts +3 -2
- package/lib/badge/index.d.ts +10 -7
- 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 +5 -5
- package/lib/button/button-group.d.ts +2 -2
- package/lib/button/index.d.ts +3 -3
- package/lib/button/index.js +1 -1
- package/lib/card/card.d.ts +1 -1
- package/lib/card/index.d.ts +4 -4
- 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 +8 -19
- 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 +16 -14
- package/lib/checkbox/index.js +1 -1
- package/lib/code-diff/index.d.ts +1 -1
- package/lib/collapse/index.d.ts +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 +4 -4
- package/lib/color-picker/index.js +1 -1
- package/lib/components.d.ts +1 -1
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/container/index.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 +10 -7
- 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 +11 -8
- 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 +3 -2
- package/lib/divider/divider.less +3 -4
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +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/fixed-navbar/index.js +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/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.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 +93 -57
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +12 -0
- package/lib/input/input.d.ts +48 -15
- package/lib/input/input.less +26 -5
- package/lib/input/input.variable.css +12 -0
- package/lib/link/index.d.ts +7 -4
- package/lib/link/index.js +1 -1
- package/lib/link/link.d.ts +2 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/loading/index.js +1 -1
- 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 +68 -56
- package/lib/message/message.variable.css +18 -8
- package/lib/message/messageConstructor.d.ts +33 -8
- package/lib/modal/index.d.ts +9 -9
- 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/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 +8 -8
- 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.d.ts +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 +25 -0
- package/lib/popover/index.d.ts +131 -61
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.d.ts +52 -24
- package/lib/popover/props.d.ts +23 -5
- package/lib/popover/use-floating.d.ts +2 -2
- package/lib/popover/use-popover-init.d.ts +1 -1
- package/lib/popover2/index.d.ts +1 -1
- package/lib/process/index.d.ts +1 -1
- package/lib/progress/index.d.ts +8 -8
- package/lib/progress/progress.d.ts +4 -4
- package/lib/radio/index.d.ts +4 -4
- 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 +12 -8
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +4 -3
- 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.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 +4 -1
- 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 +126 -61
- 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 +57 -31
- package/lib/select/selectTagInput.d.ts +4 -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 +8 -8
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.d.ts +3 -3
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +1 -1
- package/lib/slider/slider.less +6 -6
- package/lib/steps/index.d.ts +8 -8
- 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/swiper/index.d.ts +1 -1
- package/lib/switcher/index.d.ts +5 -5
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.d.ts +2 -2
- package/lib/tab/index.d.ts +5 -2
- package/lib/tab/index.js +1 -1
- package/lib/tab/tab-nav.d.ts +1 -0
- package/lib/tab/tab-panel.d.ts +1 -1
- package/lib/tab/tab.d.ts +1 -0
- package/lib/table/components/table-cell.d.ts +43 -11
- package/lib/table/components/table-column.d.ts +184 -208
- package/lib/table/const.d.ts +16 -54
- package/lib/table/events.d.ts +180 -0
- package/lib/table/index.d.ts +740 -421
- 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 +13 -21
- 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 +205 -170
- package/lib/table/render.d.ts +6 -4
- package/lib/table/table.css +28 -4
- package/lib/table/table.d.ts +206 -91
- package/lib/table/table.less +39 -5
- package/lib/table/table.variable.css +28 -4
- package/lib/table/use-column.d.ts +63 -1
- package/lib/table/use-common.d.ts +15 -9
- package/lib/table/utils.d.ts +1 -0
- package/lib/table-column/index.d.ts +255 -503
- package/lib/table-column/index.js +1 -1
- package/lib/tag/index.d.ts +1 -1
- package/lib/tag-input/index.d.ts +49 -28
- 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 +30 -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 +14 -7
- package/lib/time-picker/index.d.ts +10 -7
- package/lib/time-picker/time-picker.less +39 -39
- package/lib/timeline/index.d.ts +1 -1
- package/lib/transfer/index.d.ts +1 -1
- package/lib/tree/index.d.ts +4 -4
- package/lib/tree/index.js +1 -1
- package/lib/tree/tree.d.ts +11 -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/virtual-render/virtual-render.less +5 -6
- 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,60 @@ 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
|
+
popoverOption?: any;
|
52
|
+
resizerWay?: ResizerWay;
|
53
|
+
} | boolean;
|
54
|
+
export type IOverflowTooltip = IOverflowTooltipProp;
|
55
|
+
export declare const IOverflowTooltipPropType: import("vue-types").VueTypeDef<IOverflowTooltipProp> & {
|
56
|
+
default: boolean | (() => {
|
57
|
+
content: string | Function;
|
58
|
+
disabled?: boolean;
|
59
|
+
watchCellResize?: boolean;
|
60
|
+
mode?: `${OverflowModeEnum}`;
|
61
|
+
popoverOption?: any;
|
62
|
+
resizerWay?: ResizerWay;
|
63
|
+
});
|
64
|
+
};
|
65
|
+
export declare const IOverflowTooltipType: import("vue-types").VueTypeDef<IOverflowTooltipProp> & {
|
66
|
+
default: boolean | (() => {
|
67
|
+
content: string | Function;
|
68
|
+
disabled?: boolean;
|
69
|
+
watchCellResize?: boolean;
|
70
|
+
mode?: `${OverflowModeEnum}`;
|
71
|
+
popoverOption?: any;
|
72
|
+
resizerWay?: ResizerWay;
|
73
|
+
});
|
51
74
|
};
|
52
75
|
export type ISortOption = {
|
53
76
|
[key: string]: SORT_OPTION;
|
54
77
|
};
|
78
|
+
export declare const ISortType: import("vue-types").VueTypeDef<ISortPropShape> & {
|
79
|
+
default: string | boolean | (() => ISortShape);
|
80
|
+
};
|
81
|
+
export type ISortShape = {
|
82
|
+
sortFn?: Function;
|
83
|
+
sortScope?: SortScope;
|
84
|
+
value?: SORT_OPTION;
|
85
|
+
};
|
86
|
+
export type ISortPropShape = ISortShape | boolean | string;
|
87
|
+
export type IFilterShape = {
|
88
|
+
list: any[];
|
89
|
+
filterFn?: Function;
|
90
|
+
match?: FullEnum;
|
91
|
+
checked?: any[];
|
92
|
+
filterScope?: SortScope;
|
93
|
+
btnSave?: boolean | string;
|
94
|
+
btnReset?: boolean | string;
|
95
|
+
};
|
96
|
+
export type IFilterPropShape = IFilterShape | boolean | string;
|
97
|
+
export declare const IFilterType: import("vue-types").VueTypeDef<IFilterPropShape> & {
|
98
|
+
default: string | boolean | (() => IFilterShape);
|
99
|
+
};
|
55
100
|
export declare enum ColumnPickEnum {
|
56
101
|
MULTI = "multi",
|
57
102
|
SINGLE = "single",
|
@@ -61,67 +106,133 @@ export declare enum ResizerWay {
|
|
61
106
|
DEBOUNCE = "debounce",
|
62
107
|
THROTTLE = "throttle"
|
63
108
|
}
|
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
|
-
|
109
|
+
export declare const IColumnType: import("vue-types").VueTypeDef<Column> & {
|
110
|
+
default: () => Column;
|
111
|
+
};
|
112
|
+
export declare const ITableSettings: import("vue-types").VueTypeDef<ISettingPropType> & {
|
113
|
+
default: boolean | (() => Settings);
|
114
|
+
};
|
115
|
+
/**
|
116
|
+
* 配置自定义行高选项
|
117
|
+
*/
|
118
|
+
export type SizeItem = {
|
119
|
+
value?: string;
|
120
|
+
label?: string;
|
121
|
+
height?: number;
|
122
|
+
};
|
123
|
+
export type Settings = {
|
124
|
+
fields?: Field[];
|
125
|
+
checked?: string[];
|
126
|
+
limit?: number;
|
127
|
+
size?: string;
|
128
|
+
sizeList?: SizeItem[];
|
129
|
+
showLineHeight?: boolean;
|
130
|
+
};
|
131
|
+
export type ISettingPropType = Settings | boolean;
|
132
|
+
export type Field = {
|
133
|
+
label: string;
|
134
|
+
field?: string;
|
135
|
+
disabled?: boolean;
|
136
|
+
id?: string;
|
137
|
+
name?: string;
|
138
|
+
};
|
139
|
+
export type LabelFunctionString = ((_column: any, _index: any) => string | JSX.Element) | string;
|
140
|
+
export declare const LabelFunctionStringType: import("vue-types").VueTypeDef<LabelFunctionString>;
|
141
|
+
export type RenderFunctionString = ({ cell, data, row, column, index, rows, }: {
|
142
|
+
cell: any;
|
143
|
+
data: any;
|
144
|
+
row: any;
|
145
|
+
column: any;
|
146
|
+
index: any;
|
147
|
+
rows: any;
|
148
|
+
}) => string | JSX.Element;
|
149
|
+
export declare const RenderFunctionStringType: import("vue-types").VueTypeDef<RenderFunctionString>;
|
150
|
+
export type SpanFunctionString = (({ column, colIndex, row, rowIndex, }: {
|
151
|
+
column: any;
|
152
|
+
colIndex: any;
|
153
|
+
row: any;
|
154
|
+
rowIndex: any;
|
155
|
+
}) => number) | Number;
|
156
|
+
export declare const SpanFunctionStringType: import("vue-types").VueTypeDef<SpanFunctionString>;
|
157
|
+
export type RowClassFunctionString = ((row: any) => string) | string;
|
158
|
+
export declare const RowClassFunctionStringType: import("vue-types").VueTypeDef<RowClassFunctionString>;
|
159
|
+
export type RowHeightFunctionNumber = ((_type: string, _row: any, _rowIndex: number, _size?: any) => number) | number;
|
160
|
+
export declare const RowHeightFunctionNumberType: import("vue-types").VueTypeDef<RowHeightFunctionNumber>;
|
161
|
+
type FunctionNumber = Function | number;
|
162
|
+
export declare const FunctionNumberType: import("vue-types").VueTypeDef<FunctionNumber>;
|
163
|
+
type StringNumber = string | number;
|
164
|
+
export declare const StringNumberType: (val: number | string) => import("vue-types").VueTypeDef<StringNumber> & {
|
165
|
+
default: StringNumber;
|
166
|
+
};
|
167
|
+
/**
|
168
|
+
* 表格字段解释说明
|
169
|
+
*/
|
170
|
+
export type IColumnExplain = {
|
171
|
+
content: LabelFunctionString;
|
172
|
+
head: LabelFunctionString | boolean;
|
173
|
+
} | boolean;
|
174
|
+
export type Column = {
|
175
|
+
label: LabelFunctionString;
|
176
|
+
field?: LabelFunctionString;
|
177
|
+
render?: RenderFunctionString;
|
178
|
+
renderHead?: RenderFunctionString;
|
179
|
+
width?: number | string;
|
180
|
+
minWidth?: number | string;
|
181
|
+
columnKey?: string;
|
182
|
+
showOverflowTooltip?: boolean | IOverflowTooltip;
|
183
|
+
type?: string;
|
184
|
+
fixed?: string | boolean;
|
185
|
+
resizable?: boolean;
|
186
|
+
sort?: ISortShape | boolean | string;
|
187
|
+
filter?: IFilterShape | boolean | string;
|
188
|
+
colspan?: SpanFunctionString;
|
189
|
+
rowspan?: SpanFunctionString;
|
190
|
+
textAlign?: string;
|
191
|
+
className?: RowClassFunctionString;
|
192
|
+
align?: string;
|
193
|
+
prop?: LabelFunctionString;
|
194
|
+
index?: Number;
|
195
|
+
explain?: IColumnExplain;
|
196
|
+
};
|
197
|
+
export declare const IColumnProp: import("vue-types").VueTypeDef<Column> & {
|
198
|
+
default: () => Column;
|
199
|
+
};
|
200
|
+
export type Thead = {
|
201
|
+
height?: Number;
|
202
|
+
isShow?: boolean;
|
203
|
+
cellFn?: Function;
|
204
|
+
color?: IHeadColor | string;
|
205
|
+
};
|
206
|
+
export type Columns = ReadonlyArray<Column>;
|
207
|
+
export type TablePropTypes = Readonly<ExtractPropTypes<typeof tableProps>>;
|
208
|
+
export type GroupColumn = {
|
209
|
+
calcWidth?: number;
|
210
|
+
resizeWidth?: number;
|
211
|
+
isHidden?: boolean;
|
212
|
+
listeners?: Map<string, any>;
|
213
|
+
} & Column;
|
214
|
+
export type IColumnActive = {
|
215
|
+
index: number;
|
216
|
+
active: boolean;
|
217
|
+
};
|
218
|
+
export type IReactiveProp = {
|
219
|
+
activeColumns: IColumnActive[];
|
220
|
+
rowActions: Record<string, any>;
|
221
|
+
scrollTranslateY: Number;
|
222
|
+
scrollTranslateX: Number;
|
223
|
+
pos: Record<string, any>;
|
224
|
+
settings: Settings | boolean;
|
225
|
+
setting: {
|
226
|
+
size: string;
|
227
|
+
height: Number;
|
118
228
|
};
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
229
|
+
defaultSort: Record<string, any>;
|
230
|
+
};
|
231
|
+
export type Colgroups = Column & {
|
232
|
+
calcWidth: number;
|
233
|
+
resizeWidth: number;
|
234
|
+
listeners: Map<string, Function>;
|
123
235
|
};
|
124
|
-
export type TableColumnProps = Partial<ExtractPropTypes<typeof IColumnType>>;
|
125
236
|
export declare const tableProps: {
|
126
237
|
/**
|
127
238
|
* 渲染列表
|
@@ -153,29 +264,37 @@ export declare const tableProps: {
|
|
153
264
|
* 默认:auto 根据行数自动填充高度
|
154
265
|
* 100%,依赖初始化时父级容器高度
|
155
266
|
*/
|
156
|
-
height: import("vue-types").VueTypeDef<
|
157
|
-
default:
|
267
|
+
height: import("vue-types").VueTypeDef<StringNumber> & {
|
268
|
+
default: StringNumber;
|
269
|
+
};
|
270
|
+
/**
|
271
|
+
* 是否为斑马纹 Table
|
272
|
+
*/
|
273
|
+
stripe: import("vue-types").VueTypeValidableDef<boolean> & {
|
274
|
+
default: boolean;
|
275
|
+
} & {
|
276
|
+
default: boolean;
|
158
277
|
};
|
159
278
|
/**
|
160
279
|
* 设置表格最小高度
|
161
280
|
* 默认:300
|
162
281
|
*/
|
163
|
-
minHeight: import("vue-types").VueTypeDef<
|
164
|
-
default:
|
282
|
+
minHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
283
|
+
default: StringNumber;
|
165
284
|
};
|
166
285
|
/**
|
167
286
|
* 设置表格最d大高度
|
168
287
|
* 默认:auto,依赖外层高度
|
169
288
|
*/
|
170
|
-
maxHeight: import("vue-types").VueTypeDef<
|
171
|
-
default:
|
289
|
+
maxHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
290
|
+
default: StringNumber;
|
172
291
|
};
|
173
292
|
/**
|
174
293
|
* 行高,可以为固定数值类型
|
175
294
|
* 可以是函数,返回当前行的高度,返回值为数值类型
|
176
295
|
*/
|
177
|
-
rowHeight: import("vue-types").VueTypeDef<
|
178
|
-
default:
|
296
|
+
rowHeight: import("vue-types").VueTypeDef<RowHeightFunctionNumber> & {
|
297
|
+
default: RowHeightFunctionNumber;
|
179
298
|
};
|
180
299
|
/**
|
181
300
|
* Thead行高,可以为固定数值类型
|
@@ -196,7 +315,9 @@ export declare const tableProps: {
|
|
196
315
|
/**
|
197
316
|
* table header config
|
198
317
|
*/
|
199
|
-
thead: import("vue-types").
|
318
|
+
thead: import("vue-types").VueTypeDef<Thead> & {
|
319
|
+
default: () => Thead;
|
320
|
+
};
|
200
321
|
/**
|
201
322
|
* 是否启用虚拟渲染 & 滚动
|
202
323
|
* 当数据量很大时,启用虚拟渲染可以解决压面卡顿问题
|
@@ -253,22 +374,8 @@ export declare const tableProps: {
|
|
253
374
|
/**
|
254
375
|
* bk-table-setting-content
|
255
376
|
*/
|
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
|
-
});
|
377
|
+
settings: import("vue-types").VueTypeDef<ISettingPropType> & {
|
378
|
+
default: boolean | (() => Settings);
|
272
379
|
};
|
273
380
|
/**
|
274
381
|
* 行的 class 的回调方法,也可以使用一个固定的 Object 为所有行设置一样的 Style
|
@@ -346,8 +453,15 @@ export declare const tableProps: {
|
|
346
453
|
* 当内容过长被隐藏时显示 tooltip, 此处为全局配置, 如果只配置此处,整个table都启用
|
347
454
|
* column内部可以单个配置覆盖此配置
|
348
455
|
*/
|
349
|
-
showOverflowTooltip: import("vue-types").VueTypeDef<
|
350
|
-
default: boolean | (() =>
|
456
|
+
showOverflowTooltip: import("vue-types").VueTypeDef<IOverflowTooltipProp> & {
|
457
|
+
default: boolean | (() => {
|
458
|
+
content: string | Function;
|
459
|
+
disabled?: boolean;
|
460
|
+
watchCellResize?: boolean;
|
461
|
+
mode?: `${OverflowModeEnum}`;
|
462
|
+
popoverOption?: any;
|
463
|
+
resizerWay?: ResizerWay;
|
464
|
+
});
|
351
465
|
};
|
352
466
|
/**
|
353
467
|
* 为避免不必要的数据修改导致的不可控组件更新
|
@@ -409,83 +523,4 @@ export declare const tableProps: {
|
|
409
523
|
default: () => import("vue").CSSProperties;
|
410
524
|
};
|
411
525
|
};
|
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
|
-
};
|
526
|
+
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,
|
@@ -1192,6 +1205,10 @@
|
|
1192
1205
|
.bk-table .bk-table-body table thead th.column_fixed {
|
1193
1206
|
transform: translateX(var(--scroll-left));
|
1194
1207
|
}
|
1208
|
+
.bk-table .bk-table-head table tbody tr td,
|
1209
|
+
.bk-table .bk-table-body table tbody tr td {
|
1210
|
+
background-color: #fff;
|
1211
|
+
}
|
1195
1212
|
.bk-table .bk-table-head table tbody tr td.empty-cell,
|
1196
1213
|
.bk-table .bk-table-body table tbody tr td.empty-cell {
|
1197
1214
|
padding-bottom: 30px;
|
@@ -1242,7 +1259,9 @@
|
|
1242
1259
|
}
|
1243
1260
|
.bk-table .bk-table-footer {
|
1244
1261
|
height: var(--footer-height);
|
1245
|
-
|
1262
|
+
width: 100%;
|
1263
|
+
display: flex;
|
1264
|
+
align-items: center;
|
1246
1265
|
}
|
1247
1266
|
.bk-table .bk-table-footer.is-hidden {
|
1248
1267
|
display: none;
|
@@ -1292,7 +1311,9 @@
|
|
1292
1311
|
top: 0;
|
1293
1312
|
right: 0;
|
1294
1313
|
bottom: var(--footer-height);
|
1314
|
+
max-height: calc(100% - var(--footer-height));
|
1295
1315
|
left: 0;
|
1316
|
+
height: var(--fix-height);
|
1296
1317
|
pointer-events: none;
|
1297
1318
|
}
|
1298
1319
|
.bk-table .bk-table-fixed .column_fixed {
|
@@ -1331,3 +1352,6 @@
|
|
1331
1352
|
.bk-table .bk-pagination .is-last {
|
1332
1353
|
margin-left: auto;
|
1333
1354
|
}
|
1355
|
+
.bk-table .stripe-row {
|
1356
|
+
background: #FAFBFD;
|
1357
|
+
}
|