@gx-design-vue/pro-table 0.2.0-beta.11 → 0.2.0-beta.111
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 +231 -796
- package/dist/_utils/ant-design-vue/index.d.ts +4 -2
- package/dist/_utils/ant-design-vue/input/typings.d.ts +1 -0
- package/dist/_utils/ant-design-vue/table/props.d.ts +33 -2
- package/dist/_utils/ant-design-vue/table/typings.d.ts +6 -5
- package/dist/_utils/ant-design-vue/tooltip/typings.d.ts +1 -0
- package/dist/_utils/index.d.ts +1 -1
- package/dist/components/ColumnSetting/index.d.ts +16 -16
- package/dist/components/ColumnSetting/style.d.ts +2 -5
- package/dist/components/Form/components/RequestSelect.d.ts +39 -0
- package/dist/components/Form/{useForm.d.ts → hooks/useForm.d.ts} +1 -1
- package/dist/components/Form/index.d.ts +39 -21
- package/dist/components/Form/style.d.ts +2 -5
- package/dist/components/Form/utils/config.d.ts +5 -0
- package/dist/components/Form/utils/dateFormat.d.ts +20 -0
- package/dist/components/ListToolBar/index.d.ts +21 -21
- package/dist/components/ListToolBar/style.d.ts +2 -5
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -1
- package/dist/components/ToolBar/index.d.ts +20 -20
- package/dist/context/TableContext.d.ts +16 -14
- package/dist/hooks/tryOnActivated.d.ts +2 -0
- package/dist/hooks/useColumnSetting.d.ts +6 -6
- package/dist/hooks/useColumns.d.ts +102 -0
- package/dist/hooks/useDebounceFn.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +20 -15
- package/dist/hooks/useLoading.d.ts +4 -3
- package/dist/hooks/usePagination.d.ts +8 -3
- package/dist/hooks/useRowSelection.d.ts +11 -8
- package/dist/hooks/useTable.d.ts +38 -11
- package/dist/hooks/useTableForm.d.ts +6 -6
- package/dist/hooks/useTableScroll.d.ts +11 -11
- package/dist/hooks/useTableSize.d.ts +2 -2
- package/dist/index.d.ts +6 -5
- package/dist/pro-table.js +2995 -0
- package/dist/pro-table.umd.cjs +1 -0
- package/dist/props.d.ts +94 -359
- package/dist/style.d.ts +2 -6
- package/dist/types/ColumnTypings.d.ts +54 -16
- package/dist/types/SlotsTypings.d.ts +42 -9
- package/dist/types/TableTypings.d.ts +117 -67
- package/dist/utils/utils.d.ts +4 -1
- package/package.json +28 -50
- package/volar.d.ts +3 -3
- package/dist/hooks/useColums.d.ts +0 -24
- package/dist/pro-table.mjs +0 -35085
- package/dist/pro-table.umd.js +0 -364
- package/dist/typing.d.ts +0 -1
- package/dist/utils/config.d.ts +0 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { ProColumnsType, ProColumnType } from '../types/ColumnTypings';
|
|
3
|
+
import type { ProTableProps } from '../types/TableTypings';
|
|
4
|
+
import type { ColumnsState } from './useColumnSetting';
|
|
5
|
+
export interface ConfigColumns {
|
|
6
|
+
draggabled: ComputedRef<ProTableProps['draggabled']>;
|
|
7
|
+
neverScroll: ComputedRef<ProTableProps['neverScroll']>;
|
|
8
|
+
autoScroll: ComputedRef<ProTableProps['autoScroll']>;
|
|
9
|
+
}
|
|
10
|
+
type UseColumnsType = {
|
|
11
|
+
scroll: ComputedRef<ProTableProps['scroll']>;
|
|
12
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
13
|
+
columns: ComputedRef<ProColumnsType>;
|
|
14
|
+
} & ConfigColumns;
|
|
15
|
+
export declare function useConfigColumns(props: ProTableProps): ConfigColumns;
|
|
16
|
+
export declare function useColumns({ scroll, columns, breakpoint, draggabled, autoScroll, neverScroll }: UseColumnsType): {
|
|
17
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
18
|
+
proColumns: ComputedRef<(import("../types/ColumnTypings").DefaultProColumnWithKeyOrDataIndex<import("@gx-design-vue/pro-utils/dist").RecordType> & Omit<import("ant-design-vue/es/table/interface").ColumnType<import("@gx-design-vue/pro-utils/dist").RecordType>, keyof import("../types/ColumnTypings").DefaultProColumn | "key" | "dataIndex"> & {
|
|
19
|
+
children?: ProColumnsType<import("@gx-design-vue/pro-utils/dist").RecordType, import("@gx-design-vue/pro-utils/dist").RecordType> | undefined;
|
|
20
|
+
index?: number;
|
|
21
|
+
copyText?: string | ((record: ProColumnType) => string);
|
|
22
|
+
tooltip?: false | (Partial<import("vue").ExtractPropTypes<{
|
|
23
|
+
title: import("vue-types").VueTypeValidableDef<any>;
|
|
24
|
+
trigger: import("vue").PropType<import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType | import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType[]>;
|
|
25
|
+
open: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
visible: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: any;
|
|
32
|
+
};
|
|
33
|
+
placement: import("vue").PropType<import("ant-design-vue/es/tooltip").TooltipPlacement>;
|
|
34
|
+
color: import("vue").PropType<import("ant-design-vue/es/_util/type").LiteralUnion<import("ant-design-vue/es/_util/colors").PresetColorType>>;
|
|
35
|
+
transitionName: StringConstructor;
|
|
36
|
+
overlayStyle: {
|
|
37
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
38
|
+
default: import("vue").CSSProperties;
|
|
39
|
+
};
|
|
40
|
+
overlayInnerStyle: {
|
|
41
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
42
|
+
default: import("vue").CSSProperties;
|
|
43
|
+
};
|
|
44
|
+
overlayClassName: StringConstructor;
|
|
45
|
+
openClassName: StringConstructor;
|
|
46
|
+
prefixCls: StringConstructor;
|
|
47
|
+
mouseEnterDelay: NumberConstructor;
|
|
48
|
+
mouseLeaveDelay: NumberConstructor;
|
|
49
|
+
getPopupContainer: import("vue").PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
50
|
+
arrowPointAtCenter: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: any;
|
|
53
|
+
};
|
|
54
|
+
arrow: {
|
|
55
|
+
type: import("vue").PropType<boolean | {
|
|
56
|
+
pointAtCenter?: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
default: boolean | {
|
|
59
|
+
pointAtCenter?: boolean;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
autoAdjustOverflow: {
|
|
63
|
+
type: import("vue").PropType<boolean | import("ant-design-vue/es/tooltip").AdjustOverflow>;
|
|
64
|
+
default: boolean | import("ant-design-vue/es/tooltip").AdjustOverflow;
|
|
65
|
+
};
|
|
66
|
+
destroyTooltipOnHide: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: any;
|
|
69
|
+
};
|
|
70
|
+
align: {
|
|
71
|
+
type: import("vue").PropType<import("ant-design-vue/es/vc-trigger/interface").AlignType>;
|
|
72
|
+
default: import("ant-design-vue/es/vc-trigger/interface").AlignType;
|
|
73
|
+
};
|
|
74
|
+
builtinPlacements: {
|
|
75
|
+
type: import("vue").PropType<import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements>;
|
|
76
|
+
default: import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements;
|
|
77
|
+
};
|
|
78
|
+
children: ArrayConstructor;
|
|
79
|
+
onVisibleChange: import("vue").PropType<(vis: boolean) => void>;
|
|
80
|
+
'onUpdate:visible': import("vue").PropType<(vis: boolean) => void>;
|
|
81
|
+
onOpenChange: import("vue").PropType<(vis: boolean) => void>;
|
|
82
|
+
'onUpdate:open': import("vue").PropType<(vis: boolean) => void>;
|
|
83
|
+
}>> & {
|
|
84
|
+
width?: number;
|
|
85
|
+
targetStyle?: Partial<import("vue").CSSProperties>;
|
|
86
|
+
hiddenLine?: number;
|
|
87
|
+
class?: string;
|
|
88
|
+
}) | undefined;
|
|
89
|
+
show?: boolean;
|
|
90
|
+
order?: number;
|
|
91
|
+
hideInSetting?: boolean;
|
|
92
|
+
searchConfig?: import("../types/ColumnTypings").ProSearchMap<undefined, string> | undefined;
|
|
93
|
+
copyable?: boolean;
|
|
94
|
+
columnEmptyText?: string;
|
|
95
|
+
valueType?: import("../types/ColumnTypings").ProColumnsValueType;
|
|
96
|
+
})[]>;
|
|
97
|
+
cacheProColumns: Ref<ProColumnsType, ProColumnsType>;
|
|
98
|
+
setColumns: (columnList: ProColumnsType) => void;
|
|
99
|
+
changeColumns: (columnState: Record<string, ColumnsState>) => void;
|
|
100
|
+
resizeColumnWidth: (width: number, col: ProColumnType) => void;
|
|
101
|
+
};
|
|
102
|
+
export {};
|
|
@@ -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,11 +1,12 @@
|
|
|
1
|
-
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type { TableSorter } from '../_utils';
|
|
3
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
|
-
import type {
|
|
2
|
+
import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils';
|
|
5
3
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
4
|
+
import type { ProTableFetchParams, ProTablePagination, ProTablePaginationConfig, ProTableProps, SearchConfig } from '../types/TableTypings';
|
|
5
|
+
import { ComputedRef, Ref } from 'vue';
|
|
6
6
|
interface ActionType {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
loading: ComputedRef<boolean | undefined>;
|
|
8
|
+
search: ComputedRef<SearchConfig | false>;
|
|
9
|
+
paginationInfo: Ref<ProTablePagination>;
|
|
9
10
|
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
10
11
|
setLoading: (loading: boolean) => void;
|
|
11
12
|
setColumns: (columnList: ProColumnsType) => void;
|
|
@@ -14,25 +15,29 @@ interface ActionType {
|
|
|
14
15
|
columns: ComputedRef<ProColumnsType>;
|
|
15
16
|
formParamsRef: RecordType;
|
|
16
17
|
onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
|
|
18
|
+
hasCustomRender: ComputedRef<boolean>;
|
|
17
19
|
}
|
|
18
|
-
export
|
|
20
|
+
export interface ConfigFetchData {
|
|
21
|
+
rowKey: ComputedRef<ProTableProps['rowKey']>;
|
|
19
22
|
polling: ComputedRef<ProTableProps['polling']>;
|
|
20
|
-
request:
|
|
21
|
-
postData:
|
|
23
|
+
request: ProTableProps['request'];
|
|
24
|
+
postData: ProTableProps['postData'];
|
|
22
25
|
waitRequest: Ref<ProTableProps['waitRequest']>;
|
|
23
26
|
debounceTime: ComputedRef<ProTableProps['debounceTime']>;
|
|
24
27
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
25
|
-
}
|
|
28
|
+
}
|
|
26
29
|
export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
|
|
27
|
-
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns,
|
|
28
|
-
|
|
30
|
+
export declare function useFetchData({ rowKey, polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { search, columns, loading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, paginationInfo, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
|
|
31
|
+
dataSource: ComputedRef<RecordType[]>;
|
|
29
32
|
isTreeDataRef: ComputedRef<boolean>;
|
|
30
33
|
reSetDataList: (list: RecordType[]) => void;
|
|
31
|
-
changeDataValue: ({ key, params }: {
|
|
34
|
+
changeDataValue: ({ key, type, params, value }: {
|
|
35
|
+
params?: Partial<RecordType> | undefined;
|
|
32
36
|
key?: string | undefined;
|
|
33
|
-
|
|
37
|
+
value?: any;
|
|
38
|
+
type?: "update" | "push" | "delete" | "unshift";
|
|
34
39
|
}) => void;
|
|
35
|
-
handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string,
|
|
36
|
-
reload: (info?:
|
|
40
|
+
handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
|
|
41
|
+
reload: (info?: ProTableFetchParams) => Promise<void>;
|
|
37
42
|
};
|
|
38
43
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import type { SpinProps } from '../_utils';
|
|
3
|
-
export declare function useLoading({ emit, loading }: {
|
|
3
|
+
export declare function useLoading({ emit, loading: propsLoading }: {
|
|
4
4
|
loading: Ref<boolean | SpinProps | undefined>;
|
|
5
5
|
emit: any;
|
|
6
6
|
}): {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
loadingComputed: import("vue").ComputedRef<boolean | undefined>;
|
|
8
|
+
loading: Ref<boolean | undefined, boolean | undefined>;
|
|
9
|
+
setLoading: (value: boolean) => void;
|
|
9
10
|
};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { Slots } from '../types/SlotsTypings';
|
|
3
|
+
import type { ProTablePagination, ProTableProps } from '../types/TableTypings';
|
|
3
4
|
export declare function usePagination({ slots, props, pagination }: {
|
|
4
5
|
slots: Slots;
|
|
5
6
|
props: ComputedRef<ProTableProps>;
|
|
6
7
|
pagination: Ref<ProTableProps['pagination']>;
|
|
7
8
|
}): {
|
|
8
|
-
|
|
9
|
+
paginationInfo: Ref<ProTablePagination, ProTablePagination>;
|
|
10
|
+
requestPagination: {
|
|
11
|
+
pageSize: number;
|
|
12
|
+
pageNum: number;
|
|
13
|
+
};
|
|
9
14
|
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
10
15
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
import type { Key, SelectionSelectFn } from '../_utils';
|
|
4
|
+
import type { ProTableRowSelection } from '../types/TableTypings';
|
|
5
|
+
export declare function useRowSelection(rowKey: Ref<string>, rowSelection: Ref<ProTableRowSelection | undefined>): {
|
|
6
|
+
selectedKeys: Ref<Key[], Key[]>;
|
|
7
|
+
selectedItems: Ref<RecordType[], RecordType[]>;
|
|
8
|
+
selectRowKey: SelectionSelectFn<RecordType>;
|
|
9
|
+
selectAllRowKey: (selected: boolean, selectedRows: RecordType[], changeRows: RecordType[]) => void;
|
|
10
|
+
removeRowKeys: (keys: (string | number)[]) => void;
|
|
9
11
|
changeRowKey: () => void;
|
|
10
|
-
syncSelectedRows: (dataList:
|
|
12
|
+
syncSelectedRows: (dataList: RecordType[]) => void;
|
|
13
|
+
clearAllRowKeys: () => void;
|
|
11
14
|
};
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import type { ComputedRef, MaybeRef, Ref } from 'vue';
|
|
2
|
+
import type { BaseTableProps } from '../props';
|
|
3
|
+
import type { ProColumnsType, ProSearchMap } from '../types/ColumnTypings';
|
|
4
|
+
import type { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequestConfig, RequestFunction } from '../types/TableTypings';
|
|
5
|
+
import { RecordType } from '@gx-design-vue/pro-utils';
|
|
6
|
+
export type ProTableState<T extends object = RecordType, R extends object = RecordType> = BaseTableProps & {
|
|
7
|
+
params: R;
|
|
8
|
+
columns: ProColumnsType<T, R>;
|
|
9
|
+
dataSource: T[];
|
|
10
|
+
rowSelection: ProTableRowSelection<T>;
|
|
11
|
+
searchMap: ProSearchMap<undefined, keyof R | keyof T>[];
|
|
12
|
+
rowKey?: keyof T;
|
|
13
|
+
postData?: (data: T[]) => any;
|
|
14
|
+
onReset?: (params?: Partial<R>) => void;
|
|
15
|
+
onReload?: (params?: Partial<R>) => void;
|
|
16
|
+
onSubmit?: (params?: Partial<R>) => void;
|
|
17
|
+
};
|
|
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
|
+
state?: MaybeRef<BaseTableState<T, R>>;
|
|
21
|
+
request?: RequestFunction<T, R>;
|
|
22
|
+
}): {
|
|
23
|
+
loading: Ref<boolean>;
|
|
24
|
+
dataSource: ComputedRef<T[]>;
|
|
25
|
+
selectedKeys: ProCoreActionType<T, R>['selectedKeys'];
|
|
26
|
+
selectedItems: ProCoreActionType<T, R>['selectedItems'];
|
|
27
|
+
rowsSelection: ProCoreActionType<T, R>['rowsSelection'];
|
|
28
|
+
requestSearch: ComputedRef<RequestConfig<R>['params']>;
|
|
29
|
+
reload: ProCoreActionType<T, R>['reload'];
|
|
30
|
+
mutate: ProCoreActionType<T, R>['reSetDataList'];
|
|
31
|
+
setPageAndReload: ProCoreActionType<T, R>['setPageAndReload'];
|
|
32
|
+
setDataValue: ProCoreActionType<T, R>['setDataValue'];
|
|
33
|
+
setPagination: ProCoreActionType<T, R>['setPagination'];
|
|
34
|
+
reloadAndReset: ProCoreActionType<T, R>['reloadAndReset'];
|
|
35
|
+
setLoading: ProCoreActionType<T, R>['setLoading'];
|
|
36
|
+
actionRef: ComputedRef<Partial<ProCoreActionType<T, R>>>;
|
|
37
|
+
formRef: ComputedRef<ProCoreFormType<R>>;
|
|
38
|
+
tableState: ProTableState<T, R>;
|
|
12
39
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { ComputedRef, Ref } from 'vue';
|
|
2
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type {
|
|
2
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
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
|
-
export declare function useTableForm({
|
|
7
|
-
search: Ref<ProTableProps['search']>;
|
|
6
|
+
export declare function useTableForm({ searchMap, params, columns, setPagination }: {
|
|
8
7
|
searchMap: Ref<ProTableProps['searchMap']>;
|
|
9
8
|
params: Ref<ProTableProps['params']>;
|
|
10
9
|
columns: ComputedRef<ProTableProps['columns']>;
|
|
10
|
+
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
11
11
|
}): {
|
|
12
|
-
formDataRef: Ref<ProSearchMap<"text">[]>;
|
|
12
|
+
formDataRef: Ref<ProSearchMap<"text", string>[], ProSearchMap<"text", string>[]>;
|
|
13
13
|
formParamsRef: RecordType;
|
|
14
14
|
defaultParamsRef: RecordType;
|
|
15
|
-
setFormParams: (params:
|
|
15
|
+
setFormParams: (params: RecordType) => void;
|
|
16
16
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
+
import type { Breakpoint } from '@gx-design-vue/pro-utils';
|
|
1
2
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import { type Breakpoint } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type { ProTableProps } from '../types/TableTypings';
|
|
4
3
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
|
-
type
|
|
4
|
+
import type { ProTableProps } from '../types/TableTypings';
|
|
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>;
|
|
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,
|
|
20
|
-
|
|
21
|
-
x?:
|
|
22
|
-
y?:
|
|
19
|
+
export declare function useTableScroll({ scroll, columns, autoScroll, modalScroll, neverScroll, rowSelection, screens, innerWidth, scrollBreakpoint }: useTableScrollType): {
|
|
20
|
+
proScroll: ComputedRef<({
|
|
21
|
+
x?: number | true | string;
|
|
22
|
+
y?: number | string;
|
|
23
23
|
} & {
|
|
24
|
-
scrollToFirstRowOnChange?: boolean
|
|
24
|
+
scrollToFirstRowOnChange?: boolean;
|
|
25
25
|
}) | undefined>;
|
|
26
|
-
breakpoint: ComputedRef<boolean>;
|
|
26
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
27
27
|
};
|
|
28
28
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
1
|
import type { SizeType } from '@gx-design-vue/pro-utils';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
3
|
export declare function useTableSize({ size, emit }: {
|
|
4
4
|
size: Ref<SizeType>;
|
|
5
5
|
emit: any;
|
|
6
6
|
}): {
|
|
7
|
-
sizeRef: Ref<SizeType>;
|
|
7
|
+
sizeRef: Ref<SizeType, SizeType>;
|
|
8
8
|
setTableSize: (size: SizeType) => void;
|
|
9
9
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
export * from './hooks/useTable';
|
|
2
|
+
export type { BaseTableProps } from './props';
|
|
2
3
|
export { proTableProps } from './props';
|
|
3
4
|
export { default } from './ProTable';
|
|
4
|
-
export type { ProTableProps } from './types/TableTypings';
|
|
5
|
-
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType } from './types/TableTypings';
|
|
6
|
-
export type { ProColumnType, ProColumnsType, ProSearchMap } from './types/ColumnTypings';
|
|
7
|
-
export { useTable };
|
|
8
5
|
export { default as GProTable } from './ProTable';
|
|
6
|
+
export type { ProColumnsType, ProColumnType, ProFieldValueType, 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, ProTableFetchParams, ProTableRef, RequestFunction, SearchConfig } from './types/TableTypings';
|