@gx-design-vue/pro-table 0.2.0-beta.1 → 0.2.0-beta.100
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/ProTable.d.ts +218 -648
- package/dist/_utils/ant-design-vue/index.d.ts +4 -1
- package/dist/_utils/ant-design-vue/input/typings.d.ts +1 -0
- package/dist/_utils/ant-design-vue/spin/typings.d.ts +1 -0
- package/dist/_utils/ant-design-vue/table/props.d.ts +33 -2
- package/dist/_utils/ant-design-vue/table/typings.d.ts +6 -5
- package/dist/_utils/ant-design-vue/tooltip/typings.d.ts +1 -0
- package/dist/_utils/index.d.ts +1 -2
- package/dist/components/ColumnSetting/index.d.ts +31 -7
- package/dist/components/ColumnSetting/style.d.ts +3 -0
- package/dist/components/Form/dateFormat.d.ts +20 -0
- package/dist/components/Form/index.d.ts +39 -22
- package/dist/components/Form/style.d.ts +3 -0
- package/dist/components/ListToolBar/index.d.ts +21 -22
- package/dist/components/ListToolBar/style.d.ts +3 -0
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -2
- package/dist/components/ToolBar/index.d.ts +20 -21
- package/dist/context/TableContext.d.ts +16 -14
- package/dist/hooks/tryOnActivated.d.ts +2 -0
- package/dist/hooks/useColumnSetting.d.ts +6 -6
- package/dist/hooks/useColums.d.ts +92 -11
- package/dist/hooks/useDebounceFn.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +19 -16
- package/dist/hooks/useLoading.d.ts +5 -12
- package/dist/hooks/usePagination.d.ts +8 -3
- package/dist/hooks/useRowSelection.d.ts +11 -8
- package/dist/hooks/useTable.d.ts +38 -11
- package/dist/hooks/useTableForm.d.ts +6 -6
- package/dist/hooks/useTableScroll.d.ts +11 -11
- package/dist/hooks/useTableSize.d.ts +2 -2
- package/dist/index.d.ts +6 -11
- package/dist/pro-table.js +2836 -0
- package/dist/pro-table.umd.cjs +1 -0
- package/dist/props.d.ts +88 -296
- package/dist/style.d.ts +3 -0
- package/dist/types/ColumnTypings.d.ts +34 -16
- package/dist/types/SlotsTypings.d.ts +42 -9
- package/dist/types/TableTypings.d.ts +117 -70
- package/dist/utils/utils.d.ts +4 -1
- package/package.json +21 -46
- package/volar.d.ts +3 -3
- package/dist/_utils/typings.d.ts +0 -9
- package/dist/components/ColumnSetting/style.less +0 -93
- package/dist/components/Form/style.less +0 -35
- package/dist/components/ListToolBar/style.less +0 -63
- package/dist/components/ToolBar/style.less +0 -16
- package/dist/design/ant-design-theme.less +0 -3
- package/dist/design/ant-design-vue.less +0 -19
- package/dist/design/config.less +0 -2
- package/dist/pro-table.mjs +0 -22942
- package/dist/pro-table.umd.js +0 -97
- package/dist/proTable.less +0 -5
- package/dist/style/index.less +0 -186
- package/dist/style/table.less +0 -34
- package/dist/style.css +0 -1
- package/dist/style.less +0 -3
- package/dist/typing.d.ts +0 -1
- package/dist/utils/config.d.ts +0 -1
package/dist/props.d.ts
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
|
-
import type { SearchConfig } from './types/TableTypings';
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { ProTableProps, ProTableRowSelection, SearchConfig } from './types/TableTypings';
|
|
3
3
|
export declare const proTableProps: {
|
|
4
4
|
rowSelection: {
|
|
5
|
-
type: PropType<
|
|
6
|
-
defaultSelectKeys: (string | number)[];
|
|
7
|
-
defaultSelectRows: any[];
|
|
8
|
-
}) | undefined>;
|
|
5
|
+
type: PropType<ProTableRowSelection>;
|
|
9
6
|
default: undefined;
|
|
10
7
|
};
|
|
11
8
|
columns: {
|
|
12
|
-
type: PropType<
|
|
9
|
+
type: PropType<ProTableProps["columns"]>;
|
|
13
10
|
default: never[];
|
|
14
11
|
};
|
|
15
12
|
pagination: {
|
|
16
|
-
type: PropType<
|
|
13
|
+
type: PropType<ProTableProps["pagination"]>;
|
|
17
14
|
default: () => undefined;
|
|
18
15
|
};
|
|
19
16
|
rowKey: {
|
|
20
|
-
type: PropType<string
|
|
21
|
-
default:
|
|
17
|
+
type: PropType<string>;
|
|
18
|
+
default: string;
|
|
22
19
|
};
|
|
23
20
|
/**
|
|
24
21
|
* @Author gx12358
|
|
@@ -27,19 +24,21 @@ export declare const proTableProps: {
|
|
|
27
24
|
* @description 获取 dataSource 的方法
|
|
28
25
|
*/
|
|
29
26
|
request: {
|
|
30
|
-
type: PropType<
|
|
27
|
+
type: PropType<ProTableProps["request"]>;
|
|
31
28
|
default: null;
|
|
32
29
|
};
|
|
33
|
-
virtualScroll: PropType<
|
|
34
|
-
params:
|
|
35
|
-
|
|
30
|
+
virtualScroll: PropType<ProTableProps["virtualScroll"]>;
|
|
31
|
+
params: {
|
|
32
|
+
type: PropType<ProTableProps["params"]>;
|
|
33
|
+
default: () => {};
|
|
34
|
+
};
|
|
36
35
|
waitRequest: {
|
|
37
|
-
type: PropType<
|
|
36
|
+
type: PropType<ProTableProps["waitRequest"]>;
|
|
38
37
|
default: boolean;
|
|
39
38
|
};
|
|
40
|
-
polling: PropType<
|
|
39
|
+
polling: PropType<ProTableProps["polling"]>;
|
|
41
40
|
debounceTime: {
|
|
42
|
-
type: PropType<
|
|
41
|
+
type: PropType<ProTableProps["debounceTime"]>;
|
|
43
42
|
default: number;
|
|
44
43
|
};
|
|
45
44
|
/**
|
|
@@ -49,11 +48,11 @@ export declare const proTableProps: {
|
|
|
49
48
|
* @description 是否显示搜索表单,传入对象时为搜索表单的配置
|
|
50
49
|
*/
|
|
51
50
|
search: {
|
|
52
|
-
type: PropType<
|
|
51
|
+
type: PropType<ProTableProps["search"]>;
|
|
53
52
|
default: () => SearchConfig;
|
|
54
53
|
};
|
|
55
54
|
searchMap: {
|
|
56
|
-
type: PropType<
|
|
55
|
+
type: PropType<ProTableProps["searchMap"]>;
|
|
57
56
|
default: () => never[];
|
|
58
57
|
};
|
|
59
58
|
/**
|
|
@@ -63,24 +62,24 @@ export declare const proTableProps: {
|
|
|
63
62
|
* @description 自定义表格渲染模式:默认表格展示,也可以自定义数据列表展示
|
|
64
63
|
*/
|
|
65
64
|
customRender: {
|
|
66
|
-
type: PropType<
|
|
65
|
+
type: PropType<ProTableProps["customRender"]>;
|
|
67
66
|
default: () => undefined;
|
|
68
67
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
emptyText: {
|
|
69
|
+
type: PropType<ProTableProps["emptyText"]>;
|
|
70
|
+
default: () => undefined;
|
|
71
|
+
};
|
|
72
|
+
showLoading: {
|
|
73
|
+
type: PropType<ProTableProps["showLoading"]>;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
76
|
+
tableProps: {
|
|
77
|
+
type: PropType<ProTableProps["tableProps"]>;
|
|
78
|
+
default: () => ProTableProps["tableProps"];
|
|
79
|
+
};
|
|
80
|
+
emptyTextProps: {
|
|
81
|
+
type: PropType<ProTableProps["emptyTextProps"]>;
|
|
82
|
+
default: () => ProTableProps["emptyTextProps"];
|
|
84
83
|
};
|
|
85
84
|
/**
|
|
86
85
|
* @Author gx12358
|
|
@@ -89,19 +88,19 @@ export declare const proTableProps: {
|
|
|
89
88
|
* @description 渲染按钮工具栏,支持返回一个 dom 数组,会自动增加 margin-right
|
|
90
89
|
*/
|
|
91
90
|
toolBarBtn: {
|
|
92
|
-
type: PropType<
|
|
91
|
+
type: PropType<ProTableProps["toolBarBtn"]>;
|
|
93
92
|
default: () => undefined;
|
|
94
93
|
};
|
|
95
94
|
headerTitle: {
|
|
96
|
-
type: PropType<
|
|
95
|
+
type: PropType<ProTableProps["headerTitle"]>;
|
|
97
96
|
default: () => undefined;
|
|
98
97
|
};
|
|
99
98
|
titleTip: {
|
|
100
|
-
type: PropType<
|
|
99
|
+
type: PropType<ProTableProps["titleTip"]>;
|
|
101
100
|
default: () => undefined;
|
|
102
101
|
};
|
|
103
102
|
titleTipText: {
|
|
104
|
-
type: PropType<
|
|
103
|
+
type: PropType<ProTableProps["titleTipText"]>;
|
|
105
104
|
default: string;
|
|
106
105
|
};
|
|
107
106
|
/**
|
|
@@ -111,7 +110,7 @@ export declare const proTableProps: {
|
|
|
111
110
|
* @description table 工具栏,设为 false 时不显示
|
|
112
111
|
*/
|
|
113
112
|
options: {
|
|
114
|
-
type: PropType<
|
|
113
|
+
type: PropType<ProTableProps["options"]>;
|
|
115
114
|
default: boolean;
|
|
116
115
|
};
|
|
117
116
|
/**
|
|
@@ -121,10 +120,10 @@ export declare const proTableProps: {
|
|
|
121
120
|
* @description 列状态配置,可以配置是否浮动和是否展示
|
|
122
121
|
*/
|
|
123
122
|
columnsState: {
|
|
124
|
-
type: PropType<
|
|
123
|
+
type: PropType<ProTableProps["columnsState"]>;
|
|
125
124
|
};
|
|
126
125
|
optionsExtra: {
|
|
127
|
-
type: PropType<
|
|
126
|
+
type: PropType<ProTableProps["optionsExtra"]>;
|
|
128
127
|
default: () => undefined;
|
|
129
128
|
};
|
|
130
129
|
/**
|
|
@@ -134,9 +133,13 @@ export declare const proTableProps: {
|
|
|
134
133
|
* @description 列设置额外的元素
|
|
135
134
|
*/
|
|
136
135
|
settingExtra: {
|
|
137
|
-
type: PropType<
|
|
136
|
+
type: PropType<ProTableProps["settingExtra"]>;
|
|
138
137
|
default: () => undefined;
|
|
139
138
|
};
|
|
139
|
+
keepAliveReload: {
|
|
140
|
+
type: PropType<ProTableProps["keepAliveReload"]>;
|
|
141
|
+
default: boolean;
|
|
142
|
+
};
|
|
140
143
|
/**
|
|
141
144
|
* @Author gx12358
|
|
142
145
|
* @DateTime 2022/2/8
|
|
@@ -144,7 +147,17 @@ export declare const proTableProps: {
|
|
|
144
147
|
* @description 是否展示序号栏
|
|
145
148
|
*/
|
|
146
149
|
showIndex: {
|
|
147
|
-
type: PropType<
|
|
150
|
+
type: PropType<ProTableProps["showIndex"]>;
|
|
151
|
+
default: boolean;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* @Author gx12358
|
|
155
|
+
* @DateTime 2024/11/15
|
|
156
|
+
* @lastTime 2024/11/15
|
|
157
|
+
* @description 是否已card分割
|
|
158
|
+
*/
|
|
159
|
+
cardBordered: {
|
|
160
|
+
type: PropType<ProTableProps["showIndex"]>;
|
|
148
161
|
default: boolean;
|
|
149
162
|
};
|
|
150
163
|
/**
|
|
@@ -154,7 +167,7 @@ export declare const proTableProps: {
|
|
|
154
167
|
* @description 翻页item设置
|
|
155
168
|
*/
|
|
156
169
|
pageItemRender: {
|
|
157
|
-
type: PropType<
|
|
170
|
+
type: PropType<ProTableProps["pageItemRender"]>;
|
|
158
171
|
default: () => undefined;
|
|
159
172
|
};
|
|
160
173
|
/**
|
|
@@ -164,7 +177,7 @@ export declare const proTableProps: {
|
|
|
164
177
|
* @description 表格大小
|
|
165
178
|
*/
|
|
166
179
|
size: {
|
|
167
|
-
type: PropType<"
|
|
180
|
+
type: PropType<ProTableProps["size"]>;
|
|
168
181
|
default: string;
|
|
169
182
|
};
|
|
170
183
|
/**
|
|
@@ -174,26 +187,16 @@ export declare const proTableProps: {
|
|
|
174
187
|
* @description 表格全局对齐方式
|
|
175
188
|
*/
|
|
176
189
|
align: {
|
|
177
|
-
type: PropType<
|
|
190
|
+
type: PropType<ProTableProps["align"]>;
|
|
178
191
|
default: string;
|
|
179
192
|
};
|
|
180
|
-
/**
|
|
181
|
-
* @Author gx12358
|
|
182
|
-
* @DateTime 2022/2/8
|
|
183
|
-
* @lastTime 2022/2/8
|
|
184
|
-
* @description 是否展示外边框和列边框
|
|
185
|
-
*/
|
|
186
|
-
bordered: {
|
|
187
|
-
type: PropType<boolean | undefined>;
|
|
188
|
-
default: boolean;
|
|
189
|
-
};
|
|
190
193
|
/**
|
|
191
194
|
* @Author gx12358
|
|
192
195
|
* @DateTime 2022/2/8
|
|
193
196
|
* @lastTime 2022/2/8
|
|
194
197
|
* @description 是否列拖动
|
|
195
198
|
*/
|
|
196
|
-
draggabled: PropType<
|
|
199
|
+
draggabled: PropType<ProTableProps["draggabled"]>;
|
|
197
200
|
/**
|
|
198
201
|
* @Author gx12358
|
|
199
202
|
* @DateTime 2022/2/8
|
|
@@ -201,7 +204,7 @@ export declare const proTableProps: {
|
|
|
201
204
|
* @description 根据屏幕大小或者scrollBreakpoint或者scroll?.x是否存在判断action列是否固定
|
|
202
205
|
*/
|
|
203
206
|
autoScroll: {
|
|
204
|
-
type: PropType<
|
|
207
|
+
type: PropType<ProTableProps["autoScroll"]>;
|
|
205
208
|
default: boolean;
|
|
206
209
|
};
|
|
207
210
|
/**
|
|
@@ -210,21 +213,21 @@ export declare const proTableProps: {
|
|
|
210
213
|
* @lastTime 2022/2/8
|
|
211
214
|
* @description 滚动断点支持数字(屏幕宽度);也支持md、xl,xxl等
|
|
212
215
|
*/
|
|
213
|
-
scrollBreakpoint: PropType<
|
|
216
|
+
scrollBreakpoint: PropType<ProTableProps["scrollBreakpoint"]>;
|
|
214
217
|
/**
|
|
215
218
|
* @Author gx12358
|
|
216
219
|
* @DateTime 2022/2/8
|
|
217
220
|
* @lastTime 2022/2/8
|
|
218
221
|
* @description modalTable时,自动固定滚动高度
|
|
219
222
|
*/
|
|
220
|
-
modalScroll: PropType<
|
|
223
|
+
modalScroll: PropType<ProTableProps["modalScroll"]>;
|
|
221
224
|
/**
|
|
222
225
|
* @Author gx12358
|
|
223
226
|
* @DateTime 2022/2/8
|
|
224
227
|
* @lastTime 2022/2/8
|
|
225
228
|
* @description 从不滚动
|
|
226
229
|
*/
|
|
227
|
-
neverScroll: PropType<
|
|
230
|
+
neverScroll: PropType<ProTableProps["neverScroll"]>;
|
|
228
231
|
/**
|
|
229
232
|
* @Author gx12358
|
|
230
233
|
* @DateTime 2022/2/8
|
|
@@ -232,7 +235,7 @@ export declare const proTableProps: {
|
|
|
232
235
|
* @description 空值时的显示,不设置时显示 -, false 可以关闭此功能
|
|
233
236
|
*/
|
|
234
237
|
columnEmptyText: {
|
|
235
|
-
type: PropType<
|
|
238
|
+
type: PropType<ProTableProps["columnEmptyText"]>;
|
|
236
239
|
default: boolean;
|
|
237
240
|
};
|
|
238
241
|
/**
|
|
@@ -241,244 +244,33 @@ export declare const proTableProps: {
|
|
|
241
244
|
* @lastTime 2022/2/8
|
|
242
245
|
* @description Pro-Table 的方法
|
|
243
246
|
*/
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").TableLayout>;
|
|
258
|
-
default: any;
|
|
259
|
-
};
|
|
260
|
-
rowClassName: {
|
|
261
|
-
type: PropType<string | import("ant-design-vue/es/vc-table/interface").RowClassName<any>>;
|
|
262
|
-
default: any;
|
|
263
|
-
};
|
|
264
|
-
title: {
|
|
265
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").PanelRender<any>>;
|
|
266
|
-
default: any;
|
|
267
|
-
};
|
|
268
|
-
footer: {
|
|
269
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").PanelRender<any>>;
|
|
270
|
-
default: any;
|
|
271
|
-
};
|
|
272
|
-
id: {
|
|
273
|
-
type: PropType<string>;
|
|
274
|
-
default: any;
|
|
275
|
-
};
|
|
276
|
-
showHeader: {
|
|
277
|
-
type: PropType<boolean>;
|
|
278
|
-
default: any;
|
|
279
|
-
};
|
|
280
|
-
components: {
|
|
281
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").TableComponents<any>>;
|
|
282
|
-
default: any;
|
|
283
|
-
};
|
|
284
|
-
customRow: {
|
|
285
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").GetComponentProps<any>>;
|
|
286
|
-
default: any;
|
|
287
|
-
};
|
|
288
|
-
customHeaderRow: {
|
|
289
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").GetComponentProps<import("ant-design-vue/es/vc-table/interface").ColumnType<any>[]>>;
|
|
290
|
-
default: any;
|
|
291
|
-
};
|
|
292
|
-
direction: {
|
|
293
|
-
type: PropType<"ltr" | "rtl">;
|
|
294
|
-
default: any;
|
|
295
|
-
};
|
|
296
|
-
expandFixed: {
|
|
297
|
-
type: PropType<boolean | "right" | "left">;
|
|
298
|
-
default: any;
|
|
299
|
-
};
|
|
300
|
-
expandColumnWidth: {
|
|
301
|
-
type: PropType<number>;
|
|
302
|
-
default: any;
|
|
303
|
-
};
|
|
304
|
-
expandedRowKeys: {
|
|
305
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").Key[]>;
|
|
306
|
-
default: import("ant-design-vue/es/vc-table/interface").Key[];
|
|
307
|
-
};
|
|
308
|
-
defaultExpandedRowKeys: {
|
|
309
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").Key[]>;
|
|
310
|
-
default: import("ant-design-vue/es/vc-table/interface").Key[];
|
|
311
|
-
};
|
|
312
|
-
expandedRowRender: {
|
|
313
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").ExpandedRowRender<any>>;
|
|
314
|
-
default: any;
|
|
315
|
-
};
|
|
316
|
-
expandRowByClick: {
|
|
317
|
-
type: PropType<boolean>;
|
|
318
|
-
default: any;
|
|
319
|
-
};
|
|
320
|
-
expandIcon: {
|
|
321
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").RenderExpandIcon<any>>;
|
|
322
|
-
default: any;
|
|
323
|
-
};
|
|
324
|
-
onExpand: {
|
|
325
|
-
type: PropType<(expanded: boolean, record: any) => void>;
|
|
326
|
-
default: any;
|
|
327
|
-
};
|
|
328
|
-
onExpandedRowsChange: {
|
|
329
|
-
type: PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
|
|
330
|
-
default: any;
|
|
331
|
-
};
|
|
332
|
-
'onUpdate:expandedRowKeys': {
|
|
333
|
-
type: PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
|
|
334
|
-
default: any;
|
|
335
|
-
};
|
|
336
|
-
defaultExpandAllRows: {
|
|
337
|
-
type: PropType<boolean>;
|
|
338
|
-
default: any;
|
|
339
|
-
};
|
|
340
|
-
indentSize: {
|
|
341
|
-
type: PropType<number>;
|
|
342
|
-
default: any;
|
|
343
|
-
}; /**
|
|
344
|
-
* @Author gx12358
|
|
345
|
-
* @DateTime 2022/2/8
|
|
346
|
-
* @lastTime 2022/2/8
|
|
347
|
-
* @description 表格大小
|
|
348
|
-
*/
|
|
349
|
-
expandIconColumnIndex: {
|
|
350
|
-
type: PropType<number>;
|
|
351
|
-
default: any;
|
|
352
|
-
};
|
|
353
|
-
showExpandColumn: {
|
|
354
|
-
type: BooleanConstructor;
|
|
355
|
-
default: any;
|
|
356
|
-
};
|
|
357
|
-
expandedRowClassName: {
|
|
358
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").RowClassName<any>>;
|
|
359
|
-
default: any;
|
|
360
|
-
};
|
|
361
|
-
childrenColumnName: {
|
|
362
|
-
type: PropType<string>;
|
|
363
|
-
default: any;
|
|
364
|
-
};
|
|
365
|
-
rowExpandable: {
|
|
366
|
-
type: PropType<(record: any) => boolean>;
|
|
367
|
-
default: any;
|
|
368
|
-
};
|
|
369
|
-
sticky: {
|
|
370
|
-
type: PropType<boolean | import("ant-design-vue/es/vc-table/interface").TableSticky>;
|
|
371
|
-
default: any;
|
|
247
|
+
postData: PropType<ProTableProps["postData"]>;
|
|
248
|
+
onReset: PropType<ProTableProps["onReset"]>;
|
|
249
|
+
onReload: PropType<ProTableProps["onReload"]>;
|
|
250
|
+
onSubmit: PropType<ProTableProps["onSubmit"]>;
|
|
251
|
+
onSizeChange: PropType<ProTableProps["onSizeChange"]>;
|
|
252
|
+
onLoadingChange: PropType<ProTableProps["onLoadingChange"]>;
|
|
253
|
+
onRequestError: PropType<ProTableProps["onRequestError"]>;
|
|
254
|
+
onBeforeSearchSubmit: PropType<ProTableProps["onBeforeSearchSubmit"]>;
|
|
255
|
+
onColumnsStateChange: PropType<ProTableProps["onColumnsStateChange"]>;
|
|
256
|
+
transformCellText: PropType<import("ant-design-vue/es/table/Table").TableProps["transformCellText"]>;
|
|
257
|
+
bordered: {
|
|
258
|
+
type: PropType<import("ant-design-vue/es/table/Table").TableProps["bordered"]>;
|
|
259
|
+
default: undefined;
|
|
372
260
|
};
|
|
373
|
-
dropdownPrefixCls: StringConstructor;
|
|
374
|
-
dataSource: {
|
|
375
|
-
type: PropType<any[]>;
|
|
376
|
-
default: any;
|
|
377
|
-
}; /**
|
|
378
|
-
* @Author gx12358
|
|
379
|
-
* @DateTime 2022/2/8
|
|
380
|
-
* @lastTime 2022/2/8
|
|
381
|
-
* @description 根据屏幕大小或者scrollBreakpoint或者scroll?.x是否存在判断action列是否固定
|
|
382
|
-
*/
|
|
383
261
|
loading: {
|
|
384
|
-
type: PropType<boolean |
|
|
385
|
-
|
|
386
|
-
spinning: {
|
|
387
|
-
type: BooleanConstructor;
|
|
388
|
-
default: any;
|
|
389
|
-
};
|
|
390
|
-
size: PropType<import("ant-design-vue/es/spin/Spin").SpinSize>;
|
|
391
|
-
wrapperClassName: StringConstructor;
|
|
392
|
-
tip: import("vue-types").VueTypeValidableDef<any>;
|
|
393
|
-
delay: NumberConstructor;
|
|
394
|
-
indicator: import("vue-types").VueTypeValidableDef<any>;
|
|
395
|
-
}>>>;
|
|
396
|
-
default: any;
|
|
397
|
-
};
|
|
398
|
-
locale: {
|
|
399
|
-
type: PropType<import("ant-design-vue/es/table/interface").TableLocale>;
|
|
400
|
-
default: any;
|
|
401
|
-
};
|
|
402
|
-
onChange: {
|
|
403
|
-
type: PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: import("ant-design-vue/es/table/interface").SorterResult<any> | import("ant-design-vue/es/table/interface").SorterResult<any>[], extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
|
|
404
|
-
default: any;
|
|
405
|
-
};
|
|
406
|
-
onResizeColumn: {
|
|
407
|
-
type: PropType<(w: number, col: import("ant-design-vue/es/table/interface").ColumnType<any>) => void>;
|
|
408
|
-
default: any;
|
|
409
|
-
};
|
|
410
|
-
getPopupContainer: {
|
|
411
|
-
type: PropType<import("ant-design-vue/es/table/interface").GetPopupContainer>;
|
|
412
|
-
default: any;
|
|
262
|
+
type: PropType<boolean | import("ant-design-vue/es/spin/Spin").SpinProps>;
|
|
263
|
+
default: undefined;
|
|
413
264
|
};
|
|
414
265
|
scroll: {
|
|
415
|
-
type: PropType<{
|
|
416
|
-
|
|
417
|
-
y?: string | number | undefined;
|
|
418
|
-
} & {
|
|
419
|
-
scrollToFirstRowOnChange?: boolean | undefined;
|
|
266
|
+
type: PropType<import("ant-design-vue/es/vc-table/Table").TableProps["scroll"] & {
|
|
267
|
+
scrollToFirstRowOnChange?: boolean;
|
|
420
268
|
}>;
|
|
421
|
-
default:
|
|
422
|
-
};
|
|
423
|
-
sortDirections: {
|
|
424
|
-
type: PropType<import("ant-design-vue/es/table/interface").SortOrder[]>;
|
|
425
|
-
default: any;
|
|
426
|
-
};
|
|
427
|
-
showSorterTooltip: {
|
|
428
|
-
type: PropType<boolean | Partial<import("vue").ExtractPropTypes<{
|
|
429
|
-
title: import("vue-types").VueTypeValidableDef<any>;
|
|
430
|
-
trigger: PropType<import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType | import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType[]>;
|
|
431
|
-
visible: {
|
|
432
|
-
type: BooleanConstructor;
|
|
433
|
-
default: any;
|
|
434
|
-
};
|
|
435
|
-
defaultVisible: {
|
|
436
|
-
type: BooleanConstructor;
|
|
437
|
-
default: any;
|
|
438
|
-
};
|
|
439
|
-
placement: PropType<import("ant-design-vue/es/tooltip").TooltipPlacement>;
|
|
440
|
-
color: StringConstructor;
|
|
441
|
-
transitionName: StringConstructor;
|
|
442
|
-
overlayStyle: {
|
|
443
|
-
type: PropType<import("vue").CSSProperties>;
|
|
444
|
-
default: import("vue").CSSProperties;
|
|
445
|
-
};
|
|
446
|
-
overlayClassName: StringConstructor;
|
|
447
|
-
openClassName: StringConstructor;
|
|
448
|
-
prefixCls: StringConstructor;
|
|
449
|
-
mouseEnterDelay: NumberConstructor;
|
|
450
|
-
mouseLeaveDelay: NumberConstructor;
|
|
451
|
-
getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
452
|
-
arrowPointAtCenter: {
|
|
453
|
-
type: BooleanConstructor;
|
|
454
|
-
default: any;
|
|
455
|
-
};
|
|
456
|
-
autoAdjustOverflow: {
|
|
457
|
-
type: PropType<boolean | import("ant-design-vue/es/tooltip").AdjustOverflow>;
|
|
458
|
-
default: boolean | import("ant-design-vue/es/tooltip").AdjustOverflow;
|
|
459
|
-
};
|
|
460
|
-
destroyTooltipOnHide: {
|
|
461
|
-
type: BooleanConstructor;
|
|
462
|
-
default: any;
|
|
463
|
-
};
|
|
464
|
-
align: {
|
|
465
|
-
type: PropType<import("ant-design-vue/es/vc-trigger/interface").AlignType>;
|
|
466
|
-
default: import("ant-design-vue/es/vc-trigger/interface").AlignType;
|
|
467
|
-
};
|
|
468
|
-
builtinPlacements: {
|
|
469
|
-
type: PropType<import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements>;
|
|
470
|
-
default: import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements;
|
|
471
|
-
};
|
|
472
|
-
children: ArrayConstructor;
|
|
473
|
-
onVisibleChange: PropType<(vis: boolean) => void>;
|
|
474
|
-
'onUpdate:visible': PropType<(vis: boolean) => void>;
|
|
475
|
-
}>>>;
|
|
476
|
-
default: boolean;
|
|
477
|
-
};
|
|
478
|
-
contextSlots: {
|
|
479
|
-
type: PropType<import("ant-design-vue/es/table/context").ContextSlots>;
|
|
269
|
+
default: undefined;
|
|
480
270
|
};
|
|
481
|
-
|
|
482
|
-
type: PropType<import("ant-design-vue/es/vc-table/interface").
|
|
271
|
+
'onUpdate:expandedRowKeys': {
|
|
272
|
+
type: import("vue").PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
|
|
273
|
+
default: (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
|
|
483
274
|
};
|
|
484
275
|
};
|
|
276
|
+
export type BaseTableProps = Partial<ExtractPropTypes<typeof proTableProps>>;
|
package/dist/style.d.ts
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RecordType, VueNode } from '@gx-design-vue/pro-utils';
|
|
2
|
-
import type {
|
|
3
|
-
import type { ColumnType } from '../_utils';
|
|
1
|
+
import type { Fn, ProColumn, RecordType, VueNode } from '@gx-design-vue/pro-utils';
|
|
2
|
+
import type { CSSProperties } from 'vue';
|
|
3
|
+
import type { ColumnType, TooltipProps } from '../_utils';
|
|
4
4
|
/**
|
|
5
5
|
* @param text 文本框
|
|
6
6
|
* @param date 日期 YYYY-MM-DD
|
|
@@ -9,7 +9,7 @@ import type { ColumnType } from '../_utils';
|
|
|
9
9
|
* @param time: 时间 HH:mm:ss
|
|
10
10
|
* @param select 下拉选择器
|
|
11
11
|
*/
|
|
12
|
-
export type ProFieldValueType = 'text' | 'date' | '
|
|
12
|
+
export type ProFieldValueType = 'text' | 'select' | 'treeSelect' | 'date' | 'dateWeek' | 'dateQuarter' | 'dateMonth' | 'dateYear' | 'dateRange' | 'time';
|
|
13
13
|
/**
|
|
14
14
|
* @param text 文本框
|
|
15
15
|
* @param date 日期 YYYY-MM-DD
|
|
@@ -19,17 +19,17 @@ export type ProFieldValueType = 'text' | 'date' | 'select' | 'treeSelect' | 'dat
|
|
|
19
19
|
* @param select 下拉选择器
|
|
20
20
|
*/
|
|
21
21
|
export type ProFieldValueFormat = 'YYYY-MM-DD' | 'YYYY-MM' | 'YYYY-MM-DD HH:mm:ss' | 'HH:mm:ss';
|
|
22
|
-
export
|
|
22
|
+
export interface ProSchemaValueEnumType {
|
|
23
23
|
/** @name 演示的文案 */
|
|
24
24
|
text: VueNode | JSX.Element;
|
|
25
25
|
/** @name 演示的value值 */
|
|
26
26
|
value: any;
|
|
27
27
|
/** @name 是否禁用 */
|
|
28
28
|
disabled?: boolean;
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
type ProSchemaValueType<ValueType> = (ValueType | ProFieldValueType);
|
|
31
|
-
export
|
|
32
|
-
name
|
|
31
|
+
export interface ProSearchMap<ValueType = 'text', ParamsKey = string> {
|
|
32
|
+
name: ParamsKey;
|
|
33
33
|
/** 选择如何渲染相应的模式 */
|
|
34
34
|
valueType?: ProSchemaValueType<ValueType>;
|
|
35
35
|
/** valueType为date|dateMonth|dateRange|time生效 */
|
|
@@ -55,7 +55,15 @@ export type ProSearchMap<ValueType = 'text'> = {
|
|
|
55
55
|
initialValue?: any;
|
|
56
56
|
/** 针对select、treeselect取值的key */
|
|
57
57
|
valueKey?: string;
|
|
58
|
-
/**
|
|
58
|
+
/** 远程查询数据 */
|
|
59
|
+
request?: Fn;
|
|
60
|
+
/** 查询表单label */
|
|
61
|
+
label?: string;
|
|
62
|
+
/** 查询表单label - 宽度 */
|
|
63
|
+
labelWidth?: string | number;
|
|
64
|
+
/** 查询表单label - 对齐方式 */
|
|
65
|
+
labelAlign?: 'center' | 'left' | 'right';
|
|
66
|
+
/** 表单的属性值(ant-design) */
|
|
59
67
|
field?: RecordType;
|
|
60
68
|
/**
|
|
61
69
|
* 支持 object 和Map,Map 是支持其他基础类型作为 key
|
|
@@ -63,26 +71,36 @@ export type ProSearchMap<ValueType = 'text'> = {
|
|
|
63
71
|
* @name 映射值的类型
|
|
64
72
|
*/
|
|
65
73
|
valueEnum?: ProSchemaValueEnumType[];
|
|
66
|
-
}
|
|
67
|
-
export type ProColumnType<RecordType =
|
|
68
|
-
children?: ProColumnsType<
|
|
74
|
+
}
|
|
75
|
+
export type ProColumnType<DataValue = RecordType, SearchParama = RecordType> = ProColumn<Omit<ColumnType<DataValue>, 'key' | 'dataIndex' | 'width'> & {
|
|
76
|
+
children?: ProColumnsType<DataValue, SearchParama>;
|
|
69
77
|
uuid?: string | number;
|
|
78
|
+
index?: number;
|
|
79
|
+
copyText?: string | ((record: ProColumnType) => string);
|
|
80
|
+
tooltip?: false | (TooltipProps & {
|
|
81
|
+
width?: number;
|
|
82
|
+
targetStyle?: Partial<CSSProperties>;
|
|
83
|
+
hiddenLine?: number;
|
|
84
|
+
class?: string;
|
|
85
|
+
});
|
|
70
86
|
/** 不在列表中显示 */
|
|
71
87
|
show?: boolean;
|
|
88
|
+
key?: keyof DataValue | string | 'action';
|
|
89
|
+
dataIndex?: keyof DataValue | string | 'action';
|
|
72
90
|
/** 列表顺序值 */
|
|
73
91
|
order?: number;
|
|
74
92
|
/** 不在配置工具中显示 */
|
|
75
93
|
hideInSetting?: boolean;
|
|
76
94
|
/** 表单搜索配置 */
|
|
77
|
-
searchConfig?: ProSearchMap
|
|
95
|
+
searchConfig?: ProSearchMap<undefined, keyof DataValue | keyof SearchParama>;
|
|
78
96
|
/** 是否拷贝 */
|
|
79
97
|
copyable?: boolean;
|
|
80
98
|
/** 值为空时,默认取值 */
|
|
81
99
|
columnEmptyText?: string;
|
|
82
100
|
valueType?: ProColumnsValueType;
|
|
83
|
-
}
|
|
84
|
-
export type ProColumnsType<RecordType =
|
|
85
|
-
export type ProColumnsValueType = 'text' | 'link' | 'time' | 'dateMonth' | 'dateTime' | {
|
|
101
|
+
}>;
|
|
102
|
+
export type ProColumnsType<DataValue = RecordType, SearchParama = RecordType> = ProColumnType<DataValue, SearchParama>[];
|
|
103
|
+
export type ProColumnsValueType = 'text' | 'link' | 'time' | 'dateMonth' | 'dateTime' | 'date' | {
|
|
86
104
|
node?: string;
|
|
87
105
|
class?: string;
|
|
88
106
|
attr?: string;
|