@gx-design-vue/pro-table 0.2.0-beta.96 → 0.2.0-beta.98
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 +23 -13
- package/dist/_utils/ant-design-vue/index.d.ts +3 -3
- package/dist/_utils/ant-design-vue/table/props.d.ts +1 -1
- package/dist/_utils/ant-design-vue/table/typings.d.ts +5 -5
- package/dist/_utils/index.d.ts +1 -1
- package/dist/components/ColumnSetting/index.d.ts +2 -2
- package/dist/components/ColumnSetting/style.d.ts +1 -1
- package/dist/components/Form/index.d.ts +2 -2
- package/dist/components/Form/style.d.ts +1 -1
- package/dist/components/ListToolBar/index.d.ts +5 -5
- package/dist/components/ListToolBar/style.d.ts +1 -1
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -1
- package/dist/components/ToolBar/index.d.ts +3 -3
- package/dist/context/TableContext.d.ts +5 -5
- package/dist/hooks/tryOnActivated.d.ts +2 -0
- package/dist/hooks/useColumnSetting.d.ts +6 -6
- package/dist/hooks/useColums.d.ts +7 -7
- package/dist/hooks/useDebounceFn.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +8 -8
- package/dist/hooks/useLoading.d.ts +1 -1
- package/dist/hooks/usePagination.d.ts +1 -1
- package/dist/hooks/useRowSelection.d.ts +1 -1
- package/dist/hooks/useTable.d.ts +4 -4
- package/dist/hooks/useTableForm.d.ts +6 -6
- package/dist/hooks/useTableScroll.d.ts +4 -4
- package/dist/hooks/useTableSize.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/pro-table.js +1439 -1429
- package/dist/pro-table.umd.cjs +1 -1
- package/dist/props.d.ts +5 -8
- package/dist/style.d.ts +1 -1
- package/dist/types/ColumnTypings.d.ts +14 -12
- package/dist/types/SlotsTypings.d.ts +10 -11
- package/dist/types/TableTypings.d.ts +20 -20
- package/package.json +4 -4
- package/dist/typing.d.ts +0 -1
package/dist/ProTable.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CSSProperties, SlotsType } from 'vue';
|
|
2
2
|
import type { Key, SpinProps } from './_utils';
|
|
3
|
-
import type { OptionConfig, ProTableProps, SearchConfig } from './types/TableTypings';
|
|
4
3
|
import type { ProColumnsType } from './types/ColumnTypings';
|
|
4
|
+
import type { OptionConfig, ProTableProps, SearchConfig } from './types/TableTypings';
|
|
5
|
+
import { type RecordType } from '@gx-design-vue/pro-utils';
|
|
5
6
|
import { AntTabelSlotsType, DefaultRender } from './types/SlotsTypings';
|
|
6
7
|
declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
8
|
rowSelection: {
|
|
@@ -97,6 +98,10 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
97
98
|
type: import("vue").PropType<ProTableProps["settingExtra"]>;
|
|
98
99
|
default: () => undefined;
|
|
99
100
|
};
|
|
101
|
+
keepAliveReload: {
|
|
102
|
+
type: import("vue").PropType<ProTableProps["keepAliveReload"]>;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
100
105
|
showIndex: {
|
|
101
106
|
type: import("vue").PropType<ProTableProps["showIndex"]>;
|
|
102
107
|
default: boolean;
|
|
@@ -157,7 +162,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
157
162
|
type: import("vue").PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
|
|
158
163
|
default: (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
|
|
159
164
|
};
|
|
160
|
-
}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
165
|
+
}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "submit" | "change" | "requestError" | "reload" | "loadingChange" | "sizeChange" | "expandedRowsChange" | "expand" | "beforeSearchSubmit" | "columnsStateChange")[], "reset" | "submit" | "change" | "requestError" | "reload" | "loadingChange" | "sizeChange" | "expandedRowsChange" | "expand" | "beforeSearchSubmit" | "columnsStateChange", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
161
166
|
rowSelection: {
|
|
162
167
|
type: import("vue").PropType<import("./types/TableTypings").ProTableRowSelection>;
|
|
163
168
|
default: undefined;
|
|
@@ -251,6 +256,10 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
251
256
|
type: import("vue").PropType<ProTableProps["settingExtra"]>;
|
|
252
257
|
default: () => undefined;
|
|
253
258
|
};
|
|
259
|
+
keepAliveReload: {
|
|
260
|
+
type: import("vue").PropType<ProTableProps["keepAliveReload"]>;
|
|
261
|
+
default: boolean;
|
|
262
|
+
};
|
|
254
263
|
showIndex: {
|
|
255
264
|
type: import("vue").PropType<ProTableProps["showIndex"]>;
|
|
256
265
|
default: boolean;
|
|
@@ -324,7 +333,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
324
333
|
onBeforeSearchSubmit?: ((...args: any[]) => any) | undefined;
|
|
325
334
|
onColumnsStateChange?: ((...args: any[]) => any) | undefined;
|
|
326
335
|
}>, {
|
|
327
|
-
columns: ProColumnsType<
|
|
336
|
+
columns: ProColumnsType<RecordType, RecordType> | undefined;
|
|
328
337
|
scroll: {
|
|
329
338
|
x?: number | true | string;
|
|
330
339
|
y?: number | string;
|
|
@@ -352,23 +361,17 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
352
361
|
'onUpdate:expandedRowKeys': (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
|
|
353
362
|
customRender: import("./types/SlotsTypings").CustomDataRender | undefined;
|
|
354
363
|
align: "center" | "left" | "right" | undefined;
|
|
355
|
-
search: false | SearchConfig | undefined;
|
|
356
|
-
headerTitle: DefaultRender;
|
|
357
|
-
toolBarBtn: DefaultRender;
|
|
358
|
-
titleTip: DefaultRender;
|
|
359
|
-
settingExtra: DefaultRender;
|
|
360
|
-
optionsExtra: DefaultRender;
|
|
361
|
-
pageItemRender: import("./types/SlotsTypings").PageItemRender | undefined;
|
|
362
364
|
autoScroll: boolean | undefined;
|
|
363
365
|
tableProps: {
|
|
364
366
|
class?: string;
|
|
365
367
|
style?: CSSProperties;
|
|
366
368
|
} | undefined;
|
|
367
369
|
titleTipText: string | undefined;
|
|
370
|
+
keepAliveReload: boolean | undefined;
|
|
368
371
|
emptyTextProps: {
|
|
369
372
|
class?: string;
|
|
370
373
|
style?: CSSProperties;
|
|
371
|
-
extraProps?:
|
|
374
|
+
extraProps?: RecordType;
|
|
372
375
|
} | undefined;
|
|
373
376
|
columnEmptyText: import("./types/TableTypings").ProFieldEmptyText | undefined;
|
|
374
377
|
showLoading: boolean | undefined;
|
|
@@ -377,9 +380,16 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
377
380
|
options: boolean | OptionConfig | undefined;
|
|
378
381
|
waitRequest: boolean | undefined;
|
|
379
382
|
debounceTime: number | undefined;
|
|
380
|
-
request: import("./types/TableTypings").RequsetFunction<
|
|
381
|
-
params:
|
|
383
|
+
request: import("./types/TableTypings").RequsetFunction<RecordType, RecordType> | undefined;
|
|
384
|
+
params: RecordType | undefined;
|
|
385
|
+
search: false | SearchConfig | undefined;
|
|
382
386
|
searchMap: import("./types/ColumnTypings").ProSearchMap<undefined, string>[] | undefined;
|
|
387
|
+
titleTip: DefaultRender;
|
|
388
|
+
headerTitle: DefaultRender;
|
|
389
|
+
toolBarBtn: DefaultRender;
|
|
390
|
+
optionsExtra: DefaultRender;
|
|
391
|
+
settingExtra: DefaultRender;
|
|
392
|
+
pageItemRender: import("./types/SlotsTypings").PageItemRender | undefined;
|
|
383
393
|
}, SlotsType<{
|
|
384
394
|
search(): void;
|
|
385
395
|
emptyText(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './input/typings';
|
|
2
2
|
export * from './pagination/typings';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './spin/typings';
|
|
4
4
|
export * from './table/props';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './table/typings';
|
|
6
6
|
export * from './tooltip/typings';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { RcTableProps, TableProps } from './typings';
|
|
3
2
|
import type { SpinProps } from '../spin/typings';
|
|
3
|
+
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: {
|
|
@@ -1,10 +1,10 @@
|
|
|
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
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
2
|
+
import type { ColumnType, TableProps } from 'ant-design-vue/es/table';
|
|
3
|
+
import type { ColumnsType, FilterValue, GetPopupContainer, SorterResult, SortOrder, TableCurrentDataSource, TableLocale } from 'ant-design-vue/es/table/interface';
|
|
4
4
|
import type { TableProps as RcTableProps } from 'ant-design-vue/es/vc-table/Table';
|
|
5
|
-
export type { TablePaginationConfig, TableRowSelection
|
|
6
|
-
export type { Key, RenderExpandIconProps
|
|
5
|
+
export type { SelectionSelectFn, TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
|
|
6
|
+
export type { DataIndex, Key, RenderExpandIconProps } from 'ant-design-vue/es/vc-table/interface';
|
|
7
7
|
export type TableFilters = Record<string, FilterValue | null>;
|
|
8
8
|
export type TableSorterRecord = SorterResult<RecordType>;
|
|
9
9
|
export type TableSorter = TableSorterRecord | TableSorterRecord[];
|
|
10
|
-
export type {
|
|
10
|
+
export type { ColumnsType, ColumnType, FilterValue, GetPopupContainer, RcTableProps, SorterResult, SortOrder, TableCurrentDataSource, TableLocale, TableProps };
|
package/dist/_utils/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { DefaultRender } from '../../types/SlotsTypings';
|
|
3
|
-
export
|
|
3
|
+
export interface ColumnSettingProps {
|
|
4
4
|
draggable?: boolean;
|
|
5
5
|
checkable?: boolean;
|
|
6
6
|
extra?: DefaultRender;
|
|
7
7
|
checkedReset?: boolean;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
declare const ColumnSetting: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
10
|
draggable: {
|
|
11
11
|
type: PropType<ColumnSettingProps["draggable"]>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
2
1
|
import type { ProAliasToken } from '@gx-design-vue/pro-provider';
|
|
2
|
+
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
3
3
|
export declare const genColumnSettingStyle: GenerateStyle<ProAliasToken>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
2
|
import type { ProSearchMap } from '../../types/ColumnTypings';
|
|
3
|
+
import { type RecordType } from '@gx-design-vue/pro-utils';
|
|
4
4
|
declare const ProTableForm: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
5
|
modal: PropType<boolean | undefined>;
|
|
6
6
|
searchMap: {
|
|
@@ -49,6 +49,6 @@ declare const ProTableForm: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
49
49
|
indicator: import("vue-types").VueTypeValidableDef<any>;
|
|
50
50
|
}>>;
|
|
51
51
|
cardBordered: boolean | undefined;
|
|
52
|
-
searchMap: ProSearchMap[];
|
|
52
|
+
searchMap: ProSearchMap<"text", string>[];
|
|
53
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
54
|
export default ProTableForm;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
2
1
|
import type { ProAliasToken } from '@gx-design-vue/pro-provider';
|
|
2
|
+
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
3
3
|
export declare const genTableFormStyle: GenerateStyle<ProAliasToken>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
1
|
import type { VueNode } from '@gx-design-vue/pro-utils';
|
|
3
|
-
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
export interface ListToolBarSetting {
|
|
4
4
|
icon: VueNode;
|
|
5
5
|
tooltip?: string;
|
|
6
6
|
key?: string;
|
|
7
7
|
onClick?: (key?: string) => void;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
declare const ListToolBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
10
|
actions: {
|
|
11
11
|
type: PropType<import("../..").ProTableProps["toolBarBtn"]>;
|
|
@@ -53,10 +53,10 @@ declare const ListToolBar: import("vue").DefineComponent<import("vue").ExtractPr
|
|
|
53
53
|
default: () => undefined;
|
|
54
54
|
};
|
|
55
55
|
}>> & Readonly<{}>, {
|
|
56
|
-
|
|
56
|
+
titleTipText: string | undefined;
|
|
57
57
|
titleTip: import("../../types/SlotsTypings").DefaultRender;
|
|
58
|
+
headerTitle: import("../../types/SlotsTypings").DefaultRender;
|
|
58
59
|
optionsExtra: import("../../types/SlotsTypings").DefaultRender;
|
|
59
|
-
titleTipText: string | undefined;
|
|
60
60
|
actions: import("../../types/SlotsTypings").DefaultRender;
|
|
61
61
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
62
62
|
export default ListToolBar;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
2
1
|
import type { ProAliasToken } from '@gx-design-vue/pro-provider';
|
|
2
|
+
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
3
3
|
export declare const genListToolBarStyle: GenerateStyle<ProAliasToken>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const FullScreenIcon: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1
|
+
declare const FullScreenIcon: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default FullScreenIcon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { OptionConfig, ProTableProps } from '../../types/TableTypings';
|
|
3
3
|
export type OptionsFunctionType = () => void;
|
|
4
|
-
export
|
|
4
|
+
export interface ToolBarProps {
|
|
5
5
|
headerTitle?: ProTableProps['headerTitle'];
|
|
6
6
|
titleTip?: ProTableProps['titleTip'];
|
|
7
7
|
toolBarBtn?: ProTableProps['toolBarBtn'];
|
|
@@ -9,7 +9,7 @@ export type ToolBarProps = {
|
|
|
9
9
|
optionsExtra?: ProTableProps['optionsExtra'];
|
|
10
10
|
settingExtra?: ProTableProps['settingExtra'];
|
|
11
11
|
options?: OptionConfig | boolean;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
declare const ToolbarRender: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
14
14
|
options: PropType<ProTableProps["options"]>;
|
|
15
15
|
titleTip: PropType<ProTableProps["titleTip"]>;
|
|
@@ -18,7 +18,7 @@ declare const ToolbarRender: import("vue").DefineComponent<import("vue").Extract
|
|
|
18
18
|
titleTipText: PropType<ProTableProps["titleTipText"]>;
|
|
19
19
|
toolBarBtn: PropType<ProTableProps["toolBarBtn"]>;
|
|
20
20
|
headerTitle: PropType<ProTableProps["headerTitle"]>;
|
|
21
|
-
}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
options: PropType<ProTableProps["options"]>;
|
|
23
23
|
titleTip: PropType<ProTableProps["titleTip"]>;
|
|
24
24
|
settingExtra: PropType<ProTableProps["settingExtra"]>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ComputedRef, Ref } from 'vue';
|
|
2
1
|
import type { SizeType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type {
|
|
2
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
3
|
+
import type { PaginationProps } from '../_utils';
|
|
4
|
+
import type { ColumnsState, SettingsAction } from '../hooks/useColumnSetting';
|
|
4
5
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
6
|
import type { Slots } from '../types/SlotsTypings';
|
|
6
|
-
import type {
|
|
7
|
-
import type { PaginationProps } from '../_utils';
|
|
7
|
+
import type { SearchConfig } from '../types/TableTypings';
|
|
8
8
|
export interface ProTableContextProps {
|
|
9
9
|
columns: ComputedRef<ProColumnsType>;
|
|
10
10
|
isMobile: ComputedRef<boolean>;
|
|
@@ -25,4 +25,4 @@ export interface ProTableContextProps {
|
|
|
25
25
|
changeColumns: (map: Record<string, ColumnsState>, fixed: boolean) => void;
|
|
26
26
|
}
|
|
27
27
|
declare const provideTableContext: (value: ProTableContextProps) => void, useTableContext: (injectDefaultValue?: ProTableContextProps | undefined) => ProTableContextProps;
|
|
28
|
-
export { provideTableContext, useTableContext
|
|
28
|
+
export { provideTableContext, useTableContext };
|
|
@@ -2,7 +2,7 @@ import type { Ref } from 'vue';
|
|
|
2
2
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
3
3
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
4
|
export type SettingsOperationType = 'fixed' | 'drop' | 'show' | undefined;
|
|
5
|
-
export
|
|
5
|
+
export interface ColumnsState {
|
|
6
6
|
show?: boolean;
|
|
7
7
|
fixed?: 'right' | 'left' | boolean | undefined;
|
|
8
8
|
order?: number;
|
|
@@ -10,8 +10,8 @@ export type ColumnsState = {
|
|
|
10
10
|
checkbox: boolean;
|
|
11
11
|
icon: boolean;
|
|
12
12
|
};
|
|
13
|
-
}
|
|
14
|
-
export
|
|
13
|
+
}
|
|
14
|
+
export interface SettingsAction {
|
|
15
15
|
autoScroll?: Ref<ProTableProps['autoScroll']>;
|
|
16
16
|
sortKeyColumns: Ref<string[]>;
|
|
17
17
|
columnsMap: Record<string, ColumnsState>;
|
|
@@ -19,11 +19,11 @@ export type SettingsAction = {
|
|
|
19
19
|
setSortKeyColumns: (value: string[]) => void;
|
|
20
20
|
cacheColumnsMap: Record<string, ColumnsState>;
|
|
21
21
|
setColumnsMap: (value: Record<string, ColumnsState>, key?: SettingsOperationType) => void;
|
|
22
|
-
}
|
|
23
|
-
export
|
|
22
|
+
}
|
|
23
|
+
export interface ColumnsStateType {
|
|
24
24
|
value?: Record<string, ColumnsState>;
|
|
25
25
|
onChange?: (map: Record<string, ColumnsState>) => void;
|
|
26
|
-
}
|
|
26
|
+
}
|
|
27
27
|
export declare function useColumnSetting({ columns, columnsState, changeColumns }: {
|
|
28
28
|
columns: Ref<ProColumnsType>;
|
|
29
29
|
columnsState: Ref<ColumnsStateType | undefined>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ProColumnsType, ProColumnType } from '../types/ColumnTypings';
|
|
3
3
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
|
-
import type {
|
|
5
|
-
export
|
|
4
|
+
import type { ColumnsState } from './useColumnSetting';
|
|
5
|
+
export interface ConfigColumns {
|
|
6
6
|
draggabled: ComputedRef<ProTableProps['draggabled']>;
|
|
7
7
|
neverScroll: ComputedRef<ProTableProps['neverScroll']>;
|
|
8
8
|
autoScroll: ComputedRef<ProTableProps['autoScroll']>;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
type UseColumnsType = {
|
|
11
11
|
scroll: ComputedRef<ProTableProps['scroll']>;
|
|
12
12
|
breakpoint: ComputedRef<boolean | undefined>;
|
|
@@ -15,8 +15,8 @@ type UseColumnsType = {
|
|
|
15
15
|
export declare function useConfigColumns(props: ProTableProps): ConfigColumns;
|
|
16
16
|
export declare function useColumns({ scroll, columns, breakpoint, draggabled, autoScroll, neverScroll }: UseColumnsType): {
|
|
17
17
|
breakpoint: ComputedRef<boolean | undefined>;
|
|
18
|
-
proColumns: ComputedRef<(import("@gx-design-vue/pro-utils/dist").DefaultProColumn & Omit<import("ant-design-vue/es/table/interface").ColumnType<import("
|
|
19
|
-
children?: ProColumnsType<import("
|
|
18
|
+
proColumns: ComputedRef<(import("@gx-design-vue/pro-utils/dist").DefaultProColumn & Omit<import("ant-design-vue/es/table/interface").ColumnType<import("@gx-design-vue/pro-utils/dist").RecordType>, "key" | "dataIndex" | "width"> & {
|
|
19
|
+
children?: ProColumnsType<import("@gx-design-vue/pro-utils/dist").RecordType, import("@gx-design-vue/pro-utils/dist").RecordType> | undefined;
|
|
20
20
|
uuid?: string | number;
|
|
21
21
|
index?: number;
|
|
22
22
|
copyText?: string | ((record: ProColumnType) => string);
|
|
@@ -83,7 +83,7 @@ export declare function useColumns({ scroll, columns, breakpoint, draggabled, au
|
|
|
83
83
|
'onUpdate:open': import("vue").PropType<(vis: boolean) => void>;
|
|
84
84
|
}>> & {
|
|
85
85
|
width?: number;
|
|
86
|
-
targetStyle?: Partial<
|
|
86
|
+
targetStyle?: Partial<import("vue").CSSProperties>;
|
|
87
87
|
hiddenLine?: number;
|
|
88
88
|
class?: string;
|
|
89
89
|
}) | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface ReturnValue<T extends any[]> {
|
|
2
2
|
run: (...args: T) => void;
|
|
3
3
|
cancel: () => void;
|
|
4
|
-
}
|
|
4
|
+
}
|
|
5
5
|
declare function useDebounceFn<T extends any[]>(fn: (...args: T) => Promise<any>, wait?: number): ReturnValue<T>;
|
|
6
6
|
export default useDebounceFn;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils/ant-design-vue/table/typings';
|
|
3
|
-
import type { ProTabelFeachParams, ProTablePagination, ProTablePaginationConfig, ProTableProps, SearchConfig } from '../types/TableTypings';
|
|
4
|
-
import type { DefaultRecordType } from '../typing';
|
|
5
3
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
4
|
+
import type { ProTabelFeachParams, ProTablePagination, ProTablePaginationConfig, ProTableProps, SearchConfig } from '../types/TableTypings';
|
|
5
|
+
import { type RecordType } from '@gx-design-vue/pro-utils';
|
|
6
6
|
interface ActionType {
|
|
7
7
|
loading: ComputedRef<boolean | undefined>;
|
|
8
8
|
search: ComputedRef<SearchConfig | false>;
|
|
@@ -13,24 +13,24 @@ interface ActionType {
|
|
|
13
13
|
removeRowKeys: (keyList: (string | number)[]) => void;
|
|
14
14
|
syncSelectedRows: (dataList: any[]) => void;
|
|
15
15
|
columns: ComputedRef<ProColumnsType>;
|
|
16
|
-
formParamsRef:
|
|
16
|
+
formParamsRef: RecordType;
|
|
17
17
|
onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
|
|
18
18
|
hasCustomRender: ComputedRef<boolean>;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export interface ConfigFetchData {
|
|
21
21
|
polling: ComputedRef<ProTableProps['polling']>;
|
|
22
22
|
request: ProTableProps['request'];
|
|
23
23
|
postData: ProTableProps['postData'];
|
|
24
24
|
waitRequest: Ref<ProTableProps['waitRequest']>;
|
|
25
25
|
debounceTime: ComputedRef<ProTableProps['debounceTime']>;
|
|
26
26
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
|
|
29
29
|
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { search, columns, loading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, paginationInfo, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
|
|
30
|
-
dataSource: ComputedRef<
|
|
30
|
+
dataSource: ComputedRef<RecordType[]>;
|
|
31
31
|
isTreeDataRef: ComputedRef<boolean>;
|
|
32
|
-
reSetDataList: (list:
|
|
33
|
-
changeDataValue: <T =
|
|
32
|
+
reSetDataList: (list: RecordType[]) => void;
|
|
33
|
+
changeDataValue: <T = RecordType>({ key, record, type }: {
|
|
34
34
|
record: T;
|
|
35
35
|
type: "update" | "push" | "delete" | "unshift";
|
|
36
36
|
key?: keyof T;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
1
2
|
import type { Slots } from '../types/SlotsTypings';
|
|
2
3
|
import type { ProTablePagination, ProTableProps } from '../types/TableTypings';
|
|
3
|
-
import type { ComputedRef, Ref } from 'vue';
|
|
4
4
|
export declare function usePagination({ slots, props, pagination }: {
|
|
5
5
|
slots: Slots;
|
|
6
6
|
props: ComputedRef<ProTableProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
3
|
import type { Key, SelectionSelectFn } from '../_utils';
|
|
4
4
|
import type { ProTableRowSelection } from '../types/TableTypings';
|
|
5
5
|
export declare function useRowSelection(rowKey: Ref<string>, rowSelection: Ref<ProTableRowSelection | undefined>): {
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import type { BaseTableProps } from '../props';
|
|
3
|
-
import type { DefaultRecordType } from '../typing';
|
|
4
3
|
import type { ProColumnsType, ProSearchMap } from '../types/ColumnTypings';
|
|
5
4
|
import type { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequsetConfig, RequsetFunction } from '../types/TableTypings';
|
|
6
|
-
|
|
5
|
+
import { type RecordType } from '@gx-design-vue/pro-utils';
|
|
6
|
+
export type ProTableState<T extends object = RecordType, R extends object = RecordType> = BaseTableProps & {
|
|
7
7
|
params: R;
|
|
8
8
|
columns: ProColumnsType<T, R>;
|
|
9
9
|
dataSource: T[];
|
|
@@ -15,8 +15,8 @@ export type ProTableState<T extends object = DefaultRecordType, R extends object
|
|
|
15
15
|
onReload?: (params?: Partial<R>) => void;
|
|
16
16
|
onSubmit?: (params?: Partial<R>) => void;
|
|
17
17
|
};
|
|
18
|
-
export type BaseTableState<T extends object =
|
|
19
|
-
export declare function useTable<T extends object =
|
|
18
|
+
export type BaseTableState<T extends object = RecordType, R extends object = RecordType> = Omit<ProTableProps<T, R>, 'request'>;
|
|
19
|
+
export declare function useTable<T extends object = RecordType, R extends object = RecordType>(tableRef: Ref<ProTableRef<T> | undefined>, options?: {
|
|
20
20
|
state?: BaseTableState<T, R>;
|
|
21
21
|
request?: RequsetFunction<T, R>;
|
|
22
22
|
}): {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
1
2
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type { ProTablePagination, ProTableProps } from '../types/TableTypings';
|
|
3
|
-
import type { DefaultRecordType } from '../typing';
|
|
4
3
|
import type { ProSearchMap } from '../types/ColumnTypings';
|
|
4
|
+
import type { ProTablePagination, ProTableProps } from '../types/TableTypings';
|
|
5
5
|
export declare function handleFormDefaultValue(data: ProSearchMap[]): any;
|
|
6
6
|
export declare function useTableForm({ searchMap, params, columns, setPagination }: {
|
|
7
7
|
searchMap: Ref<ProTableProps['searchMap']>;
|
|
@@ -9,8 +9,8 @@ export declare function useTableForm({ searchMap, params, columns, setPagination
|
|
|
9
9
|
columns: ComputedRef<ProTableProps['columns']>;
|
|
10
10
|
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
11
11
|
}): {
|
|
12
|
-
formDataRef: Ref<ProSearchMap[], ProSearchMap[]>;
|
|
13
|
-
formParamsRef:
|
|
14
|
-
defaultParamsRef:
|
|
15
|
-
setFormParams: (params:
|
|
12
|
+
formDataRef: Ref<ProSearchMap<"text", string>[], ProSearchMap<"text", string>[]>;
|
|
13
|
+
formParamsRef: RecordType;
|
|
14
|
+
defaultParamsRef: RecordType;
|
|
15
|
+
setFormParams: (params: RecordType) => void;
|
|
16
16
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import { type Breakpoint } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type { ProTableProps } from '../types/TableTypings';
|
|
4
2
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
|
-
type
|
|
3
|
+
import type { ProTableProps } from '../types/TableTypings';
|
|
4
|
+
import { type Breakpoint } from '@gx-design-vue/pro-utils';
|
|
5
|
+
interface ConfigScroll {
|
|
6
6
|
scroll: ComputedRef<ProTableProps['scroll']>;
|
|
7
7
|
autoScroll: ComputedRef<ProTableProps['autoScroll']>;
|
|
8
8
|
modalScroll: ComputedRef<ProTableProps['modalScroll']>;
|
|
9
9
|
neverScroll: ComputedRef<ProTableProps['neverScroll']>;
|
|
10
10
|
rowSelection: ComputedRef<ProTableProps['rowSelection']>;
|
|
11
11
|
scrollBreakpoint: ComputedRef<ProTableProps['scrollBreakpoint']>;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
type useTableScrollType = {
|
|
14
14
|
columns: ComputedRef<ProColumnsType>;
|
|
15
15
|
innerWidth: Ref<number>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type { BaseTableProps } from './props';
|
|
2
|
-
export type { ProTableProps, PageState } from './types/TableTypings';
|
|
3
|
-
export type { CustomRenderResult, ProTableBodyCellProps } from './types/SlotsTypings';
|
|
4
|
-
export type { ProColumnType, ProColumnsType, ProSearchMap } from './types/ColumnTypings';
|
|
5
1
|
export * from './hooks/useTable';
|
|
2
|
+
export type { BaseTableProps } from './props';
|
|
6
3
|
export { proTableProps } from './props';
|
|
7
4
|
export { default } from './ProTable';
|
|
8
|
-
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType, OptionConfig, SearchConfig } from './types/TableTypings';
|
|
9
5
|
export { default as GProTable } from './ProTable';
|
|
6
|
+
export type { ProColumnsType, ProColumnType, ProSearchMap } from './types/ColumnTypings';
|
|
7
|
+
export type { CustomRenderResult, ProTableBodyCellProps } from './types/SlotsTypings';
|
|
8
|
+
export type { PageState, ProTableProps } from './types/TableTypings';
|
|
9
|
+
export type { OptionConfig, ProCoreActionType, ProCoreFormType, ProTabelFeachParams, ProTableRef, RequsetFunction, SearchConfig } from './types/TableTypings';
|