@gx-design-vue/pro-table 0.2.0-beta.131 → 0.2.0-beta.133
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 +111 -96
- package/dist/_utils/ant-design-vue/table/props.d.ts +4 -0
- package/dist/components/Form/hooks/useForm.d.ts +1 -1
- package/dist/components/Form/index.d.ts +1 -1
- package/dist/context/TableContext.d.ts +4 -4
- package/dist/hooks/useFetchData.d.ts +8 -7
- package/dist/hooks/useTableForm.d.ts +71 -9
- package/dist/index.d.ts +1 -1
- package/dist/pro-table.js +1063 -1033
- package/dist/pro-table.umd.cjs +3 -3
- package/dist/props.d.ts +17 -4
- package/dist/types/TableTypings.d.ts +7 -6
- package/package.json +2 -2
package/dist/ProTable.d.ts
CHANGED
|
@@ -2,18 +2,18 @@ import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
|
2
2
|
import type { CSSProperties, SlotsType } from 'vue';
|
|
3
3
|
import type { ColumnType, Key, RenderExpandIconProps, SpinProps } from './_utils';
|
|
4
4
|
import type { ProTableBodyCellProps } from './types/SlotsTypings';
|
|
5
|
-
import type { OptionConfig
|
|
5
|
+
import type { OptionConfig } from './types/TableTypings';
|
|
6
6
|
declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
7
|
rowSelection: {
|
|
8
8
|
type: import("vue").PropType<import("./types/TableTypings").ProTableRowSelection>;
|
|
9
9
|
default: undefined;
|
|
10
10
|
};
|
|
11
11
|
columns: {
|
|
12
|
-
type: import("vue").PropType<ProTableProps["columns"]>;
|
|
12
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["columns"]>;
|
|
13
13
|
default: () => never[];
|
|
14
14
|
};
|
|
15
15
|
pagination: {
|
|
16
|
-
type: import("vue").PropType<ProTableProps["pagination"]>;
|
|
16
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["pagination"]>;
|
|
17
17
|
default: () => undefined;
|
|
18
18
|
};
|
|
19
19
|
rowKey: {
|
|
@@ -21,125 +21,132 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
21
21
|
default: string;
|
|
22
22
|
};
|
|
23
23
|
request: {
|
|
24
|
-
type: import("vue").PropType<ProTableProps["request"]>;
|
|
24
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["request"]>;
|
|
25
25
|
default: undefined;
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
autoRequest: {
|
|
28
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["autoRequest"]>;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
virtualScroll: import("vue").PropType<import("./types/TableTypings").ProTableProps["virtualScroll"]>;
|
|
28
32
|
params: {
|
|
29
|
-
type: import("vue").PropType<ProTableProps["params"]>;
|
|
33
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["params"]>;
|
|
30
34
|
default: () => {};
|
|
31
35
|
};
|
|
32
36
|
waitRequest: {
|
|
33
|
-
type: import("vue").PropType<ProTableProps["waitRequest"]>;
|
|
37
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["waitRequest"]>;
|
|
34
38
|
default: boolean;
|
|
35
39
|
};
|
|
36
|
-
polling: import("vue").PropType<ProTableProps["polling"]>;
|
|
40
|
+
polling: import("vue").PropType<import("./types/TableTypings").ProTableProps["polling"]>;
|
|
37
41
|
debounceTime: {
|
|
38
|
-
type: import("vue").PropType<ProTableProps["debounceTime"]>;
|
|
42
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["debounceTime"]>;
|
|
39
43
|
default: number;
|
|
40
44
|
};
|
|
41
|
-
|
|
42
|
-
type: import("vue").PropType<ProTableProps["
|
|
43
|
-
default: () => SearchConfig;
|
|
45
|
+
form: {
|
|
46
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["form"]>;
|
|
44
47
|
};
|
|
45
48
|
searchMap: {
|
|
46
|
-
type: import("vue").PropType<ProTableProps["searchMap"]>;
|
|
49
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["searchMap"]>;
|
|
47
50
|
default: () => never[];
|
|
48
51
|
};
|
|
49
52
|
customRender: {
|
|
50
|
-
type: import("vue").PropType<ProTableProps["customRender"]>;
|
|
53
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["customRender"]>;
|
|
51
54
|
default: () => undefined;
|
|
52
55
|
};
|
|
53
56
|
useDefaultScrollStyle: {
|
|
54
|
-
type: import("vue").PropType<ProTableProps["useDefaultScrollStyle"]>;
|
|
57
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["useDefaultScrollStyle"]>;
|
|
55
58
|
default: () => boolean;
|
|
56
59
|
};
|
|
57
60
|
emptyText: {
|
|
58
|
-
type: import("vue").PropType<ProTableProps["emptyText"]>;
|
|
61
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["emptyText"]>;
|
|
59
62
|
default: () => undefined;
|
|
60
63
|
};
|
|
61
64
|
showLoading: {
|
|
62
|
-
type: import("vue").PropType<ProTableProps["showLoading"]>;
|
|
65
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["showLoading"]>;
|
|
63
66
|
default: boolean;
|
|
64
67
|
};
|
|
65
68
|
tableProps: {
|
|
66
|
-
type: import("vue").PropType<ProTableProps["tableProps"]>;
|
|
67
|
-
default: () => ProTableProps["tableProps"];
|
|
69
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["tableProps"]>;
|
|
70
|
+
default: () => import("./types/TableTypings").ProTableProps["tableProps"];
|
|
68
71
|
};
|
|
69
72
|
emptyTextProps: {
|
|
70
|
-
type: import("vue").PropType<ProTableProps["emptyTextProps"]>;
|
|
71
|
-
default: () => ProTableProps["emptyTextProps"];
|
|
73
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["emptyTextProps"]>;
|
|
74
|
+
default: () => import("./types/TableTypings").ProTableProps["emptyTextProps"];
|
|
72
75
|
};
|
|
73
76
|
actionProps: {
|
|
74
|
-
type: import("vue").PropType<ProTableProps["actionProps"]>;
|
|
77
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["actionProps"]>;
|
|
75
78
|
default: () => {
|
|
76
79
|
placement: string;
|
|
77
80
|
};
|
|
78
81
|
};
|
|
79
82
|
headerTitle: {
|
|
80
|
-
type: import("vue").PropType<ProTableProps["headerTitle"]>;
|
|
83
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["headerTitle"]>;
|
|
81
84
|
default: () => undefined;
|
|
82
85
|
};
|
|
83
86
|
titleTip: {
|
|
84
|
-
type: import("vue").PropType<ProTableProps["titleTip"]>;
|
|
87
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["titleTip"]>;
|
|
85
88
|
default: () => undefined;
|
|
86
89
|
};
|
|
87
90
|
titleTipText: {
|
|
88
|
-
type: import("vue").PropType<ProTableProps["titleTipText"]>;
|
|
91
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["titleTipText"]>;
|
|
89
92
|
default: string;
|
|
90
93
|
};
|
|
91
94
|
options: {
|
|
92
|
-
type: import("vue").PropType<ProTableProps["options"]>;
|
|
95
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["options"]>;
|
|
93
96
|
default: boolean;
|
|
94
97
|
};
|
|
95
98
|
settingExtra: {
|
|
96
|
-
type: import("vue").PropType<ProTableProps["settingExtra"]>;
|
|
99
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["settingExtra"]>;
|
|
97
100
|
default: () => undefined;
|
|
98
101
|
};
|
|
99
102
|
keepAliveReload: {
|
|
100
|
-
type: import("vue").PropType<ProTableProps["keepAliveReload"]>;
|
|
103
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["keepAliveReload"]>;
|
|
101
104
|
default: boolean;
|
|
102
105
|
};
|
|
103
106
|
showIndex: {
|
|
104
|
-
type: import("vue").PropType<ProTableProps["showIndex"]>;
|
|
107
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["showIndex"]>;
|
|
105
108
|
default: boolean;
|
|
106
109
|
};
|
|
107
110
|
cardBordered: {
|
|
108
|
-
type: import("vue").PropType<ProTableProps["showIndex"]>;
|
|
111
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["showIndex"]>;
|
|
109
112
|
default: boolean;
|
|
110
113
|
};
|
|
111
114
|
pageItemRender: {
|
|
112
|
-
type: import("vue").PropType<ProTableProps["pageItemRender"]>;
|
|
115
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["pageItemRender"]>;
|
|
113
116
|
default: () => undefined;
|
|
114
117
|
};
|
|
115
118
|
size: {
|
|
116
|
-
type: import("vue").PropType<ProTableProps["size"]>;
|
|
119
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["size"]>;
|
|
117
120
|
default: string;
|
|
118
121
|
};
|
|
119
122
|
align: {
|
|
120
|
-
type: import("vue").PropType<ProTableProps["align"]>;
|
|
123
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["align"]>;
|
|
121
124
|
default: string;
|
|
122
125
|
};
|
|
123
|
-
draggable: import("vue").PropType<ProTableProps["draggable"]>;
|
|
126
|
+
draggable: import("vue").PropType<import("./types/TableTypings").ProTableProps["draggable"]>;
|
|
124
127
|
autoScroll: {
|
|
125
|
-
type: import("vue").PropType<ProTableProps["autoScroll"]>;
|
|
128
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["autoScroll"]>;
|
|
126
129
|
default: boolean;
|
|
127
130
|
};
|
|
128
|
-
scrollBreakpoint: import("vue").PropType<ProTableProps["scrollBreakpoint"]>;
|
|
129
|
-
modalScroll: import("vue").PropType<ProTableProps["modalScroll"]>;
|
|
130
|
-
neverScroll: import("vue").PropType<ProTableProps["neverScroll"]>;
|
|
131
|
+
scrollBreakpoint: import("vue").PropType<import("./types/TableTypings").ProTableProps["scrollBreakpoint"]>;
|
|
132
|
+
modalScroll: import("vue").PropType<import("./types/TableTypings").ProTableProps["modalScroll"]>;
|
|
133
|
+
neverScroll: import("vue").PropType<import("./types/TableTypings").ProTableProps["neverScroll"]>;
|
|
131
134
|
columnEmptyText: {
|
|
132
|
-
type: import("vue").PropType<ProTableProps["columnEmptyText"]>;
|
|
135
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["columnEmptyText"]>;
|
|
133
136
|
default: boolean;
|
|
134
137
|
};
|
|
135
|
-
postData: import("vue").PropType<ProTableProps["postData"]>;
|
|
136
|
-
onReset: import("vue").PropType<ProTableProps["onReset"]>;
|
|
137
|
-
onReload: import("vue").PropType<ProTableProps["onReload"]>;
|
|
138
|
-
onSubmit: import("vue").PropType<ProTableProps["onSubmit"]>;
|
|
139
|
-
onSizeChange: import("vue").PropType<ProTableProps["onSizeChange"]>;
|
|
140
|
-
onLoadingChange: import("vue").PropType<ProTableProps["onLoadingChange"]>;
|
|
141
|
-
onRequestError: import("vue").PropType<ProTableProps["onRequestError"]>;
|
|
142
|
-
onBeforeSearchSubmit: import("vue").PropType<ProTableProps["onBeforeSearchSubmit"]>;
|
|
138
|
+
postData: import("vue").PropType<import("./types/TableTypings").ProTableProps["postData"]>;
|
|
139
|
+
onReset: import("vue").PropType<import("./types/TableTypings").ProTableProps["onReset"]>;
|
|
140
|
+
onReload: import("vue").PropType<import("./types/TableTypings").ProTableProps["onReload"]>;
|
|
141
|
+
onSubmit: import("vue").PropType<import("./types/TableTypings").ProTableProps["onSubmit"]>;
|
|
142
|
+
onSizeChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onSizeChange"]>;
|
|
143
|
+
onLoadingChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onLoadingChange"]>;
|
|
144
|
+
onRequestError: import("vue").PropType<import("./types/TableTypings").ProTableProps["onRequestError"]>;
|
|
145
|
+
onBeforeSearchSubmit: import("vue").PropType<import("./types/TableTypings").ProTableProps["onBeforeSearchSubmit"]>;
|
|
146
|
+
direction: {
|
|
147
|
+
type: import("vue").PropType<"rtl" | "ltr">;
|
|
148
|
+
default: string;
|
|
149
|
+
};
|
|
143
150
|
transformCellText: import("vue").PropType<import("ant-design-vue").TableProps["transformCellText"]>;
|
|
144
151
|
bordered: {
|
|
145
152
|
type: import("vue").PropType<import("ant-design-vue").TableProps["bordered"]>;
|
|
@@ -159,17 +166,17 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
159
166
|
type: import("vue").PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
|
|
160
167
|
default: (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
|
|
161
168
|
};
|
|
162
|
-
}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "submit" | "reload" | "
|
|
169
|
+
}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "submit" | "reload" | "requestError" | "sizeChange" | "expandedRowsChange" | "expand" | "change" | "columnsStateChange" | "loadingChange")[], "reset" | "submit" | "reload" | "requestError" | "sizeChange" | "expandedRowsChange" | "expand" | "change" | "columnsStateChange" | "loadingChange", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
163
170
|
rowSelection: {
|
|
164
171
|
type: import("vue").PropType<import("./types/TableTypings").ProTableRowSelection>;
|
|
165
172
|
default: undefined;
|
|
166
173
|
};
|
|
167
174
|
columns: {
|
|
168
|
-
type: import("vue").PropType<ProTableProps["columns"]>;
|
|
175
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["columns"]>;
|
|
169
176
|
default: () => never[];
|
|
170
177
|
};
|
|
171
178
|
pagination: {
|
|
172
|
-
type: import("vue").PropType<ProTableProps["pagination"]>;
|
|
179
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["pagination"]>;
|
|
173
180
|
default: () => undefined;
|
|
174
181
|
};
|
|
175
182
|
rowKey: {
|
|
@@ -177,125 +184,132 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
177
184
|
default: string;
|
|
178
185
|
};
|
|
179
186
|
request: {
|
|
180
|
-
type: import("vue").PropType<ProTableProps["request"]>;
|
|
187
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["request"]>;
|
|
181
188
|
default: undefined;
|
|
182
189
|
};
|
|
183
|
-
|
|
190
|
+
autoRequest: {
|
|
191
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["autoRequest"]>;
|
|
192
|
+
default: boolean;
|
|
193
|
+
};
|
|
194
|
+
virtualScroll: import("vue").PropType<import("./types/TableTypings").ProTableProps["virtualScroll"]>;
|
|
184
195
|
params: {
|
|
185
|
-
type: import("vue").PropType<ProTableProps["params"]>;
|
|
196
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["params"]>;
|
|
186
197
|
default: () => {};
|
|
187
198
|
};
|
|
188
199
|
waitRequest: {
|
|
189
|
-
type: import("vue").PropType<ProTableProps["waitRequest"]>;
|
|
200
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["waitRequest"]>;
|
|
190
201
|
default: boolean;
|
|
191
202
|
};
|
|
192
|
-
polling: import("vue").PropType<ProTableProps["polling"]>;
|
|
203
|
+
polling: import("vue").PropType<import("./types/TableTypings").ProTableProps["polling"]>;
|
|
193
204
|
debounceTime: {
|
|
194
|
-
type: import("vue").PropType<ProTableProps["debounceTime"]>;
|
|
205
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["debounceTime"]>;
|
|
195
206
|
default: number;
|
|
196
207
|
};
|
|
197
|
-
|
|
198
|
-
type: import("vue").PropType<ProTableProps["
|
|
199
|
-
default: () => SearchConfig;
|
|
208
|
+
form: {
|
|
209
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["form"]>;
|
|
200
210
|
};
|
|
201
211
|
searchMap: {
|
|
202
|
-
type: import("vue").PropType<ProTableProps["searchMap"]>;
|
|
212
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["searchMap"]>;
|
|
203
213
|
default: () => never[];
|
|
204
214
|
};
|
|
205
215
|
customRender: {
|
|
206
|
-
type: import("vue").PropType<ProTableProps["customRender"]>;
|
|
216
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["customRender"]>;
|
|
207
217
|
default: () => undefined;
|
|
208
218
|
};
|
|
209
219
|
useDefaultScrollStyle: {
|
|
210
|
-
type: import("vue").PropType<ProTableProps["useDefaultScrollStyle"]>;
|
|
220
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["useDefaultScrollStyle"]>;
|
|
211
221
|
default: () => boolean;
|
|
212
222
|
};
|
|
213
223
|
emptyText: {
|
|
214
|
-
type: import("vue").PropType<ProTableProps["emptyText"]>;
|
|
224
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["emptyText"]>;
|
|
215
225
|
default: () => undefined;
|
|
216
226
|
};
|
|
217
227
|
showLoading: {
|
|
218
|
-
type: import("vue").PropType<ProTableProps["showLoading"]>;
|
|
228
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["showLoading"]>;
|
|
219
229
|
default: boolean;
|
|
220
230
|
};
|
|
221
231
|
tableProps: {
|
|
222
|
-
type: import("vue").PropType<ProTableProps["tableProps"]>;
|
|
223
|
-
default: () => ProTableProps["tableProps"];
|
|
232
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["tableProps"]>;
|
|
233
|
+
default: () => import("./types/TableTypings").ProTableProps["tableProps"];
|
|
224
234
|
};
|
|
225
235
|
emptyTextProps: {
|
|
226
|
-
type: import("vue").PropType<ProTableProps["emptyTextProps"]>;
|
|
227
|
-
default: () => ProTableProps["emptyTextProps"];
|
|
236
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["emptyTextProps"]>;
|
|
237
|
+
default: () => import("./types/TableTypings").ProTableProps["emptyTextProps"];
|
|
228
238
|
};
|
|
229
239
|
actionProps: {
|
|
230
|
-
type: import("vue").PropType<ProTableProps["actionProps"]>;
|
|
240
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["actionProps"]>;
|
|
231
241
|
default: () => {
|
|
232
242
|
placement: string;
|
|
233
243
|
};
|
|
234
244
|
};
|
|
235
245
|
headerTitle: {
|
|
236
|
-
type: import("vue").PropType<ProTableProps["headerTitle"]>;
|
|
246
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["headerTitle"]>;
|
|
237
247
|
default: () => undefined;
|
|
238
248
|
};
|
|
239
249
|
titleTip: {
|
|
240
|
-
type: import("vue").PropType<ProTableProps["titleTip"]>;
|
|
250
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["titleTip"]>;
|
|
241
251
|
default: () => undefined;
|
|
242
252
|
};
|
|
243
253
|
titleTipText: {
|
|
244
|
-
type: import("vue").PropType<ProTableProps["titleTipText"]>;
|
|
254
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["titleTipText"]>;
|
|
245
255
|
default: string;
|
|
246
256
|
};
|
|
247
257
|
options: {
|
|
248
|
-
type: import("vue").PropType<ProTableProps["options"]>;
|
|
258
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["options"]>;
|
|
249
259
|
default: boolean;
|
|
250
260
|
};
|
|
251
261
|
settingExtra: {
|
|
252
|
-
type: import("vue").PropType<ProTableProps["settingExtra"]>;
|
|
262
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["settingExtra"]>;
|
|
253
263
|
default: () => undefined;
|
|
254
264
|
};
|
|
255
265
|
keepAliveReload: {
|
|
256
|
-
type: import("vue").PropType<ProTableProps["keepAliveReload"]>;
|
|
266
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["keepAliveReload"]>;
|
|
257
267
|
default: boolean;
|
|
258
268
|
};
|
|
259
269
|
showIndex: {
|
|
260
|
-
type: import("vue").PropType<ProTableProps["showIndex"]>;
|
|
270
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["showIndex"]>;
|
|
261
271
|
default: boolean;
|
|
262
272
|
};
|
|
263
273
|
cardBordered: {
|
|
264
|
-
type: import("vue").PropType<ProTableProps["showIndex"]>;
|
|
274
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["showIndex"]>;
|
|
265
275
|
default: boolean;
|
|
266
276
|
};
|
|
267
277
|
pageItemRender: {
|
|
268
|
-
type: import("vue").PropType<ProTableProps["pageItemRender"]>;
|
|
278
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["pageItemRender"]>;
|
|
269
279
|
default: () => undefined;
|
|
270
280
|
};
|
|
271
281
|
size: {
|
|
272
|
-
type: import("vue").PropType<ProTableProps["size"]>;
|
|
282
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["size"]>;
|
|
273
283
|
default: string;
|
|
274
284
|
};
|
|
275
285
|
align: {
|
|
276
|
-
type: import("vue").PropType<ProTableProps["align"]>;
|
|
286
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["align"]>;
|
|
277
287
|
default: string;
|
|
278
288
|
};
|
|
279
|
-
draggable: import("vue").PropType<ProTableProps["draggable"]>;
|
|
289
|
+
draggable: import("vue").PropType<import("./types/TableTypings").ProTableProps["draggable"]>;
|
|
280
290
|
autoScroll: {
|
|
281
|
-
type: import("vue").PropType<ProTableProps["autoScroll"]>;
|
|
291
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["autoScroll"]>;
|
|
282
292
|
default: boolean;
|
|
283
293
|
};
|
|
284
|
-
scrollBreakpoint: import("vue").PropType<ProTableProps["scrollBreakpoint"]>;
|
|
285
|
-
modalScroll: import("vue").PropType<ProTableProps["modalScroll"]>;
|
|
286
|
-
neverScroll: import("vue").PropType<ProTableProps["neverScroll"]>;
|
|
294
|
+
scrollBreakpoint: import("vue").PropType<import("./types/TableTypings").ProTableProps["scrollBreakpoint"]>;
|
|
295
|
+
modalScroll: import("vue").PropType<import("./types/TableTypings").ProTableProps["modalScroll"]>;
|
|
296
|
+
neverScroll: import("vue").PropType<import("./types/TableTypings").ProTableProps["neverScroll"]>;
|
|
287
297
|
columnEmptyText: {
|
|
288
|
-
type: import("vue").PropType<ProTableProps["columnEmptyText"]>;
|
|
298
|
+
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["columnEmptyText"]>;
|
|
289
299
|
default: boolean;
|
|
290
300
|
};
|
|
291
|
-
postData: import("vue").PropType<ProTableProps["postData"]>;
|
|
292
|
-
onReset: import("vue").PropType<ProTableProps["onReset"]>;
|
|
293
|
-
onReload: import("vue").PropType<ProTableProps["onReload"]>;
|
|
294
|
-
onSubmit: import("vue").PropType<ProTableProps["onSubmit"]>;
|
|
295
|
-
onSizeChange: import("vue").PropType<ProTableProps["onSizeChange"]>;
|
|
296
|
-
onLoadingChange: import("vue").PropType<ProTableProps["onLoadingChange"]>;
|
|
297
|
-
onRequestError: import("vue").PropType<ProTableProps["onRequestError"]>;
|
|
298
|
-
onBeforeSearchSubmit: import("vue").PropType<ProTableProps["onBeforeSearchSubmit"]>;
|
|
301
|
+
postData: import("vue").PropType<import("./types/TableTypings").ProTableProps["postData"]>;
|
|
302
|
+
onReset: import("vue").PropType<import("./types/TableTypings").ProTableProps["onReset"]>;
|
|
303
|
+
onReload: import("vue").PropType<import("./types/TableTypings").ProTableProps["onReload"]>;
|
|
304
|
+
onSubmit: import("vue").PropType<import("./types/TableTypings").ProTableProps["onSubmit"]>;
|
|
305
|
+
onSizeChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onSizeChange"]>;
|
|
306
|
+
onLoadingChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onLoadingChange"]>;
|
|
307
|
+
onRequestError: import("vue").PropType<import("./types/TableTypings").ProTableProps["onRequestError"]>;
|
|
308
|
+
onBeforeSearchSubmit: import("vue").PropType<import("./types/TableTypings").ProTableProps["onBeforeSearchSubmit"]>;
|
|
309
|
+
direction: {
|
|
310
|
+
type: import("vue").PropType<"rtl" | "ltr">;
|
|
311
|
+
default: string;
|
|
312
|
+
};
|
|
299
313
|
transformCellText: import("vue").PropType<import("ant-design-vue").TableProps["transformCellText"]>;
|
|
300
314
|
bordered: {
|
|
301
315
|
type: import("vue").PropType<import("ant-design-vue").TableProps["bordered"]>;
|
|
@@ -336,6 +350,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
336
350
|
};
|
|
337
351
|
emptyText: import("./types/SlotsTypings").DefaultRender;
|
|
338
352
|
rowKey: string;
|
|
353
|
+
direction: "rtl" | "ltr";
|
|
339
354
|
pagination: ((false | import("ant-design-vue").TablePaginationConfig) & import("./types/TableTypings").ProTablePagination) | undefined;
|
|
340
355
|
loading: boolean | Partial<import("vue").ExtractPropTypes<{
|
|
341
356
|
prefixCls: StringConstructor;
|
|
@@ -355,7 +370,6 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
355
370
|
'onUpdate:expandedRowKeys': (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
|
|
356
371
|
align: import("ant-design-vue/es/vc-table/interface").AlignType | undefined;
|
|
357
372
|
customRender: import("./types/SlotsTypings").CustomDataRender | undefined;
|
|
358
|
-
search: false | SearchConfig | undefined;
|
|
359
373
|
headerTitle: import("./types/SlotsTypings").DefaultRender;
|
|
360
374
|
titleTip: import("./types/SlotsTypings").DefaultRender;
|
|
361
375
|
settingExtra: import("./types/SlotsTypings").DefaultRender;
|
|
@@ -385,11 +399,12 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
385
399
|
waitRequest: boolean | undefined;
|
|
386
400
|
debounceTime: number | undefined;
|
|
387
401
|
request: import("./types/TableTypings").RequestFunction<RecordType, RecordType> | undefined;
|
|
402
|
+
autoRequest: boolean | undefined;
|
|
388
403
|
params: RecordType | undefined;
|
|
389
404
|
searchMap: import("./types/ColumnTypings").ProSearchMap<undefined, string>[] | undefined;
|
|
390
405
|
}, SlotsType<{
|
|
406
|
+
form(): any;
|
|
391
407
|
actions(): any;
|
|
392
|
-
search(): any;
|
|
393
408
|
bodyCell(): any;
|
|
394
409
|
bodyCell(props: ProTableBodyCellProps<any>): any;
|
|
395
410
|
emptyText(): any;
|
|
@@ -4,6 +4,10 @@ import type { RcTableProps, TableProps } from './typings';
|
|
|
4
4
|
declare const omitProps: (keyof TableProps)[];
|
|
5
5
|
export type AntTableProps = Omit<TableProps, typeof omitProps[number]>;
|
|
6
6
|
export declare const tableProps: {
|
|
7
|
+
direction: {
|
|
8
|
+
type: PropType<"rtl" | "ltr">;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
7
11
|
transformCellText: PropType<TableProps["transformCellText"]>;
|
|
8
12
|
/**
|
|
9
13
|
* @Author gx12358
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
2
2
|
import type { ProSearchMap } from '../../../types/ColumnTypings';
|
|
3
|
-
export declare function useForm(
|
|
3
|
+
export declare function useForm(defaultState: RecordType, searchMap: ProSearchMap[]): {
|
|
4
4
|
formState: any;
|
|
5
5
|
resetFormState: () => void;
|
|
6
6
|
changeFormState: (key: string, value: any) => void;
|
|
@@ -3,7 +3,7 @@ import type { DefineComponent, ExtractPropTypes, PropType } from 'vue';
|
|
|
3
3
|
import type { ProSearchMap } from '../../types/ColumnTypings';
|
|
4
4
|
declare const tableForm: {
|
|
5
5
|
modalScroll: PropType<boolean | undefined>;
|
|
6
|
-
|
|
6
|
+
formCols: {
|
|
7
7
|
type: PropType<ProSearchMap[]>;
|
|
8
8
|
default: () => never[];
|
|
9
9
|
};
|
|
@@ -3,13 +3,13 @@ import type { ComputedRef, Ref } from 'vue';
|
|
|
3
3
|
import type { PaginationProps } from '../_utils';
|
|
4
4
|
import type { ColumnsState } from '../hooks/useColumnSetting';
|
|
5
5
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
6
|
-
import type {
|
|
6
|
+
import type { FormConfig } from '../types/TableTypings';
|
|
7
7
|
export interface ProTableContextProps {
|
|
8
8
|
columns: ComputedRef<ProColumnsType>;
|
|
9
9
|
isMobile: ComputedRef<boolean>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
formConfig: ComputedRef<FormConfig>;
|
|
11
|
+
formActions: ComputedRef<FormConfig['actions']>;
|
|
12
|
+
formAutoRequest: ComputedRef<boolean>;
|
|
13
13
|
cacheColumns: ComputedRef<ProColumnsType>;
|
|
14
14
|
tableSize: Ref<SizeType>;
|
|
15
15
|
action: {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
2
|
-
import type { ComputedRef,
|
|
2
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
3
3
|
import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils';
|
|
4
4
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
|
-
import type { ProTableFetchParams, ProTablePagination, ProTablePaginationConfig, ProTableProps
|
|
5
|
+
import type { ProTableFetchParams, ProTablePagination, ProTablePaginationConfig, ProTableProps } from '../types/TableTypings';
|
|
6
6
|
interface ActionType {
|
|
7
7
|
loading: Ref<boolean>;
|
|
8
|
-
search: ComputedRef<SearchConfig | false>;
|
|
9
8
|
paginationInfo: Ref<ProTablePagination>;
|
|
10
9
|
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
11
10
|
setLoading: (loading: boolean) => void;
|
|
@@ -13,11 +12,12 @@ interface ActionType {
|
|
|
13
12
|
removeRowKeys: (keyList: (string | number)[]) => void;
|
|
14
13
|
syncSelectedRows: (dataList: any[]) => void;
|
|
15
14
|
columns: ComputedRef<ProColumnsType>;
|
|
16
|
-
|
|
15
|
+
defaultState: Ref<RecordType>;
|
|
17
16
|
onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
|
|
18
17
|
hasCustomRender: ComputedRef<boolean>;
|
|
19
18
|
}
|
|
20
19
|
export interface ConfigFetchData {
|
|
20
|
+
params: ComputedRef<ProTableProps['params']>;
|
|
21
21
|
rowKey: ComputedRef<ProTableProps['rowKey']>;
|
|
22
22
|
polling: ComputedRef<ProTableProps['polling']>;
|
|
23
23
|
request: ProTableProps['request'];
|
|
@@ -25,9 +25,10 @@ export interface ConfigFetchData {
|
|
|
25
25
|
waitRequest: Ref<ProTableProps['waitRequest']>;
|
|
26
26
|
debounceTime: ComputedRef<ProTableProps['debounceTime']>;
|
|
27
27
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
28
|
+
autoRequest: ComputedRef<ProTableProps['autoRequest']>;
|
|
28
29
|
}
|
|
29
30
|
export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
|
|
30
|
-
export declare function useFetchData({ rowKey, polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, {
|
|
31
|
+
export declare function useFetchData({ params, rowKey, autoRequest, polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns, loading, setLoading, setColumns, removeRowKeys, syncSelectedRows, defaultState, setPagination, paginationInfo, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
|
|
31
32
|
dataSource: ComputedRef<RecordType[]>;
|
|
32
33
|
isTreeDataRef: ComputedRef<boolean>;
|
|
33
34
|
reSetDataList: (list: RecordType[]) => void;
|
|
@@ -37,7 +38,7 @@ export declare function useFetchData({ rowKey, polling, request, postData, dataS
|
|
|
37
38
|
value?: any;
|
|
38
39
|
type?: "update" | "push" | "delete" | "unshift";
|
|
39
40
|
}) => void;
|
|
40
|
-
handleTableChange: (pagination: ProTablePaginationConfig, filters
|
|
41
|
-
|
|
41
|
+
handleTableChange: (pagination: ProTablePaginationConfig, filters?: Record<string, FilterValue | null>, sorter?: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
|
|
42
|
+
run: (info?: ProTableFetchParams) => Promise<void>;
|
|
42
43
|
};
|
|
43
44
|
export {};
|
|
@@ -1,16 +1,78 @@
|
|
|
1
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
2
2
|
import type { ComputedRef, Ref } from 'vue';
|
|
3
|
-
import type { ProSearchMap } from '../types/ColumnTypings';
|
|
4
|
-
import type {
|
|
3
|
+
import type { ProFieldValueType, ProSearchMap } from '../types/ColumnTypings';
|
|
4
|
+
import type { ProTableProps } from '../types/TableTypings';
|
|
5
5
|
export declare function handleFormDefaultValue(data: ProSearchMap[]): RecordType;
|
|
6
|
-
export declare function useTableForm({ searchMap,
|
|
6
|
+
export declare function useTableForm({ searchMap, columns }: {
|
|
7
7
|
searchMap: Ref<ProTableProps['searchMap']>;
|
|
8
|
-
params: Ref<ProTableProps['params']>;
|
|
9
8
|
columns: ComputedRef<ProTableProps['columns']>;
|
|
10
|
-
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
11
9
|
}): {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
formCols: Ref<{
|
|
11
|
+
name: string;
|
|
12
|
+
order?: number | undefined;
|
|
13
|
+
valueType?: ProFieldValueType | undefined;
|
|
14
|
+
valueFormat?: import("../types/ColumnTypings").ProFieldValueFormat | undefined;
|
|
15
|
+
placeholder?: string | string[] | undefined;
|
|
16
|
+
allowClear?: boolean | undefined;
|
|
17
|
+
showSearch?: boolean | undefined;
|
|
18
|
+
showToday?: boolean | undefined;
|
|
19
|
+
rangeStartName?: string | undefined;
|
|
20
|
+
rangeEndName?: string | undefined;
|
|
21
|
+
use12Hours?: boolean | undefined;
|
|
22
|
+
loading?: boolean | undefined;
|
|
23
|
+
showTime?: (RecordType | boolean) | undefined;
|
|
24
|
+
initialValue?: any;
|
|
25
|
+
valueKey?: string | undefined;
|
|
26
|
+
request?: {
|
|
27
|
+
fetch?: (() => Promise<import("../types/ColumnTypings").ProSchemaValueEnumType[]>) | undefined;
|
|
28
|
+
manual?: boolean | undefined;
|
|
29
|
+
debounceTime?: number | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
label?: string | undefined;
|
|
32
|
+
labelWidth?: string | number | undefined;
|
|
33
|
+
labelAlign?: "center" | "left" | "right" | undefined;
|
|
34
|
+
field?: {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
rules?: RegExp | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
valueEnum?: {
|
|
39
|
+
label: any;
|
|
40
|
+
value: any;
|
|
41
|
+
disabled?: boolean | undefined;
|
|
42
|
+
}[] | undefined;
|
|
43
|
+
}[], ProSearchMap<"text", string>[] | {
|
|
44
|
+
name: string;
|
|
45
|
+
order?: number | undefined;
|
|
46
|
+
valueType?: ProFieldValueType | undefined;
|
|
47
|
+
valueFormat?: import("../types/ColumnTypings").ProFieldValueFormat | undefined;
|
|
48
|
+
placeholder?: string | string[] | undefined;
|
|
49
|
+
allowClear?: boolean | undefined;
|
|
50
|
+
showSearch?: boolean | undefined;
|
|
51
|
+
showToday?: boolean | undefined;
|
|
52
|
+
rangeStartName?: string | undefined;
|
|
53
|
+
rangeEndName?: string | undefined;
|
|
54
|
+
use12Hours?: boolean | undefined;
|
|
55
|
+
loading?: boolean | undefined;
|
|
56
|
+
showTime?: (RecordType | boolean) | undefined;
|
|
57
|
+
initialValue?: any;
|
|
58
|
+
valueKey?: string | undefined;
|
|
59
|
+
request?: {
|
|
60
|
+
fetch?: (() => Promise<import("../types/ColumnTypings").ProSchemaValueEnumType[]>) | undefined;
|
|
61
|
+
manual?: boolean | undefined;
|
|
62
|
+
debounceTime?: number | undefined;
|
|
63
|
+
} | undefined;
|
|
64
|
+
label?: string | undefined;
|
|
65
|
+
labelWidth?: string | number | undefined;
|
|
66
|
+
labelAlign?: "center" | "left" | "right" | undefined;
|
|
67
|
+
field?: {
|
|
68
|
+
[x: string]: any;
|
|
69
|
+
rules?: RegExp | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
valueEnum?: {
|
|
72
|
+
label: any;
|
|
73
|
+
value: any;
|
|
74
|
+
disabled?: boolean | undefined;
|
|
75
|
+
}[] | undefined;
|
|
76
|
+
}[]>;
|
|
77
|
+
defaultState: Ref<RecordType, RecordType>;
|
|
16
78
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export type { BaseTableProps } from './props';
|
|
|
6
6
|
export type { ProColumnsType, ProColumnType, ProFieldValueType, ProSearchMap } from './types/ColumnTypings';
|
|
7
7
|
export type { CustomRenderResult, ProTableBodyCellProps } from './types/SlotsTypings';
|
|
8
8
|
export type { PageState, ProTableProps, RequestConfig } from './types/TableTypings';
|
|
9
|
-
export type { OptionConfig, ProCoreActionType, ProCoreFormType, ProTableFetchParams, ProTableRef, RequestFunction
|
|
9
|
+
export type { FormConfig, OptionConfig, ProCoreActionType, ProCoreFormType, ProTableFetchParams, ProTableRef, RequestFunction } from './types/TableTypings';
|