@gx-design-vue/pro-table 0.2.0-beta.7 → 0.2.0-beta.71
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 +401 -600
- 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 +183 -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 +0 -1
- package/dist/components/ColumnSetting/index.d.ts +14 -14
- package/dist/components/ColumnSetting/style.d.ts +2 -5
- package/dist/components/Form/index.d.ts +14 -13
- package/dist/components/Form/style.d.ts +2 -5
- package/dist/components/ListToolBar/index.d.ts +18 -18
- package/dist/components/ListToolBar/style.d.ts +2 -5
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -2
- package/dist/components/ToolBar/index.d.ts +18 -18
- package/dist/context/TableContext.d.ts +10 -11
- package/dist/hooks/useColums.d.ts +20 -7
- package/dist/hooks/useFetchData.d.ts +15 -13
- package/dist/hooks/useLoading.d.ts +5 -12
- package/dist/hooks/usePagination.d.ts +8 -3
- package/dist/hooks/useRowSelection.d.ts +9 -6
- package/dist/hooks/useTable.d.ts +31 -11
- package/dist/hooks/useTableForm.d.ts +6 -5
- package/dist/hooks/useTableScroll.d.ts +6 -6
- package/dist/hooks/useTableSize.d.ts +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/pro-table.js +2790 -0
- package/dist/pro-table.umd.cjs +1 -0
- package/dist/props.d.ts +147 -274
- package/dist/style.d.ts +2 -6
- package/dist/types/ColumnTypings.d.ts +12 -9
- package/dist/types/SlotsTypings.d.ts +37 -8
- package/dist/types/TableTypings.d.ts +86 -55
- package/dist/utils/utils.d.ts +3 -1
- package/package.json +20 -42
- package/volar.d.ts +3 -3
- package/dist/_utils/typings.d.ts +0 -9
- package/dist/pro-table.mjs +0 -32740
- package/dist/pro-table.umd.js +0 -328
- package/dist/utils/config.d.ts +0 -1
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import type
|
|
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
|
-
|
|
9
|
-
|
|
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
|
+
loadingComputed: import("vue").ComputedRef<boolean | undefined>;
|
|
8
|
+
loading: Ref<boolean | undefined, boolean | undefined>;
|
|
9
|
+
setLoading: (value: boolean) => void;
|
|
17
10
|
};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import { 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
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
selectedKey: Ref<Key[], Key[]>;
|
|
7
|
+
selectedItem: Ref<RecordType[], RecordType[]>;
|
|
8
|
+
selectRowKey: SelectionSelectFn<RecordType>;
|
|
9
|
+
selectAllRowKey: (selected: boolean, selectedRows: RecordType[], changeRows: RecordType[]) => void;
|
|
8
10
|
removeRowKeys: (keyList: (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,32 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { BaseTableProps } from '../props';
|
|
3
|
+
import type { ProSearchMap } from '../types/ColumnTypings';
|
|
4
|
+
import { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequsetConfig, RequsetFunction } from '../types/TableTypings';
|
|
5
|
+
export declare function useTable<T extends object = Record<string, any>, R extends object = Record<string, any>>(tableRef: Ref<ProTableRef<T> | undefined>, options?: {
|
|
6
|
+
state?: Omit<ProTableProps<T, R>, 'request'>;
|
|
7
|
+
request?: RequsetFunction<T, R>;
|
|
8
|
+
}): {
|
|
9
|
+
dataSource: ComputedRef<T[]>;
|
|
10
|
+
rowsSelection: () => {
|
|
11
|
+
keys: (string | number)[];
|
|
12
|
+
items: T[];
|
|
13
|
+
clear: () => void;
|
|
14
|
+
};
|
|
15
|
+
loading: Ref<boolean>;
|
|
16
|
+
requestParams: ComputedRef<RequsetConfig<R>['params']>;
|
|
17
|
+
reload: ProCoreActionType<T, R>['reload'];
|
|
18
|
+
mutate: ProCoreActionType<T, R>['reSetDataList'];
|
|
19
|
+
setPageAndReload: ProCoreActionType<T, R>['setPageAndReload'];
|
|
20
|
+
setData: ProCoreActionType<T, R>['setData'];
|
|
21
|
+
setPagination: ProCoreActionType<T, R>['setPagination'];
|
|
22
|
+
reloadAndReset: ProCoreActionType<T, R>['reloadAndReset'];
|
|
23
|
+
setLoading: ProCoreActionType<T, R>['setLoading'];
|
|
24
|
+
actionRef: ComputedRef<Partial<ProCoreActionType<T, R>>>;
|
|
25
|
+
formRef: ComputedRef<ProCoreFormType<R>>;
|
|
26
|
+
tableState: Omit<BaseTableProps, 'params' | 'dataSource' | 'searchMap' | 'rowSelection'> & {
|
|
27
|
+
params: R;
|
|
28
|
+
dataSource: T[];
|
|
29
|
+
rowSelection: ProTableRowSelection<T>;
|
|
30
|
+
searchMap: ProSearchMap<undefined, keyof R>[];
|
|
31
|
+
};
|
|
12
32
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type
|
|
3
|
-
import type { ProTableProps } from '../types/TableTypings';
|
|
2
|
+
import { type RecordType } from '@gx-design-vue/pro-utils';
|
|
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
|
-
formDataRef: Ref<ProSearchMap
|
|
13
|
+
formDataRef: Ref<ProSearchMap[], ProSearchMap[]>;
|
|
13
14
|
formParamsRef: RecordType;
|
|
14
15
|
defaultParamsRef: RecordType;
|
|
15
|
-
setFormParams: (params:
|
|
16
|
+
setFormParams: (params: RecordType) => void;
|
|
16
17
|
};
|
|
@@ -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
|
-
x?:
|
|
22
|
-
y?:
|
|
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 {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { useTable } from './hooks/useTable';
|
|
2
|
+
export type { BaseTableProps } from './props';
|
|
3
|
+
export type { ProTableProps, PageState } from './types/TableTypings';
|
|
4
|
+
export type { ProTableBodyCellProps } from './types/SlotsTypings';
|
|
5
|
+
export type { ProColumnType, ProColumnsType, ProSearchMap } from './types/ColumnTypings';
|
|
2
6
|
export { proTableProps } from './props';
|
|
3
7
|
export { default } from './ProTable';
|
|
4
|
-
export type {
|
|
5
|
-
export
|
|
6
|
-
export type { ProColumnType, ProColumnsType, ProSearchMap } from './types/ColumnTypings';
|
|
7
|
-
export { useTable };
|
|
8
|
+
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType, OptionConfig, SearchConfig } from './types/TableTypings';
|
|
9
|
+
export { useTable, };
|
|
8
10
|
export { default as GProTable } from './ProTable';
|