@gx-design-vue/pro-table 0.2.0-beta.46 → 0.2.0-beta.48
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 +160 -286
- package/dist/_utils/ant-design-vue/table/props.d.ts +31 -96
- package/dist/_utils/ant-design-vue/table/typings.d.ts +2 -2
- package/dist/components/ColumnSetting/index.d.ts +8 -8
- package/dist/components/ListToolBar/index.d.ts +10 -10
- package/dist/components/ToolBar/index.d.ts +15 -15
- package/dist/context/TableContext.d.ts +2 -3
- package/dist/hooks/useColums.d.ts +1 -1
- package/dist/hooks/useFetchData.d.ts +3 -3
- package/dist/hooks/usePagination.d.ts +2 -2
- package/dist/hooks/useTable.d.ts +1 -1
- package/dist/hooks/useTableScroll.d.ts +3 -3
- package/dist/pro-table.js +920 -916
- package/dist/pro-table.umd.cjs +1 -1
- package/dist/props.d.ts +74 -152
- package/dist/types/ColumnTypings.d.ts +1 -1
- package/dist/types/SlotsTypings.d.ts +1 -1
- package/dist/types/TableTypings.d.ts +11 -11
- package/dist/utils/utils.d.ts +2 -0
- package/package.json +15 -41
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { SizeType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ColumnType, ColumnsType, FilterValue, GetPopupContainer, RcTableProps, SortOrder, SorterResult, TableCurrentDataSource, TableLocale, TableProps, TableRowSelection } from './typings';
|
|
4
|
+
import type { SpinProps } from '../spin/typings';
|
|
5
|
+
import type { TooltipProps } from '../tooltip/typings';
|
|
4
6
|
import type { ProTablePagination } from '../../../types/TableTypings';
|
|
5
7
|
export declare const tableProps: () => {
|
|
6
8
|
prefixCls: {
|
|
@@ -12,23 +14,23 @@ export declare const tableProps: () => {
|
|
|
12
14
|
default: () => never[];
|
|
13
15
|
};
|
|
14
16
|
tableLayout: {
|
|
15
|
-
type: PropType<
|
|
17
|
+
type: PropType<TableProps["tableLayout"]>;
|
|
16
18
|
default: undefined;
|
|
17
19
|
};
|
|
18
20
|
rowClassName: {
|
|
19
|
-
type: PropType<
|
|
21
|
+
type: PropType<TableProps["rowClassName"]>;
|
|
20
22
|
default: undefined;
|
|
21
23
|
};
|
|
22
24
|
title: {
|
|
23
|
-
type: PropType<
|
|
25
|
+
type: PropType<TableProps["title"]>;
|
|
24
26
|
default: undefined;
|
|
25
27
|
};
|
|
26
28
|
footer: {
|
|
27
|
-
type: PropType<
|
|
29
|
+
type: PropType<TableProps["footer"]>;
|
|
28
30
|
default: undefined;
|
|
29
31
|
};
|
|
30
32
|
id: {
|
|
31
|
-
type: PropType<
|
|
33
|
+
type: PropType<TableProps["id"]>;
|
|
32
34
|
default: undefined;
|
|
33
35
|
};
|
|
34
36
|
showHeader: {
|
|
@@ -36,23 +38,23 @@ export declare const tableProps: () => {
|
|
|
36
38
|
default: undefined;
|
|
37
39
|
};
|
|
38
40
|
components: {
|
|
39
|
-
type: PropType<
|
|
41
|
+
type: PropType<TableProps["components"]>;
|
|
40
42
|
default: undefined;
|
|
41
43
|
};
|
|
42
44
|
customRow: {
|
|
43
|
-
type: PropType<
|
|
45
|
+
type: PropType<TableProps["customRow"]>;
|
|
44
46
|
default: undefined;
|
|
45
47
|
};
|
|
46
48
|
customHeaderRow: {
|
|
47
|
-
type: PropType<
|
|
49
|
+
type: PropType<TableProps["customHeaderRow"]>;
|
|
48
50
|
default: undefined;
|
|
49
51
|
};
|
|
50
52
|
direction: {
|
|
51
|
-
type: PropType<"
|
|
53
|
+
type: PropType<TableProps["direction"]>;
|
|
52
54
|
default: undefined;
|
|
53
55
|
};
|
|
54
56
|
expandFixed: {
|
|
55
|
-
type: PropType<
|
|
57
|
+
type: PropType<TableProps["expandFixed"]>;
|
|
56
58
|
default: undefined;
|
|
57
59
|
};
|
|
58
60
|
expandColumnWidth: {
|
|
@@ -60,15 +62,15 @@ export declare const tableProps: () => {
|
|
|
60
62
|
default: undefined;
|
|
61
63
|
};
|
|
62
64
|
expandedRowKeys: {
|
|
63
|
-
type: PropType<
|
|
65
|
+
type: PropType<TableProps["expandedRowKeys"]>;
|
|
64
66
|
default: undefined;
|
|
65
67
|
};
|
|
66
68
|
defaultExpandedRowKeys: {
|
|
67
|
-
type: PropType<
|
|
69
|
+
type: PropType<TableProps["defaultExpandedRowKeys"]>;
|
|
68
70
|
default: undefined;
|
|
69
71
|
};
|
|
70
72
|
expandedRowRender: {
|
|
71
|
-
type: PropType<
|
|
73
|
+
type: PropType<TableProps["expandedRowRender"]>;
|
|
72
74
|
default: undefined;
|
|
73
75
|
};
|
|
74
76
|
expandRowByClick: {
|
|
@@ -76,19 +78,19 @@ export declare const tableProps: () => {
|
|
|
76
78
|
default: undefined;
|
|
77
79
|
};
|
|
78
80
|
expandIcon: {
|
|
79
|
-
type: PropType<
|
|
81
|
+
type: PropType<TableProps["expandIcon"]>;
|
|
80
82
|
default: undefined;
|
|
81
83
|
};
|
|
82
84
|
onExpand: {
|
|
83
|
-
type: PropType<
|
|
85
|
+
type: PropType<TableProps["onExpand"]>;
|
|
84
86
|
default: undefined;
|
|
85
87
|
};
|
|
86
88
|
onExpandedRowsChange: {
|
|
87
|
-
type: PropType<
|
|
89
|
+
type: PropType<TableProps["onExpandedRowsChange"]>;
|
|
88
90
|
default: undefined;
|
|
89
91
|
};
|
|
90
92
|
'onUpdate:expandedRowKeys': {
|
|
91
|
-
type: PropType<
|
|
93
|
+
type: PropType<TableProps["onExpandedRowsChange"]>;
|
|
92
94
|
default: undefined;
|
|
93
95
|
};
|
|
94
96
|
defaultExpandAllRows: {
|
|
@@ -109,19 +111,19 @@ export declare const tableProps: () => {
|
|
|
109
111
|
default: undefined;
|
|
110
112
|
};
|
|
111
113
|
expandedRowClassName: {
|
|
112
|
-
type: PropType<
|
|
114
|
+
type: PropType<TableProps["expandedRowClassName"]>;
|
|
113
115
|
default: undefined;
|
|
114
116
|
};
|
|
115
117
|
childrenColumnName: {
|
|
116
|
-
type: PropType<
|
|
118
|
+
type: PropType<TableProps["childrenColumnName"]>;
|
|
117
119
|
default: undefined;
|
|
118
120
|
};
|
|
119
121
|
rowExpandable: {
|
|
120
|
-
type: PropType<
|
|
122
|
+
type: PropType<TableProps["rowExpandable"]>;
|
|
121
123
|
default: undefined;
|
|
122
124
|
};
|
|
123
125
|
sticky: {
|
|
124
|
-
type: PropType<
|
|
126
|
+
type: PropType<TableProps["sticky"]>;
|
|
125
127
|
default: undefined;
|
|
126
128
|
};
|
|
127
129
|
dropdownPrefixCls: {
|
|
@@ -129,22 +131,11 @@ export declare const tableProps: () => {
|
|
|
129
131
|
default: undefined;
|
|
130
132
|
};
|
|
131
133
|
dataSource: {
|
|
132
|
-
type: PropType<
|
|
134
|
+
type: PropType<RcTableProps["data"]>;
|
|
133
135
|
default: undefined;
|
|
134
136
|
};
|
|
135
137
|
loading: {
|
|
136
|
-
type: PropType<boolean |
|
|
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
|
-
}>>>;
|
|
138
|
+
type: PropType<boolean | SpinProps>;
|
|
148
139
|
default: undefined;
|
|
149
140
|
};
|
|
150
141
|
size: {
|
|
@@ -164,7 +155,7 @@ export declare const tableProps: () => {
|
|
|
164
155
|
default: undefined;
|
|
165
156
|
};
|
|
166
157
|
rowSelection: {
|
|
167
|
-
type: PropType<TableRowSelection
|
|
158
|
+
type: PropType<TableRowSelection>;
|
|
168
159
|
default: undefined;
|
|
169
160
|
};
|
|
170
161
|
getPopupContainer: {
|
|
@@ -172,11 +163,8 @@ export declare const tableProps: () => {
|
|
|
172
163
|
default: undefined;
|
|
173
164
|
};
|
|
174
165
|
scroll: {
|
|
175
|
-
type: PropType<{
|
|
176
|
-
|
|
177
|
-
y?: string | number | undefined;
|
|
178
|
-
} & {
|
|
179
|
-
scrollToFirstRowOnChange?: boolean | undefined;
|
|
166
|
+
type: PropType<RcTableProps["scroll"] & {
|
|
167
|
+
scrollToFirstRowOnChange?: boolean;
|
|
180
168
|
}>;
|
|
181
169
|
default: undefined;
|
|
182
170
|
};
|
|
@@ -185,64 +173,11 @@ export declare const tableProps: () => {
|
|
|
185
173
|
default: undefined;
|
|
186
174
|
};
|
|
187
175
|
showSorterTooltip: {
|
|
188
|
-
type: PropType<boolean |
|
|
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
|
-
}>>>;
|
|
176
|
+
type: PropType<boolean | TooltipProps>;
|
|
242
177
|
default: boolean;
|
|
243
178
|
};
|
|
244
179
|
transformCellText: {
|
|
245
|
-
type: PropType<
|
|
180
|
+
type: PropType<TableProps["transformCellText"]>;
|
|
246
181
|
default: undefined;
|
|
247
182
|
};
|
|
248
183
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { FilterValue,
|
|
1
|
+
import type { ColumnType, TableProps } from 'ant-design-vue/es/table';
|
|
2
|
+
import type { ColumnsType, FilterValue, GetPopupContainer, SortOrder, SorterResult, TableCurrentDataSource, TableLocale } from 'ant-design-vue/es/table/interface';
|
|
3
3
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
4
|
import type { TableProps as RcTableProps } from 'ant-design-vue/es/vc-table/Table';
|
|
5
5
|
export type { TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
|
|
@@ -8,26 +8,26 @@ export type ColumnSettingProps = {
|
|
|
8
8
|
};
|
|
9
9
|
declare const ColumnSetting: import("vue").DefineComponent<{
|
|
10
10
|
draggable: {
|
|
11
|
-
type: PropType<
|
|
11
|
+
type: PropType<ColumnSettingProps["draggable"]>;
|
|
12
12
|
default: undefined;
|
|
13
13
|
};
|
|
14
14
|
checkable: {
|
|
15
|
-
type: PropType<
|
|
15
|
+
type: PropType<ColumnSettingProps["checkable"]>;
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
|
-
checkedReset: PropType<
|
|
19
|
-
extra: PropType<
|
|
18
|
+
checkedReset: PropType<ColumnSettingProps["checkedReset"]>;
|
|
19
|
+
extra: PropType<ColumnSettingProps["extra"]>;
|
|
20
20
|
}, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
21
|
draggable: {
|
|
22
|
-
type: PropType<
|
|
22
|
+
type: PropType<ColumnSettingProps["draggable"]>;
|
|
23
23
|
default: undefined;
|
|
24
24
|
};
|
|
25
25
|
checkable: {
|
|
26
|
-
type: PropType<
|
|
26
|
+
type: PropType<ColumnSettingProps["checkable"]>;
|
|
27
27
|
default: undefined;
|
|
28
28
|
};
|
|
29
|
-
checkedReset: PropType<
|
|
30
|
-
extra: PropType<
|
|
29
|
+
checkedReset: PropType<ColumnSettingProps["checkedReset"]>;
|
|
30
|
+
extra: PropType<ColumnSettingProps["extra"]>;
|
|
31
31
|
}>>, {
|
|
32
32
|
checkable: boolean | undefined;
|
|
33
33
|
draggable: boolean | undefined;
|
|
@@ -8,48 +8,48 @@ export type ListToolBarSetting = {
|
|
|
8
8
|
};
|
|
9
9
|
declare const ListToolBar: import("vue").DefineComponent<{
|
|
10
10
|
actions: {
|
|
11
|
-
type: PropType<import("
|
|
11
|
+
type: PropType<import("../..").ProTableProps["toolBarBtn"]>;
|
|
12
12
|
default: () => undefined;
|
|
13
13
|
};
|
|
14
14
|
settings: PropType<VueNode[]>;
|
|
15
15
|
titleTip: {
|
|
16
|
-
type: PropType<import("
|
|
16
|
+
type: PropType<import("../..").ProTableProps["titleTip"]>;
|
|
17
17
|
default: () => undefined;
|
|
18
18
|
};
|
|
19
19
|
prefixCls: StringConstructor;
|
|
20
20
|
headerTitle: {
|
|
21
|
-
type: PropType<import("
|
|
21
|
+
type: PropType<import("../..").ProTableProps["headerTitle"]>;
|
|
22
22
|
default: () => undefined;
|
|
23
23
|
};
|
|
24
24
|
titleTipText: {
|
|
25
|
-
type: PropType<
|
|
25
|
+
type: PropType<import("../..").ProTableProps["titleTipText"]>;
|
|
26
26
|
default: string;
|
|
27
27
|
};
|
|
28
28
|
optionsExtra: {
|
|
29
|
-
type: PropType<import("
|
|
29
|
+
type: PropType<import("../..").ProTableProps["optionsExtra"]>;
|
|
30
30
|
default: () => undefined;
|
|
31
31
|
};
|
|
32
32
|
}, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
33
|
actions: {
|
|
34
|
-
type: PropType<import("
|
|
34
|
+
type: PropType<import("../..").ProTableProps["toolBarBtn"]>;
|
|
35
35
|
default: () => undefined;
|
|
36
36
|
};
|
|
37
37
|
settings: PropType<VueNode[]>;
|
|
38
38
|
titleTip: {
|
|
39
|
-
type: PropType<import("
|
|
39
|
+
type: PropType<import("../..").ProTableProps["titleTip"]>;
|
|
40
40
|
default: () => undefined;
|
|
41
41
|
};
|
|
42
42
|
prefixCls: StringConstructor;
|
|
43
43
|
headerTitle: {
|
|
44
|
-
type: PropType<import("
|
|
44
|
+
type: PropType<import("../..").ProTableProps["headerTitle"]>;
|
|
45
45
|
default: () => undefined;
|
|
46
46
|
};
|
|
47
47
|
titleTipText: {
|
|
48
|
-
type: PropType<
|
|
48
|
+
type: PropType<import("../..").ProTableProps["titleTipText"]>;
|
|
49
49
|
default: string;
|
|
50
50
|
};
|
|
51
51
|
optionsExtra: {
|
|
52
|
-
type: PropType<import("
|
|
52
|
+
type: PropType<import("../..").ProTableProps["optionsExtra"]>;
|
|
53
53
|
default: () => undefined;
|
|
54
54
|
};
|
|
55
55
|
}>>, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { OptionConfig, ProTableProps } from '../../types/TableTypings';
|
|
3
3
|
export type OptionsFunctionType = () => void;
|
|
4
4
|
export type ToolBarProps = {
|
|
5
5
|
headerTitle?: ProTableProps['headerTitle'];
|
|
@@ -11,20 +11,20 @@ export type ToolBarProps = {
|
|
|
11
11
|
options?: OptionConfig | boolean;
|
|
12
12
|
};
|
|
13
13
|
declare const ToolbarRender: import("vue").DefineComponent<{
|
|
14
|
-
options: PropType<
|
|
15
|
-
titleTip: PropType<
|
|
16
|
-
settingExtra: PropType<
|
|
17
|
-
optionsExtra: PropType<
|
|
18
|
-
titleTipText: PropType<
|
|
19
|
-
toolBarBtn: PropType<
|
|
20
|
-
headerTitle: PropType<
|
|
14
|
+
options: PropType<ProTableProps["options"]>;
|
|
15
|
+
titleTip: PropType<ProTableProps["titleTip"]>;
|
|
16
|
+
settingExtra: PropType<ProTableProps["settingExtra"]>;
|
|
17
|
+
optionsExtra: PropType<ProTableProps["optionsExtra"]>;
|
|
18
|
+
titleTipText: PropType<ProTableProps["titleTipText"]>;
|
|
19
|
+
toolBarBtn: PropType<ProTableProps["toolBarBtn"]>;
|
|
20
|
+
headerTitle: PropType<ProTableProps["headerTitle"]>;
|
|
21
21
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
-
options: PropType<
|
|
23
|
-
titleTip: PropType<
|
|
24
|
-
settingExtra: PropType<
|
|
25
|
-
optionsExtra: PropType<
|
|
26
|
-
titleTipText: PropType<
|
|
27
|
-
toolBarBtn: PropType<
|
|
28
|
-
headerTitle: PropType<
|
|
22
|
+
options: PropType<ProTableProps["options"]>;
|
|
23
|
+
titleTip: PropType<ProTableProps["titleTip"]>;
|
|
24
|
+
settingExtra: PropType<ProTableProps["settingExtra"]>;
|
|
25
|
+
optionsExtra: PropType<ProTableProps["optionsExtra"]>;
|
|
26
|
+
titleTipText: PropType<ProTableProps["titleTipText"]>;
|
|
27
|
+
toolBarBtn: PropType<ProTableProps["toolBarBtn"]>;
|
|
28
|
+
headerTitle: PropType<ProTableProps["headerTitle"]>;
|
|
29
29
|
}>>, {}, {}>;
|
|
30
30
|
export default ToolbarRender;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Ref,
|
|
2
|
-
import type { InjectionKey, Slots } from 'vue';
|
|
1
|
+
import type { ComputedRef, InjectionKey, Ref, Slots } from 'vue';
|
|
3
2
|
import type { SizeType } from '@gx-design-vue/pro-utils';
|
|
4
3
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
4
|
import type { ColumnsState, SettingsAction } from '../hooks/useColumnSetting';
|
|
@@ -21,6 +20,6 @@ export interface TableContextProps {
|
|
|
21
20
|
changeColumns: (map: Record<string, ColumnsState>, fixed: boolean) => void;
|
|
22
21
|
[key: string]: any;
|
|
23
22
|
}
|
|
24
|
-
export declare const useContext: <T>(contextInjectKey?: string | InjectionKey<T>, defaultValue?: T
|
|
23
|
+
export declare const useContext: <T>(contextInjectKey?: string | InjectionKey<T>, defaultValue?: T) => T;
|
|
25
24
|
export declare const provideTableContext: (value: TableContextProps) => void;
|
|
26
25
|
export declare const useTableContext: (defaultValue?: Required<TableContextProps>) => Required<TableContextProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import type { ColumnsState } from './useColumnSetting';
|
|
3
3
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
4
|
import type { ProColumnType, ProColumnsType } from '../types/ColumnTypings';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ProTabelFeachParams, ProTablePagination, ProTablePaginationConfig, ProTableProps } from '../types/TableTypings';
|
|
4
4
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
5
|
import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils/ant-design-vue/table/typings';
|
|
6
6
|
interface ActionType {
|
|
@@ -30,9 +30,9 @@ export declare function useFetchData({ polling, request, postData, dataSource, w
|
|
|
30
30
|
isTreeDataRef: ComputedRef<boolean>;
|
|
31
31
|
reSetDataList: (list: RecordType[]) => void;
|
|
32
32
|
changeDataValue: ({ key, params, type }: {
|
|
33
|
-
key?: string
|
|
33
|
+
key?: string;
|
|
34
34
|
params: RecordType;
|
|
35
|
-
type?: "
|
|
35
|
+
type?: "update" | "add" | "delete";
|
|
36
36
|
}) => void;
|
|
37
37
|
handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
|
|
38
38
|
reload: (info?: ProTabelFeachParams) => Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Ref, Slots
|
|
2
|
-
import type {
|
|
1
|
+
import type { ComputedRef, Ref, Slots } from 'vue';
|
|
2
|
+
import type { ProTablePagination, ProTableProps } from '../types/TableTypings';
|
|
3
3
|
export declare function usePagination({ slots, props, pagination }: {
|
|
4
4
|
slots: Slots;
|
|
5
5
|
props: ComputedRef<ProTableProps>;
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import type { ProCoreActionType, ProCoreFormType, ProTableRef } from '../types/TableTypings';
|
|
3
3
|
export declare function useTable<T = any>(tableRef: Ref<ProTableRef>): {
|
|
4
4
|
dataSource: ComputedRef<T[]>;
|
|
@@ -18,10 +18,10 @@ type useTableScrollType = {
|
|
|
18
18
|
export declare function useConfigScroll(props: ProTableProps): ConfigScroll;
|
|
19
19
|
export declare function useTableScroll({ scroll, columns, autoScroll, modalScroll, neverScroll, rowSelection, screens, innerWidth, scrollBreakpoint }: useTableScrollType): {
|
|
20
20
|
getScrollRef: ComputedRef<({
|
|
21
|
-
x?:
|
|
22
|
-
y?:
|
|
21
|
+
x?: number | true | string;
|
|
22
|
+
y?: number | string;
|
|
23
23
|
} & {
|
|
24
|
-
scrollToFirstRowOnChange?: boolean
|
|
24
|
+
scrollToFirstRowOnChange?: boolean;
|
|
25
25
|
}) | undefined>;
|
|
26
26
|
breakpoint: ComputedRef<boolean | undefined>;
|
|
27
27
|
};
|