@gx-design-vue/pro-table 0.2.0-beta.9 → 0.2.0-beta.90
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 +195 -793
- 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/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/components/ColumnSetting/index.d.ts +14 -14
- package/dist/components/ColumnSetting/style.d.ts +2 -5
- package/dist/components/Form/dateFormat.d.ts +20 -0
- package/dist/components/Form/index.d.ts +15 -14
- 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 +88 -7
- package/dist/hooks/useFetchData.d.ts +18 -15
- package/dist/hooks/useLoading.d.ts +5 -4
- package/dist/hooks/usePagination.d.ts +8 -3
- package/dist/hooks/useRowSelection.d.ts +10 -7
- package/dist/hooks/useTable.d.ts +38 -11
- package/dist/hooks/useTableForm.d.ts +8 -8
- package/dist/hooks/useTableScroll.d.ts +7 -7
- package/dist/hooks/useTableSize.d.ts +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/pro-table.js +2706 -0
- package/dist/pro-table.umd.cjs +1 -0
- package/dist/props.d.ts +72 -358
- package/dist/style.d.ts +2 -6
- package/dist/types/ColumnTypings.d.ts +22 -12
- package/dist/types/SlotsTypings.d.ts +42 -8
- package/dist/types/TableTypings.d.ts +97 -59
- package/dist/typing.d.ts +1 -1
- package/dist/utils/utils.d.ts +4 -1
- package/package.json +20 -43
- package/volar.d.ts +3 -3
- package/dist/pro-table.mjs +0 -35090
- package/dist/pro-table.umd.js +0 -364
- package/dist/utils/config.d.ts +0 -1
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, Ref } from 'vue';
|
|
2
|
+
import type { BaseTableProps } from '../props';
|
|
3
|
+
import type { DefaultRecordType } from '../typing';
|
|
4
|
+
import type { ProColumnsType, ProSearchMap } from '../types/ColumnTypings';
|
|
5
|
+
import type { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequsetConfig, RequsetFunction } from '../types/TableTypings';
|
|
6
|
+
export type ProTableState<T extends object = DefaultRecordType, R extends object = DefaultRecordType> = 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 = DefaultRecordType, R extends object = DefaultRecordType> = Omit<ProTableProps<T, R>, 'request'>;
|
|
19
|
+
export declare function useTable<T extends object = DefaultRecordType, R extends object = DefaultRecordType>(tableRef: Ref<ProTableRef<T> | undefined>, options?: {
|
|
20
|
+
state?: BaseTableState<T, R>;
|
|
21
|
+
request?: RequsetFunction<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
|
+
requestParams: ComputedRef<RequsetConfig<R>['params']>;
|
|
29
|
+
reload: ProCoreActionType<T, R>['reload'];
|
|
30
|
+
mutate: ProCoreActionType<T, R>['reSetDataList'];
|
|
31
|
+
setPageAndReload: ProCoreActionType<T, R>['setPageAndReload'];
|
|
32
|
+
setData: ProCoreActionType<T, R>['setData'];
|
|
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
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { ProTablePagination, ProTableProps } from '../types/TableTypings';
|
|
3
|
+
import type { DefaultRecordType } from '../typing';
|
|
4
4
|
import type { ProSearchMap } from '../types/ColumnTypings';
|
|
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
|
|
13
|
-
formParamsRef:
|
|
14
|
-
defaultParamsRef:
|
|
15
|
-
setFormParams: (params:
|
|
12
|
+
formDataRef: Ref<ProSearchMap[], ProSearchMap[]>;
|
|
13
|
+
formParamsRef: DefaultRecordType;
|
|
14
|
+
defaultParamsRef: DefaultRecordType;
|
|
15
|
+
setFormParams: (params: DefaultRecordType) => void;
|
|
16
16
|
};
|
|
@@ -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,
|
|
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 {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
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
|
+
export * from './hooks/useTable';
|
|
2
6
|
export { proTableProps } from './props';
|
|
3
7
|
export { default } from './ProTable';
|
|
4
|
-
export type {
|
|
5
|
-
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType } from './types/TableTypings';
|
|
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';
|
|
8
9
|
export { default as GProTable } from './ProTable';
|