@gx-design-vue/pro-table 0.2.0-beta.151 → 0.2.0-beta.153
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 +31 -3
- package/dist/_utils/ant-design-vue/table/props.d.ts +0 -1
- package/dist/hooks/useTable.d.ts +28 -24
- package/dist/pro-table.js +685 -675
- package/dist/pro-table.umd.cjs +2 -2
- package/dist/props.d.ts +15 -262
- package/dist/types/TableTypings.d.ts +32 -1
- package/package.json +1 -1
package/dist/ProTable.d.ts
CHANGED
|
@@ -61,6 +61,17 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
61
61
|
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["waitRequest"]>;
|
|
62
62
|
default: boolean;
|
|
63
63
|
};
|
|
64
|
+
title: import("vue").PropType<import("./types/TableTypings").ProTableProps["title"]>;
|
|
65
|
+
footer: import("vue").PropType<import("./types/TableTypings").ProTableProps["footer"]>;
|
|
66
|
+
transformCellText: import("vue").PropType<import("./types/TableTypings").ProTableProps["transformCellText"]>;
|
|
67
|
+
rowExpandable: import("vue").PropType<import("./types/TableTypings").ProTableProps["rowExpandable"]>;
|
|
68
|
+
rowClassName: import("vue").PropType<import("./types/TableTypings").ProTableProps["rowClassName"]>;
|
|
69
|
+
expandIcon: import("vue").PropType<import("./types/TableTypings").ProTableProps["expandIcon"]>;
|
|
70
|
+
expandedRowKeys: import("vue").PropType<import("./types/TableTypings").ProTableProps["expandedRowKeys"]>;
|
|
71
|
+
defaultExpandedRowKeys: import("vue").PropType<import("./types/TableTypings").ProTableProps["defaultExpandedRowKeys"]>;
|
|
72
|
+
expandedRowRender: import("vue").PropType<import("./types/TableTypings").ProTableProps["expandedRowRender"]>;
|
|
73
|
+
customRow: import("vue").PropType<import("./types/TableTypings").ProTableProps["customRow"]>;
|
|
74
|
+
customHeaderRow: import("vue").PropType<import("./types/TableTypings").ProTableProps["customHeaderRow"]>;
|
|
64
75
|
polling: import("vue").PropType<import("./types/TableTypings").ProTableProps["polling"]>;
|
|
65
76
|
debounceTime: {
|
|
66
77
|
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["debounceTime"]>;
|
|
@@ -155,15 +166,18 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
155
166
|
onReset: import("vue").PropType<import("./types/TableTypings").ProTableProps["onReset"]>;
|
|
156
167
|
onReload: import("vue").PropType<import("./types/TableTypings").ProTableProps["onReload"]>;
|
|
157
168
|
onSubmit: import("vue").PropType<import("./types/TableTypings").ProTableProps["onSubmit"]>;
|
|
169
|
+
onChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onChange"]>;
|
|
158
170
|
onSizeChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onSizeChange"]>;
|
|
159
171
|
onLoadingChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onLoadingChange"]>;
|
|
160
172
|
onRequestError: import("vue").PropType<import("./types/TableTypings").ProTableProps["onRequestError"]>;
|
|
161
173
|
onBeforeSearchSubmit: import("vue").PropType<import("./types/TableTypings").ProTableProps["onBeforeSearchSubmit"]>;
|
|
174
|
+
onExpand: import("vue").PropType<import("./types/TableTypings").ProTableProps["onExpand"]>;
|
|
175
|
+
onResizeColumn: import("vue").PropType<import("./types/TableTypings").ProTableProps["onResizeColumn"]>;
|
|
176
|
+
onExpandedRowsChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onExpandedRowsChange"]>;
|
|
162
177
|
direction: {
|
|
163
178
|
type: import("vue").PropType<"rtl" | "ltr">;
|
|
164
179
|
default: string;
|
|
165
180
|
};
|
|
166
|
-
transformCellText: import("vue").PropType<import("ant-design-vue").TableProps["transformCellText"]>;
|
|
167
181
|
bordered: {
|
|
168
182
|
type: import("vue").PropType<import("ant-design-vue").TableProps["bordered"]>;
|
|
169
183
|
default: undefined;
|
|
@@ -240,6 +254,17 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
240
254
|
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["waitRequest"]>;
|
|
241
255
|
default: boolean;
|
|
242
256
|
};
|
|
257
|
+
title: import("vue").PropType<import("./types/TableTypings").ProTableProps["title"]>;
|
|
258
|
+
footer: import("vue").PropType<import("./types/TableTypings").ProTableProps["footer"]>;
|
|
259
|
+
transformCellText: import("vue").PropType<import("./types/TableTypings").ProTableProps["transformCellText"]>;
|
|
260
|
+
rowExpandable: import("vue").PropType<import("./types/TableTypings").ProTableProps["rowExpandable"]>;
|
|
261
|
+
rowClassName: import("vue").PropType<import("./types/TableTypings").ProTableProps["rowClassName"]>;
|
|
262
|
+
expandIcon: import("vue").PropType<import("./types/TableTypings").ProTableProps["expandIcon"]>;
|
|
263
|
+
expandedRowKeys: import("vue").PropType<import("./types/TableTypings").ProTableProps["expandedRowKeys"]>;
|
|
264
|
+
defaultExpandedRowKeys: import("vue").PropType<import("./types/TableTypings").ProTableProps["defaultExpandedRowKeys"]>;
|
|
265
|
+
expandedRowRender: import("vue").PropType<import("./types/TableTypings").ProTableProps["expandedRowRender"]>;
|
|
266
|
+
customRow: import("vue").PropType<import("./types/TableTypings").ProTableProps["customRow"]>;
|
|
267
|
+
customHeaderRow: import("vue").PropType<import("./types/TableTypings").ProTableProps["customHeaderRow"]>;
|
|
243
268
|
polling: import("vue").PropType<import("./types/TableTypings").ProTableProps["polling"]>;
|
|
244
269
|
debounceTime: {
|
|
245
270
|
type: import("vue").PropType<import("./types/TableTypings").ProTableProps["debounceTime"]>;
|
|
@@ -334,15 +359,18 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
334
359
|
onReset: import("vue").PropType<import("./types/TableTypings").ProTableProps["onReset"]>;
|
|
335
360
|
onReload: import("vue").PropType<import("./types/TableTypings").ProTableProps["onReload"]>;
|
|
336
361
|
onSubmit: import("vue").PropType<import("./types/TableTypings").ProTableProps["onSubmit"]>;
|
|
362
|
+
onChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onChange"]>;
|
|
337
363
|
onSizeChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onSizeChange"]>;
|
|
338
364
|
onLoadingChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onLoadingChange"]>;
|
|
339
365
|
onRequestError: import("vue").PropType<import("./types/TableTypings").ProTableProps["onRequestError"]>;
|
|
340
366
|
onBeforeSearchSubmit: import("vue").PropType<import("./types/TableTypings").ProTableProps["onBeforeSearchSubmit"]>;
|
|
367
|
+
onExpand: import("vue").PropType<import("./types/TableTypings").ProTableProps["onExpand"]>;
|
|
368
|
+
onResizeColumn: import("vue").PropType<import("./types/TableTypings").ProTableProps["onResizeColumn"]>;
|
|
369
|
+
onExpandedRowsChange: import("vue").PropType<import("./types/TableTypings").ProTableProps["onExpandedRowsChange"]>;
|
|
341
370
|
direction: {
|
|
342
371
|
type: import("vue").PropType<"rtl" | "ltr">;
|
|
343
372
|
default: string;
|
|
344
373
|
};
|
|
345
|
-
transformCellText: import("vue").PropType<import("ant-design-vue").TableProps["transformCellText"]>;
|
|
346
374
|
bordered: {
|
|
347
375
|
type: import("vue").PropType<import("ant-design-vue").TableProps["bordered"]>;
|
|
348
376
|
default: undefined;
|
|
@@ -384,7 +412,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
384
412
|
rowKey: string;
|
|
385
413
|
id: string;
|
|
386
414
|
direction: "rtl" | "ltr";
|
|
387
|
-
pagination:
|
|
415
|
+
pagination: import("./types/TableTypings").ProTablePagination | undefined;
|
|
388
416
|
loading: boolean | Partial<import("vue").ExtractPropTypes<{
|
|
389
417
|
prefixCls: StringConstructor;
|
|
390
418
|
spinning: {
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
2
2
|
import type { ComputedRef, MaybeRef, Reactive, Ref } from 'vue';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { ProColumnsType, ProSearchMap } from '../types/ColumnTypings';
|
|
3
|
+
import type { BaseTableProps } from '../props';
|
|
4
|
+
import type { ProColumnsType, ProColumnType, ProSearchMap } from '../types/ColumnTypings';
|
|
6
5
|
import type { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequestConfig, RequestFunction } from '../types/TableTypings';
|
|
7
|
-
export type ProTableState<T extends object = RecordType, R extends object = RecordType> = Omit<
|
|
6
|
+
export type ProTableState<T extends object = RecordType, R extends object = RecordType> = Omit<BaseTableProps, 'columns' | 'params' | 'dataSource' | 'rowSelection' | 'searchMap' | 'rowKey' | 'postData' | 'onReset' | 'onReload' | 'onSubmit' | 'onExpand' | 'title' | 'footer' | 'rowExpandable' | 'transformCellText' | 'expandIcon' | 'rowClassName' | 'customRow' | 'customHeaderRow' | 'expandedRowRender' | 'onBeforeSearchSubmit'> & {
|
|
8
7
|
params: R;
|
|
9
8
|
columns: ProColumnsType<T, R>;
|
|
9
|
+
dataSource: T[];
|
|
10
10
|
rowSelection: ProTableRowSelection<T>;
|
|
11
11
|
searchMap: ProSearchMap<undefined, keyof R | keyof T>[];
|
|
12
|
-
postData?: (data: T[]) => any;
|
|
13
|
-
onReset?: (params?: Partial<R>) => void;
|
|
14
|
-
onReload?: (params?: Partial<R>) => void;
|
|
15
|
-
onSubmit?: (params?: Partial<R>) => void;
|
|
16
12
|
rowKey?: keyof T;
|
|
13
|
+
title?: (data: T[]) => any;
|
|
14
|
+
footer?: (data: T[]) => any;
|
|
15
|
+
postData?: (data: T[]) => any;
|
|
17
16
|
rowExpandable?: (record: T) => boolean;
|
|
18
|
-
|
|
19
|
-
customRow?: (record: T, index: number) => void;
|
|
20
|
-
headerCell?: (props: {
|
|
21
|
-
title: any;
|
|
22
|
-
column: ProColumnsType<T, R>;
|
|
23
|
-
}) => void;
|
|
24
|
-
customHeaderRow?: (columns: ProColumnsType<T, R>, index: number) => void;
|
|
25
|
-
bodyCell?: (props: {
|
|
17
|
+
transformCellText?: (opt: {
|
|
26
18
|
text: any;
|
|
27
|
-
|
|
28
|
-
record:
|
|
19
|
+
column: ProColumnType<T, R>;
|
|
20
|
+
record: any;
|
|
29
21
|
index: number;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
}) => any;
|
|
23
|
+
expandIcon?: (props: {
|
|
24
|
+
prefixCls: string;
|
|
25
|
+
expanded: boolean;
|
|
26
|
+
record: T;
|
|
27
|
+
expandable: boolean;
|
|
28
|
+
onExpand: (record: T, event: MouseEvent) => void;
|
|
29
|
+
}) => any;
|
|
30
|
+
customRow?: (data: T, index?: number, column?: ProColumnType<T, R>) => any;
|
|
31
|
+
customHeaderRow?: (data: T, index?: number, column?: ProColumnType<T, R>) => any;
|
|
32
|
+
expandedRowRender: (opt: {
|
|
33
33
|
record: T;
|
|
34
34
|
index: number;
|
|
35
35
|
indent: number;
|
|
36
36
|
expanded: boolean;
|
|
37
37
|
}) => any;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
rowClassName?: string | ((record: T, index: number, indent: number) => string);
|
|
39
|
+
onReset?: (params?: Partial<R>) => void;
|
|
40
|
+
onReload?: (params?: Partial<R>) => void;
|
|
41
|
+
onSubmit?: (params?: Partial<R>) => void;
|
|
42
|
+
onExpand?: (expanded: boolean, record: T) => void;
|
|
43
|
+
onResizeColumn?: (w: number, col: ProColumnType<T, R>) => void;
|
|
44
|
+
onBeforeSearchSubmit?: RequestFunction<T, R>;
|
|
41
45
|
};
|
|
42
46
|
export type BaseTableState<T extends object = RecordType, R extends object = RecordType> = Omit<ProTableProps<T, R>, 'request'>;
|
|
43
47
|
export interface UseTableReturn<T extends object = RecordType, R extends object = RecordType> {
|