@gx-design-vue/pro-table 0.2.0-beta.4 → 0.2.0-beta.41
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 +263 -367
- package/dist/_utils/ant-design-vue/index.d.ts +2 -0
- 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 +248 -2
- package/dist/_utils/ant-design-vue/table/typings.d.ts +3 -2
- package/dist/_utils/ant-design-vue/tooltip/typings.d.ts +1 -0
- package/dist/_utils/index.d.ts +0 -1
- package/dist/components/ColumnSetting/style.d.ts +2 -5
- package/dist/components/Form/index.d.ts +6 -5
- package/dist/components/Form/style.d.ts +2 -5
- package/dist/components/ListToolBar/style.d.ts +2 -5
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -2
- package/dist/context/TableContext.d.ts +4 -4
- package/dist/hooks/useColums.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +8 -6
- package/dist/hooks/useLoading.d.ts +3 -11
- package/dist/hooks/useRowSelection.d.ts +2 -2
- package/dist/hooks/useTable.d.ts +6 -3
- package/dist/hooks/useTableForm.d.ts +3 -2
- package/dist/hooks/useTableScroll.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/pro-table.mjs +1517 -31526
- package/dist/pro-table.umd.js +1 -328
- package/dist/props.d.ts +108 -147
- package/dist/style.d.ts +2 -6
- package/dist/types/TableTypings.d.ts +34 -19
- package/dist/utils/utils.d.ts +1 -1
- package/package.json +5 -4
- package/dist/_utils/typings.d.ts +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ChangeEvent } from 'ant-design-vue/es/_util/EventInterface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { SpinProps } from 'ant-design-vue';
|
|
@@ -1,2 +1,248 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { SizeType } from '@gx-design-vue/pro-utils';
|
|
3
|
+
import type { ColumnsType, TableLocale, FilterValue, SorterResult, TableCurrentDataSource, ColumnType, TableRowSelection, GetPopupContainer, SortOrder } from './typings';
|
|
4
|
+
import type { ProTablePagination } from '../../../types/TableTypings';
|
|
5
|
+
export declare const tableProps: () => {
|
|
6
|
+
prefixCls: {
|
|
7
|
+
type: PropType<string>;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
columns: {
|
|
11
|
+
type: PropType<ColumnsType<any>>;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
tableLayout: {
|
|
15
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").TableLayout | undefined>;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
18
|
+
rowClassName: {
|
|
19
|
+
type: PropType<string | import("ant-design-vue/es/vc-table/interface").RowClassName<any> | undefined>;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
title: {
|
|
23
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").PanelRender<any> | undefined>;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
26
|
+
footer: {
|
|
27
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").PanelRender<any> | undefined>;
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
id: {
|
|
31
|
+
type: PropType<string | undefined>;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
34
|
+
showHeader: {
|
|
35
|
+
type: PropType<boolean>;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
components: {
|
|
39
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").TableComponents<any> | undefined>;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
customRow: {
|
|
43
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").GetComponentProps<any> | undefined>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
customHeaderRow: {
|
|
47
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").GetComponentProps<import("ant-design-vue/es/vc-table/interface").ColumnType<any>[]> | undefined>;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
direction: {
|
|
51
|
+
type: PropType<"ltr" | "rtl" | undefined>;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
expandFixed: {
|
|
55
|
+
type: PropType<boolean | "right" | "left" | undefined>;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
expandColumnWidth: {
|
|
59
|
+
type: PropType<number>;
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
expandedRowKeys: {
|
|
63
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").Key[] | undefined>;
|
|
64
|
+
default: undefined;
|
|
65
|
+
};
|
|
66
|
+
defaultExpandedRowKeys: {
|
|
67
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").Key[] | undefined>;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
expandedRowRender: {
|
|
71
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").ExpandedRowRender<any> | undefined>;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
expandRowByClick: {
|
|
75
|
+
type: PropType<boolean>;
|
|
76
|
+
default: undefined;
|
|
77
|
+
};
|
|
78
|
+
expandIcon: {
|
|
79
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").RenderExpandIcon<any> | undefined>;
|
|
80
|
+
default: undefined;
|
|
81
|
+
};
|
|
82
|
+
onExpand: {
|
|
83
|
+
type: PropType<((expanded: boolean, record: any) => void) | undefined>;
|
|
84
|
+
default: undefined;
|
|
85
|
+
};
|
|
86
|
+
onExpandedRowsChange: {
|
|
87
|
+
type: PropType<((expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void) | undefined>;
|
|
88
|
+
default: undefined;
|
|
89
|
+
};
|
|
90
|
+
'onUpdate:expandedRowKeys': {
|
|
91
|
+
type: PropType<((expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void) | undefined>;
|
|
92
|
+
default: undefined;
|
|
93
|
+
};
|
|
94
|
+
defaultExpandAllRows: {
|
|
95
|
+
type: PropType<boolean>;
|
|
96
|
+
default: undefined;
|
|
97
|
+
};
|
|
98
|
+
indentSize: {
|
|
99
|
+
type: PropType<number>;
|
|
100
|
+
default: undefined;
|
|
101
|
+
};
|
|
102
|
+
/** @deprecated Please use `EXPAND_COLUMN` in `columns` directly */
|
|
103
|
+
expandIconColumnIndex: {
|
|
104
|
+
type: PropType<number>;
|
|
105
|
+
default: undefined;
|
|
106
|
+
};
|
|
107
|
+
showExpandColumn: {
|
|
108
|
+
type: PropType<boolean>;
|
|
109
|
+
default: undefined;
|
|
110
|
+
};
|
|
111
|
+
expandedRowClassName: {
|
|
112
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").RowClassName<any> | undefined>;
|
|
113
|
+
default: undefined;
|
|
114
|
+
};
|
|
115
|
+
childrenColumnName: {
|
|
116
|
+
type: PropType<string | undefined>;
|
|
117
|
+
default: undefined;
|
|
118
|
+
};
|
|
119
|
+
rowExpandable: {
|
|
120
|
+
type: PropType<((record: any) => boolean) | undefined>;
|
|
121
|
+
default: undefined;
|
|
122
|
+
};
|
|
123
|
+
sticky: {
|
|
124
|
+
type: PropType<boolean | import("ant-design-vue/es/vc-table/interface").TableSticky | undefined>;
|
|
125
|
+
default: undefined;
|
|
126
|
+
};
|
|
127
|
+
dropdownPrefixCls: {
|
|
128
|
+
type: PropType<string>;
|
|
129
|
+
default: undefined;
|
|
130
|
+
};
|
|
131
|
+
dataSource: {
|
|
132
|
+
type: PropType<any[] | undefined>;
|
|
133
|
+
default: undefined;
|
|
134
|
+
};
|
|
135
|
+
loading: {
|
|
136
|
+
type: PropType<boolean | Partial<import("vue").ExtractPropTypes<{
|
|
137
|
+
prefixCls: StringConstructor;
|
|
138
|
+
spinning: {
|
|
139
|
+
type: BooleanConstructor;
|
|
140
|
+
default: any;
|
|
141
|
+
};
|
|
142
|
+
size: PropType<import("ant-design-vue/es/spin/Spin").SpinSize>;
|
|
143
|
+
wrapperClassName: StringConstructor;
|
|
144
|
+
tip: import("vue-types").VueTypeValidableDef<any>;
|
|
145
|
+
delay: NumberConstructor;
|
|
146
|
+
indicator: import("vue-types").VueTypeValidableDef<any>;
|
|
147
|
+
}>>>;
|
|
148
|
+
default: undefined;
|
|
149
|
+
};
|
|
150
|
+
size: {
|
|
151
|
+
type: PropType<SizeType>;
|
|
152
|
+
default: undefined;
|
|
153
|
+
};
|
|
154
|
+
locale: {
|
|
155
|
+
type: PropType<TableLocale>;
|
|
156
|
+
default: undefined;
|
|
157
|
+
};
|
|
158
|
+
onChange: {
|
|
159
|
+
type: PropType<(pagination: ProTablePagination, filters: Record<string, FilterValue | null>, sorter: SorterResult | SorterResult[], extra: TableCurrentDataSource) => void>;
|
|
160
|
+
default: undefined;
|
|
161
|
+
};
|
|
162
|
+
onResizeColumn: {
|
|
163
|
+
type: PropType<(w: number, col: ColumnType) => void>;
|
|
164
|
+
default: undefined;
|
|
165
|
+
};
|
|
166
|
+
rowSelection: {
|
|
167
|
+
type: PropType<TableRowSelection<any>>;
|
|
168
|
+
default: undefined;
|
|
169
|
+
};
|
|
170
|
+
getPopupContainer: {
|
|
171
|
+
type: PropType<GetPopupContainer>;
|
|
172
|
+
default: undefined;
|
|
173
|
+
};
|
|
174
|
+
scroll: {
|
|
175
|
+
type: PropType<{
|
|
176
|
+
x?: string | number | true | undefined;
|
|
177
|
+
y?: string | number | undefined;
|
|
178
|
+
} & {
|
|
179
|
+
scrollToFirstRowOnChange?: boolean | undefined;
|
|
180
|
+
}>;
|
|
181
|
+
default: undefined;
|
|
182
|
+
};
|
|
183
|
+
sortDirections: {
|
|
184
|
+
type: PropType<SortOrder[]>;
|
|
185
|
+
default: undefined;
|
|
186
|
+
};
|
|
187
|
+
showSorterTooltip: {
|
|
188
|
+
type: PropType<boolean | Partial<import("vue").ExtractPropTypes<{
|
|
189
|
+
title: import("vue-types").VueTypeValidableDef<any>;
|
|
190
|
+
trigger: PropType<import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType | import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType[]>;
|
|
191
|
+
open: {
|
|
192
|
+
type: BooleanConstructor;
|
|
193
|
+
default: any;
|
|
194
|
+
};
|
|
195
|
+
visible: {
|
|
196
|
+
type: BooleanConstructor;
|
|
197
|
+
default: any;
|
|
198
|
+
};
|
|
199
|
+
placement: PropType<import("ant-design-vue/es/tooltip").TooltipPlacement>;
|
|
200
|
+
color: PropType<import("ant-design-vue/es/_util/type").LiteralUnion<import("ant-design-vue/es/_util/colors").PresetColorType>>;
|
|
201
|
+
transitionName: StringConstructor;
|
|
202
|
+
overlayStyle: {
|
|
203
|
+
type: PropType<import("vue").CSSProperties>;
|
|
204
|
+
default: import("vue").CSSProperties;
|
|
205
|
+
};
|
|
206
|
+
overlayInnerStyle: {
|
|
207
|
+
type: PropType<import("vue").CSSProperties>;
|
|
208
|
+
default: import("vue").CSSProperties;
|
|
209
|
+
};
|
|
210
|
+
overlayClassName: StringConstructor;
|
|
211
|
+
openClassName: StringConstructor;
|
|
212
|
+
prefixCls: StringConstructor;
|
|
213
|
+
mouseEnterDelay: NumberConstructor;
|
|
214
|
+
mouseLeaveDelay: NumberConstructor;
|
|
215
|
+
getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
216
|
+
arrowPointAtCenter: {
|
|
217
|
+
type: BooleanConstructor;
|
|
218
|
+
default: any;
|
|
219
|
+
};
|
|
220
|
+
autoAdjustOverflow: {
|
|
221
|
+
type: PropType<boolean | import("ant-design-vue/es/tooltip").AdjustOverflow>;
|
|
222
|
+
default: boolean | import("ant-design-vue/es/tooltip").AdjustOverflow;
|
|
223
|
+
};
|
|
224
|
+
destroyTooltipOnHide: {
|
|
225
|
+
type: BooleanConstructor;
|
|
226
|
+
default: any;
|
|
227
|
+
};
|
|
228
|
+
align: {
|
|
229
|
+
type: PropType<import("ant-design-vue/es/vc-trigger/interface").AlignType>;
|
|
230
|
+
default: import("ant-design-vue/es/vc-trigger/interface").AlignType;
|
|
231
|
+
};
|
|
232
|
+
builtinPlacements: {
|
|
233
|
+
type: PropType<import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements>;
|
|
234
|
+
default: import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements;
|
|
235
|
+
};
|
|
236
|
+
children: ArrayConstructor;
|
|
237
|
+
onVisibleChange: PropType<(vis: boolean) => void>;
|
|
238
|
+
'onUpdate:visible': PropType<(vis: boolean) => void>;
|
|
239
|
+
onOpenChange: PropType<(vis: boolean) => void>;
|
|
240
|
+
'onUpdate:open': PropType<(vis: boolean) => void>;
|
|
241
|
+
}>>>;
|
|
242
|
+
default: boolean;
|
|
243
|
+
};
|
|
244
|
+
transformCellText: {
|
|
245
|
+
type: PropType<import("ant-design-vue/es/vc-table/interface").TransformCellText<any> | undefined>;
|
|
246
|
+
default: undefined;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { TableProps, ColumnType } from 'ant-design-vue/es/table';
|
|
2
|
-
import type { FilterValue, SorterResult } from 'ant-design-vue/es/table/interface';
|
|
2
|
+
import type { FilterValue, SorterResult, ColumnsType, TableLocale, TableCurrentDataSource, GetPopupContainer, SortOrder } from 'ant-design-vue/es/table/interface';
|
|
3
3
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
|
+
import type { TableProps as RcTableProps } from 'ant-design-vue/es/vc-table/Table';
|
|
4
5
|
export type { TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
|
|
5
6
|
export type { Key } from 'ant-design-vue/es/vc-table/interface';
|
|
6
7
|
export type TableFilters = Record<string, FilterValue | null>;
|
|
7
8
|
export type TableSorterRecord = SorterResult<RecordType>;
|
|
8
9
|
export type TableSorter = TableSorterRecord | TableSorterRecord[];
|
|
9
|
-
export type { TableProps, ColumnType, FilterValue, SorterResult };
|
|
10
|
+
export type { TableProps, ColumnType, FilterValue, SorterResult, ColumnsType, TableLocale, TableCurrentDataSource, GetPopupContainer, RcTableProps, SortOrder };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { TooltipProps } from 'ant-design-vue/es/tooltip';
|
package/dist/_utils/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
+
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
1
2
|
import type { ProAliasToken } from '@gx-design-vue/pro-provider';
|
|
2
|
-
export
|
|
3
|
-
componentCls: string;
|
|
4
|
-
}
|
|
5
|
-
declare const _default: (_prefixCls?: string | import("vue").Ref<string> | undefined) => import("ant-design-vue/es/theme/internal").UseComponentStyleResult;
|
|
6
|
-
export default _default;
|
|
3
|
+
export declare const genColumnSettingStyle: GenerateStyle<ProAliasToken>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
|
+
import type { SearchConfig } from '../../types/TableTypings';
|
|
3
4
|
import type { ProSearchMap } from '../../types/ColumnTypings';
|
|
4
5
|
declare const ProTableForm: import("vue").DefineComponent<{
|
|
5
6
|
search: {
|
|
6
|
-
type: PropType<
|
|
7
|
-
default: () =>
|
|
7
|
+
type: PropType<SearchConfig>;
|
|
8
|
+
default: () => SearchConfig;
|
|
8
9
|
};
|
|
9
10
|
modal: PropType<boolean | undefined>;
|
|
10
11
|
searchMap: {
|
|
@@ -16,8 +17,8 @@ declare const ProTableForm: import("vue").DefineComponent<{
|
|
|
16
17
|
defaultParams: PropType<RecordType>;
|
|
17
18
|
}, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "search"[], "search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
19
|
search: {
|
|
19
|
-
type: PropType<
|
|
20
|
-
default: () =>
|
|
20
|
+
type: PropType<SearchConfig>;
|
|
21
|
+
default: () => SearchConfig;
|
|
21
22
|
};
|
|
22
23
|
modal: PropType<boolean | undefined>;
|
|
23
24
|
searchMap: {
|
|
@@ -30,7 +31,7 @@ declare const ProTableForm: import("vue").DefineComponent<{
|
|
|
30
31
|
}>> & {
|
|
31
32
|
onSearch?: ((...args: any[]) => any) | undefined;
|
|
32
33
|
}, {
|
|
33
|
-
search:
|
|
34
|
+
search: SearchConfig;
|
|
34
35
|
searchMap: ProSearchMap<"text">[];
|
|
35
36
|
}>;
|
|
36
37
|
export default ProTableForm;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
+
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
1
2
|
import type { ProAliasToken } from '@gx-design-vue/pro-provider';
|
|
2
|
-
export
|
|
3
|
-
componentCls: string;
|
|
4
|
-
}
|
|
5
|
-
declare const _default: (_prefixCls?: string | import("vue").Ref<string> | undefined) => import("ant-design-vue/es/theme/internal").UseComponentStyleResult;
|
|
6
|
-
export default _default;
|
|
3
|
+
export declare const genTableFormStyle: GenerateStyle<ProAliasToken>;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
+
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
1
2
|
import type { ProAliasToken } from '@gx-design-vue/pro-provider';
|
|
2
|
-
export
|
|
3
|
-
componentCls: string;
|
|
4
|
-
}
|
|
5
|
-
declare const _default: (_prefixCls?: string | import("vue").Ref<string> | undefined) => import("ant-design-vue/es/theme/internal").UseComponentStyleResult;
|
|
6
|
-
export default _default;
|
|
3
|
+
export declare const genListToolBarStyle: GenerateStyle<ProAliasToken>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const FullScreenIcon: FC;
|
|
1
|
+
declare const FullScreenIcon: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
3
2
|
export default FullScreenIcon;
|
|
@@ -4,9 +4,9 @@ import type { SizeType } from '@gx-design-vue/pro-utils';
|
|
|
4
4
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
5
|
import type { ColumnsState, SettingsAction } from '../hooks/useColumnSetting';
|
|
6
6
|
import type { PaginationProps } from '../_utils';
|
|
7
|
-
export type ContextType = any;
|
|
8
7
|
export interface TableContextProps {
|
|
9
8
|
columns?: ComputedRef<ProColumnsType>;
|
|
9
|
+
isMobile?: ComputedRef<boolean>;
|
|
10
10
|
cacheColumns?: ComputedRef<ProColumnsType>;
|
|
11
11
|
tableSize?: Ref<SizeType>;
|
|
12
12
|
action?: {
|
|
@@ -21,6 +21,6 @@ export interface TableContextProps {
|
|
|
21
21
|
changeColumns: (map: Record<string, ColumnsState>, fixed: boolean) => void;
|
|
22
22
|
[key: string]: any;
|
|
23
23
|
}
|
|
24
|
-
export declare const useContext: <T>(contextInjectKey?: string | InjectionKey<
|
|
25
|
-
export declare const provideTableContext: (value: TableContextProps
|
|
26
|
-
export declare const useTableContext: () => Required<TableContextProps>;
|
|
24
|
+
export declare const useContext: <T>(contextInjectKey?: string | InjectionKey<T>, defaultValue?: T | undefined) => T;
|
|
25
|
+
export declare const provideTableContext: (value: TableContextProps) => void;
|
|
26
|
+
export declare const useTableContext: (defaultValue?: Required<TableContextProps>) => Required<TableContextProps>;
|
|
@@ -9,12 +9,12 @@ export type ConfigColumns = {
|
|
|
9
9
|
};
|
|
10
10
|
type UseColumnsType = {
|
|
11
11
|
scroll: ComputedRef<ProTableProps['scroll']>;
|
|
12
|
-
breakpoint: ComputedRef<boolean>;
|
|
12
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
13
13
|
columns: ComputedRef<ProColumnsType>;
|
|
14
14
|
} & ConfigColumns;
|
|
15
15
|
export declare function useConfigColumns(props: ProTableProps): ConfigColumns;
|
|
16
16
|
export declare function useColumns({ scroll, columns, breakpoint, draggabled, autoScroll, neverScroll }: UseColumnsType): {
|
|
17
|
-
breakpoint: ComputedRef<boolean>;
|
|
17
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
18
18
|
getProColumns: ComputedRef<ProColumnType<import("../typing").DefaultRecordType>[]>;
|
|
19
19
|
cacheProColumns: Ref<ProColumnsType<import("../typing").DefaultRecordType>>;
|
|
20
20
|
setColumns: (columnList: ProColumnsType<import("../typing").DefaultRecordType>) => void;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type { SpinProps, TableSorter } from '../_utils';
|
|
3
2
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
3
|
import type { ProTableProps, ProTablePagination, ProTabelFeachParams, ProTablePaginationConfig } from '../types/TableTypings';
|
|
5
4
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
|
+
import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils/ant-design-vue/table/typings';
|
|
6
6
|
interface ActionType {
|
|
7
|
-
|
|
7
|
+
loadingStatus: ComputedRef<boolean | undefined>;
|
|
8
8
|
getPaginationInfo: ComputedRef<ProTablePagination>;
|
|
9
9
|
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
10
|
-
setLoading: (loading: boolean
|
|
10
|
+
setLoading: (loading: boolean) => void;
|
|
11
11
|
setColumns: (columnList: ProColumnsType) => void;
|
|
12
12
|
removeRowKeys: (keyList: (string | number)[]) => void;
|
|
13
13
|
syncSelectedRows: (dataList: any[]) => void;
|
|
14
14
|
columns: ComputedRef<ProColumnsType>;
|
|
15
15
|
formParamsRef: RecordType;
|
|
16
16
|
onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
|
|
17
|
+
hasCustomRender: ComputedRef<boolean>;
|
|
17
18
|
}
|
|
18
19
|
export type ConfigFetchData = {
|
|
19
20
|
polling: ComputedRef<ProTableProps['polling']>;
|
|
@@ -24,15 +25,16 @@ export type ConfigFetchData = {
|
|
|
24
25
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
25
26
|
};
|
|
26
27
|
export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
|
|
27
|
-
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns,
|
|
28
|
+
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns, loadingStatus, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
|
|
28
29
|
getDataSourceRef: ComputedRef<RecordType[]>;
|
|
29
30
|
isTreeDataRef: ComputedRef<boolean>;
|
|
30
31
|
reSetDataList: (list: RecordType[]) => void;
|
|
31
|
-
changeDataValue: ({ key, params }: {
|
|
32
|
+
changeDataValue: ({ key, params, type }: {
|
|
32
33
|
key?: string | undefined;
|
|
33
34
|
params: RecordType;
|
|
35
|
+
type?: "update" | "add" | "delete" | undefined;
|
|
34
36
|
}) => void;
|
|
35
|
-
handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string,
|
|
37
|
+
handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
|
|
36
38
|
reload: (info?: ProTabelFeachParams) => Promise<void>;
|
|
37
39
|
};
|
|
38
40
|
export {};
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
2
|
import type { SpinProps } from '../_utils';
|
|
3
3
|
export declare function useLoading({ emit, loading }: {
|
|
4
4
|
loading: Ref<boolean | SpinProps | undefined>;
|
|
5
5
|
emit: any;
|
|
6
6
|
}): {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
spinning?: boolean | undefined;
|
|
10
|
-
size?: "small" | "default" | "large" | undefined;
|
|
11
|
-
wrapperClassName?: string | undefined;
|
|
12
|
-
tip?: string | undefined;
|
|
13
|
-
delay?: number | undefined;
|
|
14
|
-
indicator?: any;
|
|
15
|
-
}>;
|
|
16
|
-
setLoading: (loading: boolean | SpinProps) => void;
|
|
7
|
+
loadingStatus: import("vue").ComputedRef<boolean>;
|
|
8
|
+
setLoading: (loading: boolean) => void;
|
|
17
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type { ProTableProps } from '../types/TableTypings';
|
|
4
|
-
export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<
|
|
3
|
+
import type { ProTableProps, ProTableRowSelection } from '../types/TableTypings';
|
|
4
|
+
export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<ProTableRowSelection | undefined>): {
|
|
5
5
|
selectedKey: Ref<(string | number)[]>;
|
|
6
6
|
selectRowKey: (record: RecordType, selected: any[]) => void;
|
|
7
7
|
selectAllRowKey: (selected: any[], selectedRows: any[], changeRows: any[]) => void;
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { Ref, ComputedRef } from 'vue';
|
|
2
2
|
import type { ProCoreActionType, ProCoreFormType, ProTableRef } from '../types/TableTypings';
|
|
3
|
-
export declare function useTable(tableRef: Ref<ProTableRef>): {
|
|
3
|
+
export declare function useTable<T = any>(tableRef: Ref<ProTableRef>): {
|
|
4
|
+
dataSource: ComputedRef<T>;
|
|
5
|
+
loading: ComputedRef<boolean | undefined>;
|
|
4
6
|
params: ComputedRef<Record<string, any>>;
|
|
5
|
-
loading: ComputedRef<ProCoreActionType['getLoadingStatus']>;
|
|
6
7
|
reload: ProCoreActionType['reload'];
|
|
7
8
|
mutate: ProCoreActionType['reSetDataList'];
|
|
8
|
-
|
|
9
|
+
setPageAndReload: ProCoreActionType['setPageAndReload'];
|
|
10
|
+
changeDataValue: ProCoreActionType['changeDataValue'];
|
|
11
|
+
setPagination: ProCoreActionType['setPagination'];
|
|
9
12
|
changeLoading: ProCoreActionType['loadingOperation'];
|
|
10
13
|
actionRef: ComputedRef<ProCoreActionType>;
|
|
11
14
|
formRef: ComputedRef<ProCoreFormType>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type { ProTableProps } from '../types/TableTypings';
|
|
3
|
+
import type { ProTablePagination, ProTableProps } from '../types/TableTypings';
|
|
4
4
|
import type { ProSearchMap } from '../types/ColumnTypings';
|
|
5
5
|
export declare function handleFormDefaultValue(data: ProSearchMap[]): any;
|
|
6
|
-
export declare function useTableForm({ search, searchMap, params, columns }: {
|
|
6
|
+
export declare function useTableForm({ search, searchMap, params, columns, setPagination }: {
|
|
7
7
|
search: Ref<ProTableProps['search']>;
|
|
8
8
|
searchMap: Ref<ProTableProps['searchMap']>;
|
|
9
9
|
params: Ref<ProTableProps['params']>;
|
|
10
10
|
columns: ComputedRef<ProTableProps['columns']>;
|
|
11
|
+
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
11
12
|
}): {
|
|
12
13
|
formDataRef: Ref<ProSearchMap<"text">[]>;
|
|
13
14
|
formParamsRef: RecordType;
|
|
@@ -13,16 +13,16 @@ type ConfigScroll = {
|
|
|
13
13
|
type useTableScrollType = {
|
|
14
14
|
columns: ComputedRef<ProColumnsType>;
|
|
15
15
|
innerWidth: Ref<number>;
|
|
16
|
-
|
|
16
|
+
screens: Ref<Partial<Record<Breakpoint, boolean>>>;
|
|
17
17
|
} & ConfigScroll;
|
|
18
18
|
export declare function useConfigScroll(props: ProTableProps): ConfigScroll;
|
|
19
|
-
export declare function useTableScroll({ scroll, columns, autoScroll, modalScroll, neverScroll, rowSelection,
|
|
19
|
+
export declare function useTableScroll({ scroll, columns, autoScroll, modalScroll, neverScroll, rowSelection, screens, innerWidth, scrollBreakpoint }: useTableScrollType): {
|
|
20
20
|
getScrollRef: ComputedRef<({
|
|
21
21
|
x?: string | number | true | undefined;
|
|
22
22
|
y?: string | number | undefined;
|
|
23
23
|
} & {
|
|
24
24
|
scrollToFirstRowOnChange?: boolean | undefined;
|
|
25
25
|
}) | undefined>;
|
|
26
|
-
breakpoint: ComputedRef<boolean>;
|
|
26
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
27
27
|
};
|
|
28
28
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { useTable } from './hooks/useTable';
|
|
|
2
2
|
export { proTableProps } from './props';
|
|
3
3
|
export { default } from './ProTable';
|
|
4
4
|
export type { ProTableProps } from './types/TableTypings';
|
|
5
|
-
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType } from './types/TableTypings';
|
|
5
|
+
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType, OptionConfig, SearchConfig } from './types/TableTypings';
|
|
6
6
|
export type { ProColumnType, ProColumnsType, ProSearchMap } from './types/ColumnTypings';
|
|
7
7
|
export { useTable };
|
|
8
8
|
export { default as GProTable } from './ProTable';
|