bkui-vue 0.0.2-beta.2 → 0.0.2-beta.20

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