bkui-vue 0.0.2-beta.4 → 0.0.2-beta.40

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