@gx-design-vue/pro-table 0.2.0-beta.65 → 0.2.0-beta.66
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 +1 -1
- package/dist/hooks/useColums.d.ts +15 -2
- package/dist/hooks/useFetchData.d.ts +2 -2
- package/dist/hooks/useLoading.d.ts +4 -3
- package/dist/hooks/useTable.d.ts +4 -3
- package/dist/pro-table.js +961 -974
- package/dist/pro-table.umd.cjs +1 -1
- package/dist/types/ColumnTypings.d.ts +5 -4
- package/dist/types/TableTypings.d.ts +2 -2
- package/package.json +3 -3
package/dist/ProTable.d.ts
CHANGED
|
@@ -598,7 +598,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
598
598
|
}>, {
|
|
599
599
|
title: import("ant-design-vue/es/vc-table/interface").PanelRender<any> | undefined;
|
|
600
600
|
customRender: import("./types/SlotsTypings").CustomDataRender | undefined;
|
|
601
|
-
align:
|
|
601
|
+
align: "right" | "left" | "center" | undefined;
|
|
602
602
|
sortDirections: import("ant-design-vue/es/table/interface").SortOrder[];
|
|
603
603
|
showSorterTooltip: boolean | Partial<import("vue").ExtractPropTypes<{
|
|
604
604
|
title: import("vue-types").VueTypeValidableDef<any>;
|
|
@@ -15,10 +15,23 @@ 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
|
-
getProColumns: ComputedRef<
|
|
18
|
+
getProColumns: ComputedRef<(import("@gx-design-vue/pro-utils/dist").DefaultProColumn & Omit<import("ant-design-vue/es/table/interface").ColumnType<import("../typing").DefaultRecordType>, "key" | "dataIndex" | "width"> & {
|
|
19
|
+
children?: ProColumnsType<import("../typing").DefaultRecordType, import("@gx-design-vue/pro-utils/dist").RecordType> | undefined;
|
|
20
|
+
uuid?: string | number;
|
|
21
|
+
index?: number;
|
|
22
|
+
show?: boolean;
|
|
23
|
+
key?: string | undefined;
|
|
24
|
+
dataIndex?: string | undefined;
|
|
25
|
+
order?: number;
|
|
26
|
+
hideInSetting?: boolean;
|
|
27
|
+
searchConfig?: import("../types/ColumnTypings").ProSearchMap<undefined, string> | undefined;
|
|
28
|
+
copyable?: boolean;
|
|
29
|
+
columnEmptyText?: string;
|
|
30
|
+
valueType?: import("../types/ColumnTypings").ProColumnsValueType;
|
|
31
|
+
})[]>;
|
|
19
32
|
cacheProColumns: Ref<ProColumnsType, ProColumnsType>;
|
|
20
33
|
setColumns: (columnList: ProColumnsType) => void;
|
|
21
34
|
changeColumns: (columnState: Record<string, ColumnsState>) => void;
|
|
22
|
-
resizeColumnWidth: (
|
|
35
|
+
resizeColumnWidth: (width: number, col: ProColumnType) => void;
|
|
23
36
|
};
|
|
24
37
|
export {};
|
|
@@ -4,7 +4,7 @@ import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_util
|
|
|
4
4
|
import type { ProTabelFeachParams, ProTablePagination, ProTablePaginationConfig, ProTableProps } from '../types/TableTypings';
|
|
5
5
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
6
6
|
interface ActionType {
|
|
7
|
-
|
|
7
|
+
loading: ComputedRef<boolean | undefined>;
|
|
8
8
|
getPaginationInfo: ComputedRef<ProTablePagination>;
|
|
9
9
|
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
10
10
|
setLoading: (loading: boolean) => void;
|
|
@@ -25,7 +25,7 @@ export type ConfigFetchData = {
|
|
|
25
25
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
26
26
|
};
|
|
27
27
|
export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
|
|
28
|
-
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, loading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
|
|
29
29
|
dataSource: ComputedRef<RecordType[]>;
|
|
30
30
|
isTreeDataRef: ComputedRef<boolean>;
|
|
31
31
|
reSetDataList: (list: RecordType[]) => void;
|
|
@@ -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
|
};
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import type { BaseTableProps } from '../props';
|
|
3
|
-
import { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, RequsetConfig, RequsetFunction } from '../types/TableTypings';
|
|
3
|
+
import { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequsetConfig, RequsetFunction } from '../types/TableTypings';
|
|
4
4
|
import type { ProSearchMap } from '../types/ColumnTypings';
|
|
5
5
|
export declare function useTable<T extends object = Record<string, any>, R extends object = Record<string, any>>(tableRef: Ref<ProTableRef<T> | undefined>, options?: {
|
|
6
6
|
defaultValue?: Omit<ProTableProps<T, R>, 'request'>;
|
|
@@ -9,7 +9,7 @@ export declare function useTable<T extends object = Record<string, any>, R exten
|
|
|
9
9
|
dataSource: ComputedRef<T[]>;
|
|
10
10
|
selectedItem: ComputedRef<T[]>;
|
|
11
11
|
selectedKey: ComputedRef<ProCoreActionType<T, R>['selectedKey']>;
|
|
12
|
-
loading:
|
|
12
|
+
loading: Ref<boolean>;
|
|
13
13
|
requestParams: ComputedRef<RequsetConfig<R>['params']>;
|
|
14
14
|
reload: ProCoreActionType<T, R>['reload'];
|
|
15
15
|
mutate: ProCoreActionType<T, R>['reSetDataList'];
|
|
@@ -20,9 +20,10 @@ export declare function useTable<T extends object = Record<string, any>, R exten
|
|
|
20
20
|
setLoading: ProCoreActionType<T, R>['setLoading'];
|
|
21
21
|
actionRef: ComputedRef<Partial<ProCoreActionType<T, R>>>;
|
|
22
22
|
formRef: ComputedRef<ProCoreFormType<R>>;
|
|
23
|
-
tableState: Omit<BaseTableProps, 'params' | 'dataSource' | 'searchMap'> & {
|
|
23
|
+
tableState: Omit<BaseTableProps, 'params' | 'dataSource' | 'searchMap' | 'rowSelection'> & {
|
|
24
24
|
params: R;
|
|
25
25
|
dataSource: T[];
|
|
26
|
+
rowSelection: ProTableRowSelection<T>;
|
|
26
27
|
searchMap: ProSearchMap<undefined, keyof R>[];
|
|
27
28
|
};
|
|
28
29
|
};
|