bkui-vue 0.0.2-beta.9 → 0.0.2-table-refactor.1
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 +69 -61
- package/dist/index.esm.js +15913 -15468
- package/dist/index.umd.js +69 -61
- 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 +7 -0
- package/lib/alert/alert.d.ts +5 -5
- package/lib/alert/alert.less +16 -6
- package/lib/alert/alert.variable.css +7 -0
- package/lib/alert/index.d.ts +10 -10
- 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/button.css +20 -0
- package/lib/button/button.less +105 -94
- package/lib/button/button.variable.css +20 -0
- 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 -0
- package/lib/cascader/index.d.ts +5 -2
- 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/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/index.d.ts +5 -1
- package/lib/config-provider/index.js +1 -1
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/config-provider/use-global-config.d.ts +2 -0
- package/lib/config-provider/use-prefix.d.ts +2 -0
- package/lib/container/index.d.ts +2 -2
- 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.variable.css +1 -0
- package/lib/dropdown/index.d.ts +2 -2
- 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/form/index.js +1 -1
- package/lib/hooks.d.ts +1 -1
- package/lib/hooks.js +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/image/index.js +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/input/index.d.ts +146 -50
- package/lib/input/index.js +2 -1
- package/lib/input/index.js.LICENSE.txt +1 -0
- package/lib/input/input.css +34 -6
- package/lib/input/input.d.ts +100 -11
- package/lib/input/input.less +53 -14
- package/lib/input/input.variable.css +34 -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 +33 -9
- package/lib/message/message.less +78 -54
- package/lib/message/message.variable.css +33 -9
- package/lib/message/messageConstructor.d.ts +25 -4
- 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/content.d.ts +33 -0
- package/lib/popover/index.d.ts +74 -16
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.css +1 -0
- package/lib/popover/popover.d.ts +40 -7
- package/lib/popover/popover.less +3 -2
- package/lib/popover/popover.variable.css +1 -0
- package/lib/popover/props.d.ts +25 -2
- package/lib/popover/use-floating.d.ts +1 -1
- 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 +62 -29
- 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 +23 -20
- 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 +180 -72
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +11 -0
- package/lib/select/select.css +9 -1
- package/lib/select/select.d.ts +75 -31
- package/lib/select/select.less +11 -1
- package/lib/select/select.variable.css +9 -1
- package/lib/select/selectTagInput.d.ts +8 -5
- 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/shared/vue-types.d.ts +3 -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/clearfix.css +8 -0
- package/lib/styles/mixins/clearfix.less +10 -0
- package/lib/styles/mixins/clearfix.variable.css +8 -0
- package/lib/styles/mixins/mixins.css +72 -0
- package/lib/styles/mixins/mixins.less +5 -0
- package/lib/styles/mixins/mixins.variable.css +72 -0
- 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 -24
- package/lib/table/components/table-column.d.ts +123 -81
- package/lib/table/const.d.ts +18 -2
- package/lib/table/events.d.ts +26 -26
- package/lib/table/index.d.ts +279 -294
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.css +3 -0
- package/lib/table/plugins/head-filter.less +3 -0
- package/lib/table/plugins/head-filter.variable.css +3 -0
- package/lib/table/plugins/settings.d.ts +7 -17
- package/lib/table/plugins/use-column-resize.d.ts +30 -10
- package/lib/table/plugins/use-fixed-column.d.ts +6 -5
- package/lib/table/plugins/use-pagination.d.ts +7 -4
- package/lib/table/props.d.ts +117 -58
- package/lib/table/render.d.ts +7 -17
- package/lib/table/table.css +79 -10
- package/lib/table/table.d.ts +95 -72
- package/lib/table/table.less +55 -20
- package/lib/table/table.variable.css +79 -10
- package/lib/table/use-attributes.d.ts +55 -0
- package/lib/table/use-column.d.ts +175 -49
- package/lib/table/use-common.d.ts +1608 -88
- package/lib/table/use-render.d.ts +11 -0
- package/lib/table/utils.d.ts +30 -29
- package/lib/table-column/index.d.ts +235 -405
- package/lib/table-column/index.js +1 -1
- package/lib/tag/index.d.ts +10 -10
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag-input/index.d.ts +49 -7
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/tag-input.css +6 -1
- package/lib/tag-input/tag-input.d.ts +46 -6
- package/lib/tag-input/tag-input.less +9 -4
- package/lib/tag-input/tag-input.variable.css +6 -1
- package/lib/tag-input/tag-props.d.ts +16 -2
- 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/constant.d.ts +2 -2
- package/lib/tree/index.d.ts +37 -7
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +8 -1
- package/lib/tree/tree.d.ts +20 -2
- package/lib/tree/use-node-action.d.ts +3 -2
- package/lib/tree/use-node-attribute.d.ts +15 -8
- package/lib/tree/use-tree-init.d.ts +1 -2
- package/lib/tree/util.d.ts +7 -2
- package/lib/upload/index.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +43 -1
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +15 -0
- package/lib/virtual-render/v-virtual-render.d.ts +1 -0
- package/lib/virtual-render/virtual-render.d.ts +27 -2
- package/lib/volar.components.d.ts +24 -24
- package/package.json +17 -16
package/lib/table/props.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ExtractPropTypes
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
2
2
|
import { IHeadColor, ROW_HOVER, SORT_OPTION } from './const';
|
3
3
|
export declare enum SortScope {
|
4
4
|
CURRENT = "current",
|
@@ -43,35 +43,20 @@ 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 IOverflowTooltip = {
|
47
|
-
content: string | Function;
|
48
|
-
disabled?: boolean;
|
49
|
-
watchCellResize?: boolean;
|
50
|
-
mode?: `${OverflowModeEnum}`;
|
51
|
-
};
|
52
46
|
export type IOverflowTooltipProp = {
|
53
47
|
content: string | Function;
|
54
|
-
disabled?: boolean;
|
48
|
+
disabled?: (col: Column, row: any) => boolean | boolean;
|
55
49
|
watchCellResize?: boolean;
|
56
50
|
mode?: `${OverflowModeEnum}`;
|
51
|
+
popoverOption?: any;
|
52
|
+
resizerWay?: ResizerWay;
|
57
53
|
} | boolean;
|
58
|
-
export
|
59
|
-
|
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
|
-
};
|
54
|
+
export type IOverflowTooltip = IOverflowTooltipProp;
|
55
|
+
export declare const IOverflowTooltipPropType: import("vue-types").VueTypeDef<IOverflowTooltipProp>;
|
69
56
|
export type ISortOption = {
|
70
57
|
[key: string]: SORT_OPTION;
|
71
58
|
};
|
72
|
-
export declare const ISortType: import("vue-types").VueTypeDef<ISortPropShape
|
73
|
-
default: string | boolean | (() => ISortShape);
|
74
|
-
};
|
59
|
+
export declare const ISortType: import("vue-types").VueTypeDef<ISortPropShape>;
|
75
60
|
export type ISortShape = {
|
76
61
|
sortFn?: Function;
|
77
62
|
sortScope?: SortScope;
|
@@ -86,11 +71,10 @@ export type IFilterShape = {
|
|
86
71
|
filterScope?: SortScope;
|
87
72
|
btnSave?: boolean | string;
|
88
73
|
btnReset?: boolean | string;
|
74
|
+
maxHeight?: number;
|
89
75
|
};
|
90
76
|
export type IFilterPropShape = IFilterShape | boolean | string;
|
91
|
-
export declare const IFilterType: import("vue-types").VueTypeDef<IFilterPropShape
|
92
|
-
default: string | boolean | (() => IFilterShape);
|
93
|
-
};
|
77
|
+
export declare const IFilterType: import("vue-types").VueTypeDef<IFilterPropShape>;
|
94
78
|
export declare enum ColumnPickEnum {
|
95
79
|
MULTI = "multi",
|
96
80
|
SINGLE = "single",
|
@@ -101,9 +85,7 @@ export declare enum ResizerWay {
|
|
101
85
|
THROTTLE = "throttle"
|
102
86
|
}
|
103
87
|
export declare const IColumnType: import("vue-types").VueTypeDef<Column>;
|
104
|
-
export declare const ITableSettings: import("vue-types").VueTypeDef<ISettingPropType
|
105
|
-
default: boolean | (() => Settings);
|
106
|
-
};
|
88
|
+
export declare const ITableSettings: import("vue-types").VueTypeDef<ISettingPropType>;
|
107
89
|
/**
|
108
90
|
* 配置自定义行高选项
|
109
91
|
*/
|
@@ -128,10 +110,46 @@ export type Field = {
|
|
128
110
|
id?: string;
|
129
111
|
name?: string;
|
130
112
|
};
|
113
|
+
export type LabelFunctionString = ((_column: any, _index: any) => string | number | boolean | JSX.Element) | string | number | boolean;
|
114
|
+
export declare const LabelFunctionStringType: import("vue-types").VueTypeDef<LabelFunctionString>;
|
115
|
+
export type RenderFunctionString = ({ cell, data, row, column, index, rows, }: {
|
116
|
+
cell: any;
|
117
|
+
data: any;
|
118
|
+
row: any;
|
119
|
+
column: any;
|
120
|
+
index: any;
|
121
|
+
rows: any;
|
122
|
+
}) => string | number | boolean | JSX.Element;
|
123
|
+
export declare const RenderFunctionStringType: import("vue-types").VueTypeDef<RenderFunctionString>;
|
124
|
+
export type SpanFunctionString = (({ column, colIndex, row, rowIndex }: {
|
125
|
+
column: any;
|
126
|
+
colIndex: any;
|
127
|
+
row: any;
|
128
|
+
rowIndex: any;
|
129
|
+
}) => number) | Number;
|
130
|
+
export declare const SpanFunctionStringType: import("vue-types").VueTypeDef<SpanFunctionString>;
|
131
|
+
export type RowClassFunctionString = ((row: any) => string) | string;
|
132
|
+
export declare const RowClassFunctionStringType: import("vue-types").VueTypeDef<RowClassFunctionString>;
|
133
|
+
export type RowHeightFunctionNumber = ((_type: string, _row: any, _rowIndex: number, _size?: any) => number) | number;
|
134
|
+
export declare const RowHeightFunctionNumberType: import("vue-types").VueTypeDef<RowHeightFunctionNumber>;
|
135
|
+
type FunctionNumber = Function | number;
|
136
|
+
export declare const FunctionNumberType: import("vue-types").VueTypeDef<FunctionNumber>;
|
137
|
+
type StringNumber = string | number;
|
138
|
+
export declare const StringNumberType: (val: number | string) => import("vue-types").VueTypeDef<StringNumber> & {
|
139
|
+
default: StringNumber;
|
140
|
+
};
|
141
|
+
/**
|
142
|
+
* 表格字段解释说明
|
143
|
+
*/
|
144
|
+
export type IColumnExplain = {
|
145
|
+
content: LabelFunctionString;
|
146
|
+
head: LabelFunctionString | boolean;
|
147
|
+
} | boolean;
|
131
148
|
export type Column = {
|
132
|
-
label:
|
133
|
-
field?:
|
134
|
-
render?:
|
149
|
+
label: LabelFunctionString;
|
150
|
+
field?: LabelFunctionString;
|
151
|
+
render?: RenderFunctionString;
|
152
|
+
renderHead?: RenderFunctionString;
|
135
153
|
width?: number | string;
|
136
154
|
minWidth?: number | string;
|
137
155
|
columnKey?: string;
|
@@ -141,17 +159,16 @@ export type Column = {
|
|
141
159
|
resizable?: boolean;
|
142
160
|
sort?: ISortShape | boolean | string;
|
143
161
|
filter?: IFilterShape | boolean | string;
|
144
|
-
colspan?:
|
145
|
-
rowspan?:
|
146
|
-
textAlign?:
|
147
|
-
className?:
|
162
|
+
colspan?: SpanFunctionString;
|
163
|
+
rowspan?: SpanFunctionString;
|
164
|
+
textAlign?: string;
|
165
|
+
className?: RowClassFunctionString;
|
148
166
|
align?: string;
|
149
|
-
prop?:
|
167
|
+
prop?: LabelFunctionString;
|
150
168
|
index?: Number;
|
169
|
+
explain?: IColumnExplain;
|
151
170
|
};
|
152
|
-
export declare const IColumnProp: import("vue-types").VueTypeDef<Column
|
153
|
-
default: () => Column;
|
154
|
-
};
|
171
|
+
export declare const IColumnProp: import("vue-types").VueTypeDef<Column>;
|
155
172
|
export type Thead = {
|
156
173
|
height?: Number;
|
157
174
|
isShow?: boolean;
|
@@ -188,6 +205,16 @@ export type Colgroups = Column & {
|
|
188
205
|
resizeWidth: number;
|
189
206
|
listeners: Map<string, Function>;
|
190
207
|
};
|
208
|
+
export declare enum IColSortBehavior {
|
209
|
+
/**
|
210
|
+
* 列排序是相互依赖的
|
211
|
+
*/
|
212
|
+
interdependent = "interdependent",
|
213
|
+
/**
|
214
|
+
* 列与列之间的排序是独立的,互斥的
|
215
|
+
*/
|
216
|
+
independent = "independent"
|
217
|
+
}
|
191
218
|
export declare const tableProps: {
|
192
219
|
/**
|
193
220
|
* 渲染列表
|
@@ -219,8 +246,8 @@ export declare const tableProps: {
|
|
219
246
|
* 默认:auto 根据行数自动填充高度
|
220
247
|
* 100%,依赖初始化时父级容器高度
|
221
248
|
*/
|
222
|
-
height: import("vue-types").VueTypeDef<
|
223
|
-
default:
|
249
|
+
height: import("vue-types").VueTypeDef<StringNumber> & {
|
250
|
+
default: StringNumber;
|
224
251
|
};
|
225
252
|
/**
|
226
253
|
* 是否为斑马纹 Table
|
@@ -234,22 +261,22 @@ export declare const tableProps: {
|
|
234
261
|
* 设置表格最小高度
|
235
262
|
* 默认:300
|
236
263
|
*/
|
237
|
-
minHeight: import("vue-types").VueTypeDef<
|
238
|
-
default:
|
264
|
+
minHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
265
|
+
default: StringNumber;
|
239
266
|
};
|
240
267
|
/**
|
241
268
|
* 设置表格最d大高度
|
242
269
|
* 默认:auto,依赖外层高度
|
243
270
|
*/
|
244
|
-
maxHeight: import("vue-types").VueTypeDef<
|
245
|
-
default:
|
271
|
+
maxHeight: import("vue-types").VueTypeDef<StringNumber> & {
|
272
|
+
default: StringNumber;
|
246
273
|
};
|
247
274
|
/**
|
248
275
|
* 行高,可以为固定数值类型
|
249
276
|
* 可以是函数,返回当前行的高度,返回值为数值类型
|
250
277
|
*/
|
251
|
-
rowHeight: import("vue-types").VueTypeDef<
|
252
|
-
default:
|
278
|
+
rowHeight: import("vue-types").VueTypeDef<RowHeightFunctionNumber> & {
|
279
|
+
default: RowHeightFunctionNumber;
|
253
280
|
};
|
254
281
|
/**
|
255
282
|
* Thead行高,可以为固定数值类型
|
@@ -320,6 +347,14 @@ export declare const tableProps: {
|
|
320
347
|
} & {
|
321
348
|
default: boolean;
|
322
349
|
};
|
350
|
+
/**
|
351
|
+
* 是否支持跨页全选
|
352
|
+
*/
|
353
|
+
acrossAll: import("vue-types").VueTypeValidableDef<boolean> & {
|
354
|
+
default: boolean;
|
355
|
+
} & {
|
356
|
+
default: boolean;
|
357
|
+
};
|
323
358
|
/**
|
324
359
|
* 空数据展示
|
325
360
|
*/
|
@@ -327,11 +362,15 @@ export declare const tableProps: {
|
|
327
362
|
default: string;
|
328
363
|
};
|
329
364
|
/**
|
330
|
-
*
|
365
|
+
* 单元格数据为空展示
|
331
366
|
*/
|
332
|
-
|
333
|
-
default:
|
367
|
+
emptyCellText: import("vue-types").VueTypeDef<any> & {
|
368
|
+
default: any;
|
334
369
|
};
|
370
|
+
/**
|
371
|
+
* bk-table-setting-content
|
372
|
+
*/
|
373
|
+
settings: import("vue-types").VueTypeDef<ISettingPropType>;
|
335
374
|
/**
|
336
375
|
* 行的 class 的回调方法,也可以使用一个固定的 Object 为所有行设置一样的 Style
|
337
376
|
*/
|
@@ -385,6 +424,17 @@ export declare const tableProps: {
|
|
385
424
|
} & {
|
386
425
|
default: string;
|
387
426
|
};
|
427
|
+
/**
|
428
|
+
* 默认选中行
|
429
|
+
* 仅对设置了selection的情况下生效
|
430
|
+
* 值可以为 [key1, key2, key3, ...] 或者 [row1, row2, row3, ...]
|
431
|
+
* 如果设置为key,则 selectionKey 必须设置,内部匹配逻辑为:row[selectionKey] === key
|
432
|
+
*/
|
433
|
+
checked: import("vue-types").VueTypeValidableDef<unknown[]> & {
|
434
|
+
default: () => unknown[];
|
435
|
+
} & {
|
436
|
+
default: () => unknown[];
|
437
|
+
};
|
388
438
|
/**
|
389
439
|
* 提供自定义判定当前行是否选中
|
390
440
|
* 如果设置了此属性,其他判定均不生效
|
@@ -408,14 +458,7 @@ export declare const tableProps: {
|
|
408
458
|
* 当内容过长被隐藏时显示 tooltip, 此处为全局配置, 如果只配置此处,整个table都启用
|
409
459
|
* column内部可以单个配置覆盖此配置
|
410
460
|
*/
|
411
|
-
showOverflowTooltip: import("vue-types").VueTypeDef<IOverflowTooltipProp
|
412
|
-
default: boolean | (() => {
|
413
|
-
content: string | Function;
|
414
|
-
disabled?: boolean;
|
415
|
-
watchCellResize?: boolean;
|
416
|
-
mode?: `${OverflowModeEnum}`;
|
417
|
-
});
|
418
|
-
};
|
461
|
+
showOverflowTooltip: import("vue-types").VueTypeDef<IOverflowTooltipProp>;
|
419
462
|
/**
|
420
463
|
* 为避免不必要的数据修改导致的不可控组件更新
|
421
464
|
* 默认组件不会对传入组件的data进行任何修改
|
@@ -475,4 +518,20 @@ export declare const tableProps: {
|
|
475
518
|
prependStyle: import("vue-types").VueTypeDef<import("vue").CSSProperties> & {
|
476
519
|
default: () => import("vue").CSSProperties;
|
477
520
|
};
|
521
|
+
/**
|
522
|
+
* 列排序行为
|
523
|
+
* independent:列与列之间的排序是独立的,互斥的
|
524
|
+
* interdependent:列排序是相互影响、依赖的
|
525
|
+
*
|
526
|
+
*/
|
527
|
+
colSortBehavior: import("vue-types").VueTypeDef<IColSortBehavior>;
|
528
|
+
/**
|
529
|
+
* 是否采用flex布局表格
|
530
|
+
*/
|
531
|
+
isFlex: import("vue-types").VueTypeValidableDef<boolean> & {
|
532
|
+
default: boolean;
|
533
|
+
} & {
|
534
|
+
default: boolean;
|
535
|
+
};
|
478
536
|
};
|
537
|
+
export {};
|
package/lib/table/render.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { ComputedRef, Ref, SetupContext } from 'vue';
|
2
2
|
import type { Language } from '../locale';
|
3
3
|
import { TablePlugins } from './plugins';
|
4
|
-
import {
|
4
|
+
import { Column, TablePropTypes } from './props';
|
5
|
+
import { ITableFormatData, ITableResponse } from './use-attributes';
|
5
6
|
export default class TableRender {
|
6
7
|
props: TablePropTypes;
|
7
8
|
context: SetupContext;
|
8
|
-
|
9
|
-
colgroups: GroupColumn[];
|
9
|
+
tableResp: ITableResponse;
|
10
10
|
uuid: string;
|
11
11
|
events: Map<string, any[]>;
|
12
12
|
styleRef: ComputedRef<{
|
@@ -15,8 +15,9 @@ export default class TableRender {
|
|
15
15
|
t: ComputedRef<Language['table']>;
|
16
16
|
activeSortIndex: Ref<number>;
|
17
17
|
plugins: TablePlugins;
|
18
|
-
constructor(props: any, ctx: any,
|
19
|
-
get
|
18
|
+
constructor(props: any, ctx: any, tableResp: ITableResponse, styleRef: any, t: ComputedRef<Language['table']>);
|
19
|
+
get formatData(): ITableFormatData;
|
20
|
+
get columns(): Column[];
|
20
21
|
/**
|
21
22
|
* 渲染Table Head
|
22
23
|
*/
|
@@ -38,12 +39,6 @@ export default class TableRender {
|
|
38
39
|
*/
|
39
40
|
on(eventName: string, watcher: Function): this;
|
40
41
|
destroy(): void;
|
41
|
-
/**
|
42
|
-
* 派发事件
|
43
|
-
* @param eventName
|
44
|
-
* @param args
|
45
|
-
*/
|
46
|
-
private emitEvent;
|
47
42
|
private handlePageLimitChange;
|
48
43
|
private handlePageChange;
|
49
44
|
/**
|
@@ -51,7 +46,7 @@ export default class TableRender {
|
|
51
46
|
* @param index 指定选中的列Index
|
52
47
|
* @param single 是否重置其他列,当只允许选中一列的情况下需要先重置
|
53
48
|
*/
|
54
|
-
private
|
49
|
+
private getSortFnByColumn;
|
55
50
|
/**
|
56
51
|
* 点击选中一列事件
|
57
52
|
* @param index 当前选中列Index
|
@@ -123,7 +118,6 @@ export default class TableRender {
|
|
123
118
|
* @param colIndex 指定列Index
|
124
119
|
* @returns
|
125
120
|
*/
|
126
|
-
private isColActive;
|
127
121
|
/**
|
128
122
|
* 渲染表格Col分组
|
129
123
|
* @returns
|
@@ -133,8 +127,4 @@ export default class TableRender {
|
|
133
127
|
* 过滤当前可渲染的列
|
134
128
|
*/
|
135
129
|
private get filterColGroups();
|
136
|
-
/**
|
137
|
-
* 当前Table Setting
|
138
|
-
*/
|
139
|
-
private get setting();
|
140
130
|
}
|
package/lib/table/table.css
CHANGED
@@ -178,6 +178,11 @@
|
|
178
178
|
border-color: #5594fa;
|
179
179
|
color: white;
|
180
180
|
}
|
181
|
+
.bk-button.bk-button-primary.is-outline:active {
|
182
|
+
background-color: #2c77f4;
|
183
|
+
border-color: #2c77f4;
|
184
|
+
color: white;
|
185
|
+
}
|
181
186
|
.bk-button.bk-button-primary.is-text {
|
182
187
|
color: #3a84ff;
|
183
188
|
background-color: transparent;
|
@@ -224,6 +229,11 @@
|
|
224
229
|
border-color: #ffb848;
|
225
230
|
color: white;
|
226
231
|
}
|
232
|
+
.bk-button.bk-button-warning.is-outline:active {
|
233
|
+
background-color: #eb9000;
|
234
|
+
border-color: #eb9000;
|
235
|
+
color: white;
|
236
|
+
}
|
227
237
|
.bk-button.bk-button-warning.is-text {
|
228
238
|
color: #ff9c01;
|
229
239
|
background-color: transparent;
|
@@ -270,6 +280,11 @@
|
|
270
280
|
border-color: #45e35f;
|
271
281
|
color: white;
|
272
282
|
}
|
283
|
+
.bk-button.bk-button-success.is-outline:active {
|
284
|
+
background-color: #1ab943;
|
285
|
+
border-color: #1ab943;
|
286
|
+
color: white;
|
287
|
+
}
|
273
288
|
.bk-button.bk-button-success.is-text {
|
274
289
|
color: #2dcb56;
|
275
290
|
background-color: transparent;
|
@@ -316,6 +331,11 @@
|
|
316
331
|
border-color: #ff5656;
|
317
332
|
color: white;
|
318
333
|
}
|
334
|
+
.bk-button.bk-button-danger.is-outline:active {
|
335
|
+
background-color: #db2626;
|
336
|
+
border-color: #db2626;
|
337
|
+
color: white;
|
338
|
+
}
|
319
339
|
.bk-button.bk-button-danger.is-text {
|
320
340
|
color: #ea3636;
|
321
341
|
background-color: transparent;
|
@@ -710,6 +730,7 @@
|
|
710
730
|
}
|
711
731
|
.bk-popover.bk-pop2-content .bk-pop2-arrow {
|
712
732
|
position: absolute;
|
733
|
+
z-index: -1;
|
713
734
|
width: 8px;
|
714
735
|
height: 8px;
|
715
736
|
background: #333;
|
@@ -732,6 +753,9 @@
|
|
732
753
|
cursor: pointer;
|
733
754
|
align-items: center;
|
734
755
|
}
|
756
|
+
.bk-table-head-action:last-of-type {
|
757
|
+
margin-right: -10px;
|
758
|
+
}
|
735
759
|
.bk-table-head-action.active {
|
736
760
|
color: #3a84ff;
|
737
761
|
}
|
@@ -985,6 +1009,15 @@
|
|
985
1009
|
height: auto;
|
986
1010
|
overflow: hidden;
|
987
1011
|
}
|
1012
|
+
.bk-table-flex {
|
1013
|
+
display: flex;
|
1014
|
+
flex-direction: column;
|
1015
|
+
max-height: 100%;
|
1016
|
+
}
|
1017
|
+
.bk-table-flex .bk-table-body {
|
1018
|
+
flex: 1;
|
1019
|
+
overflow: auto;
|
1020
|
+
}
|
988
1021
|
.bk-table.has-scroll-y .bk-table-head {
|
989
1022
|
padding-right: 4px;
|
990
1023
|
}
|
@@ -993,7 +1026,7 @@
|
|
993
1026
|
overflow: auto;
|
994
1027
|
}
|
995
1028
|
.bk-table .bk-table-body::-webkit-scrollbar {
|
996
|
-
width:
|
1029
|
+
width: 5px;
|
997
1030
|
height: 6px;
|
998
1031
|
}
|
999
1032
|
.bk-table .bk-table-body::-webkit-scrollbar-thumb {
|
@@ -1028,8 +1061,8 @@
|
|
1028
1061
|
}
|
1029
1062
|
.bk-table .bk-table-head::-webkit-scrollbar,
|
1030
1063
|
.bk-table .bk-table-body::-webkit-scrollbar {
|
1031
|
-
width:
|
1032
|
-
height:
|
1064
|
+
width: 5px;
|
1065
|
+
height: 5px;
|
1033
1066
|
}
|
1034
1067
|
.bk-table .bk-table-head::-webkit-scrollbar-thumb,
|
1035
1068
|
.bk-table .bk-table-body::-webkit-scrollbar-thumb {
|
@@ -1066,7 +1099,6 @@
|
|
1066
1099
|
height: var(--row-height);
|
1067
1100
|
min-width: 30px;
|
1068
1101
|
clear: both;
|
1069
|
-
background-color: #fff;
|
1070
1102
|
}
|
1071
1103
|
.bk-table .bk-table-head table th.expand-row .expand-btn-action,
|
1072
1104
|
.bk-table .bk-table-body table th.expand-row .expand-btn-action,
|
@@ -1091,6 +1123,13 @@
|
|
1091
1123
|
.bk-table .bk-table-body table td .cell.has-sort {
|
1092
1124
|
cursor: pointer;
|
1093
1125
|
}
|
1126
|
+
.bk-table .bk-table-head table th .cell.explain,
|
1127
|
+
.bk-table .bk-table-body table th .cell.explain,
|
1128
|
+
.bk-table .bk-table-head table td .cell.explain,
|
1129
|
+
.bk-table .bk-table-body table td .cell.explain {
|
1130
|
+
text-decoration-style: dashed;
|
1131
|
+
text-decoration-line: underline;
|
1132
|
+
}
|
1094
1133
|
.bk-table .bk-table-head table th .cell .head-text,
|
1095
1134
|
.bk-table .bk-table-body table th .cell .head-text,
|
1096
1135
|
.bk-table .bk-table-head table td .cell .head-text,
|
@@ -1181,6 +1220,21 @@
|
|
1181
1220
|
.bk-table .bk-table-head table thead th,
|
1182
1221
|
.bk-table .bk-table-body table thead th {
|
1183
1222
|
font-weight: 400;
|
1223
|
+
background-color: var(--background-color);
|
1224
|
+
position: relative;
|
1225
|
+
}
|
1226
|
+
.bk-table .bk-table-head table thead th.col-resize-hover::after,
|
1227
|
+
.bk-table .bk-table-body table thead th.col-resize-hover::after {
|
1228
|
+
content: '';
|
1229
|
+
position: absolute;
|
1230
|
+
right: 0;
|
1231
|
+
top: 0;
|
1232
|
+
bottom: 0;
|
1233
|
+
width: 6px;
|
1234
|
+
transform: translateX(50%);
|
1235
|
+
background-color: #3785FF;
|
1236
|
+
z-index: 1;
|
1237
|
+
pointer-events: none;
|
1184
1238
|
}
|
1185
1239
|
.bk-table .bk-table-head table thead th .cell,
|
1186
1240
|
.bk-table .bk-table-body table thead th .cell {
|
@@ -1194,11 +1248,16 @@
|
|
1194
1248
|
.bk-table .bk-table-head table thead th:hover,
|
1195
1249
|
.bk-table .bk-table-body table thead th:hover {
|
1196
1250
|
background: #f0f1f5;
|
1251
|
+
cursor: pointer;
|
1197
1252
|
}
|
1198
1253
|
.bk-table .bk-table-head table thead th.column_fixed,
|
1199
1254
|
.bk-table .bk-table-body table thead th.column_fixed {
|
1200
1255
|
transform: translateX(var(--scroll-left));
|
1201
1256
|
}
|
1257
|
+
.bk-table .bk-table-head table tbody tr td,
|
1258
|
+
.bk-table .bk-table-body table tbody tr td {
|
1259
|
+
background-color: #fff;
|
1260
|
+
}
|
1202
1261
|
.bk-table .bk-table-head table tbody tr td.empty-cell,
|
1203
1262
|
.bk-table .bk-table-body table tbody tr td.empty-cell {
|
1204
1263
|
padding-bottom: 30px;
|
@@ -1224,6 +1283,16 @@
|
|
1224
1283
|
position: relative;
|
1225
1284
|
transform: translateX(var(--scroll-head-left));
|
1226
1285
|
}
|
1286
|
+
.bk-table .bk-table-head .col-resize-drag {
|
1287
|
+
position: absolute;
|
1288
|
+
right: 0;
|
1289
|
+
top: 0;
|
1290
|
+
bottom: 0;
|
1291
|
+
width: 6px;
|
1292
|
+
transform: translateX(-50%);
|
1293
|
+
background-color: #3785FF;
|
1294
|
+
z-index: 1;
|
1295
|
+
}
|
1227
1296
|
.bk-table .bk-table-head .table-head-settings {
|
1228
1297
|
position: absolute;
|
1229
1298
|
top: 0;
|
@@ -1247,12 +1316,11 @@
|
|
1247
1316
|
width: 1rem;
|
1248
1317
|
height: 1rem;
|
1249
1318
|
}
|
1250
|
-
.bk-table .bk-table-head .bk-table-fixed .column_fixed.column_fixed_right.shadow {
|
1251
|
-
box-shadow: -2px 2px 10px 0px rgba(0, 0, 0, 0.12);
|
1252
|
-
}
|
1253
1319
|
.bk-table .bk-table-footer {
|
1254
1320
|
height: var(--footer-height);
|
1255
|
-
|
1321
|
+
width: 100%;
|
1322
|
+
display: flex;
|
1323
|
+
align-items: center;
|
1256
1324
|
}
|
1257
1325
|
.bk-table .bk-table-footer.is-hidden {
|
1258
1326
|
display: none;
|
@@ -1301,13 +1369,14 @@
|
|
1301
1369
|
position: absolute;
|
1302
1370
|
top: 0;
|
1303
1371
|
right: 0;
|
1304
|
-
bottom:
|
1372
|
+
bottom: var(--footer-height);
|
1373
|
+
max-height: var(--fix-max-height);
|
1305
1374
|
left: 0;
|
1375
|
+
height: var(--fix-height);
|
1306
1376
|
pointer-events: none;
|
1307
1377
|
}
|
1308
1378
|
.bk-table .bk-table-fixed .column_fixed {
|
1309
1379
|
position: absolute;
|
1310
|
-
transform: translate(var(--var-scroll-left), var(--var-scroll-top));
|
1311
1380
|
}
|
1312
1381
|
.bk-table .bk-table-fixed .column_fixed.column_fixed_left {
|
1313
1382
|
top: 0;
|