@gx-design-vue/pro-table 0.2.0-beta.14 → 0.2.0-beta.141
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 +293 -823
- 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 +37 -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/Form/components/RequestSelect.d.ts +39 -0
- package/dist/components/Form/{useForm.d.ts → hooks/useForm.d.ts} +2 -2
- package/dist/components/Form/index.d.ts +19 -28
- package/dist/components/Form/style.d.ts +1 -1
- 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 +32 -39
- package/dist/components/ListToolBar/style.d.ts +1 -1
- package/dist/components/ScrollBar/Bar/index.d.ts +44 -0
- package/dist/components/ScrollBar/Bar/props.d.ts +21 -0
- package/dist/components/ScrollBar/Thumb/index.d.ts +35 -0
- package/dist/components/ScrollBar/Thumb/props.d.ts +16 -0
- package/dist/components/ScrollBar/context.d.ts +11 -0
- package/dist/components/ScrollBar/util.d.ts +29 -0
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -1
- package/dist/components/ToolBar/index.d.ts +24 -25
- package/dist/context/TableContext.d.ts +19 -17
- package/dist/hooks/tryOnActivated.d.ts +2 -0
- package/dist/hooks/useColumns.d.ts +18 -0
- package/dist/hooks/useDebounceFn.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +24 -17
- package/dist/hooks/useLoading.d.ts +5 -8
- package/dist/hooks/usePagination.d.ts +7 -6
- package/dist/hooks/useRowSelection.d.ts +11 -8
- package/dist/hooks/useScrollArea.d.ts +15 -0
- package/dist/hooks/useTable.d.ts +57 -11
- package/dist/hooks/useTableForm.d.ts +72 -10
- package/dist/hooks/useTableScroll.d.ts +14 -20
- package/dist/hooks/useTableSize.d.ts +4 -7
- package/dist/index.d.ts +8 -7
- package/dist/pro-table.js +2739 -0
- package/dist/pro-table.umd.cjs +12 -0
- package/dist/props.d.ts +129 -390
- package/dist/{components/ColumnSetting/style.d.ts → style/fit-page.d.ts} +2 -2
- package/dist/style/index.d.ts +6 -0
- package/dist/{style.d.ts → style/list.d.ts} +2 -2
- package/dist/style/scroll.d.ts +3 -0
- package/dist/types/ColumnTypings.d.ts +54 -16
- package/dist/types/SlotsTypings.d.ts +47 -9
- package/dist/types/TableTypings.d.ts +171 -80
- package/dist/utils/utils.d.ts +5 -1
- package/package.json +33 -52
- package/volar.d.ts +3 -3
- package/dist/components/ColumnSetting/hooks/useRefFunction/index.d.ts +0 -1
- package/dist/components/ColumnSetting/index.d.ts +0 -35
- package/dist/components/ToolBar/DensityIcon.d.ts +0 -3
- package/dist/hooks/useColumnSetting.d.ts +0 -31
- package/dist/hooks/useColums.d.ts +0 -24
- package/dist/pro-table.mjs +0 -34948
- package/dist/pro-table.umd.js +0 -327
- package/dist/typing.d.ts +0 -1
- package/dist/utils/config.d.ts +0 -1
|
@@ -1,38 +1,45 @@
|
|
|
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 { ComputedRef, Reactive, Ref } from 'vue';
|
|
3
|
+
import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils';
|
|
5
4
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
|
+
import type { PageState, ProTableFetchParams, ProTablePagination, ProTablePaginationConfig, ProTableProps } from '../types/TableTypings';
|
|
6
6
|
interface ActionType {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
loading: Ref<boolean>;
|
|
8
|
+
pageInfo: Reactive<PageState>;
|
|
9
9
|
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
10
10
|
setLoading: (loading: boolean) => void;
|
|
11
11
|
setColumns: (columnList: ProColumnsType) => void;
|
|
12
12
|
removeRowKeys: (keyList: (string | number)[]) => void;
|
|
13
13
|
syncSelectedRows: (dataList: any[]) => void;
|
|
14
14
|
columns: ComputedRef<ProColumnsType>;
|
|
15
|
-
|
|
15
|
+
defaultFormSearch: Ref<RecordType>;
|
|
16
|
+
params: Ref<ProTableProps['params']>;
|
|
17
|
+
onRequestError: ProTableProps['onRequestError'];
|
|
16
18
|
onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
|
|
19
|
+
hasCustomRender: ComputedRef<boolean>;
|
|
17
20
|
}
|
|
18
|
-
export
|
|
21
|
+
export interface ConfigFetchData {
|
|
22
|
+
rowKey: ComputedRef<ProTableProps['rowKey']>;
|
|
19
23
|
polling: ComputedRef<ProTableProps['polling']>;
|
|
20
|
-
request:
|
|
21
|
-
postData:
|
|
24
|
+
request: ProTableProps['request'];
|
|
25
|
+
postData: ProTableProps['postData'];
|
|
22
26
|
waitRequest: Ref<ProTableProps['waitRequest']>;
|
|
23
27
|
debounceTime: ComputedRef<ProTableProps['debounceTime']>;
|
|
24
28
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
25
|
-
|
|
29
|
+
autoRequest: ComputedRef<ProTableProps['autoRequest']>;
|
|
30
|
+
}
|
|
26
31
|
export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
|
|
27
|
-
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, {
|
|
28
|
-
|
|
32
|
+
export declare function useFetchData({ rowKey, autoRequest, polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { params, columns, setLoading, setColumns, removeRowKeys, syncSelectedRows, defaultFormSearch, setPagination, pageInfo, onRequestError, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
|
|
33
|
+
dataSource: ComputedRef<any[]>;
|
|
29
34
|
isTreeDataRef: ComputedRef<boolean>;
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
setTableDataList: (list: RecordType[]) => void;
|
|
36
|
+
operateTableDataRow: ({ key, type, row, value }: {
|
|
37
|
+
row?: Partial<RecordType> | undefined;
|
|
32
38
|
key?: string | undefined;
|
|
33
|
-
|
|
39
|
+
value?: any;
|
|
40
|
+
type?: "update" | "push" | "delete" | "unshift";
|
|
34
41
|
}) => void;
|
|
35
|
-
handleTableChange: (pagination: ProTablePaginationConfig, filters
|
|
36
|
-
|
|
42
|
+
handleTableChange: (pagination: ProTablePaginationConfig, filters?: Record<string, FilterValue | null>, sorter?: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
|
|
43
|
+
run: (info?: ProTableFetchParams) => Promise<void>;
|
|
37
44
|
};
|
|
38
45
|
export {};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
import type {
|
|
3
|
-
export declare function useLoading(
|
|
4
|
-
loading: Ref<
|
|
5
|
-
|
|
6
|
-
}):
|
|
7
|
-
getLoading: import("vue").ComputedRef<boolean>;
|
|
8
|
-
setLoading: (loading: boolean) => void;
|
|
9
|
-
};
|
|
2
|
+
import type { BaseTableProps } from '../props';
|
|
3
|
+
export declare function useLoading(options: {
|
|
4
|
+
loading: Ref<BaseTableProps['loading']>;
|
|
5
|
+
onChange: (value: BaseTableProps['loading']) => void;
|
|
6
|
+
}): [Ref<boolean>, (value: boolean) => void];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { Ref
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
props: ComputedRef<ProTableProps>;
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { PageItemRender } from '../types/SlotsTypings';
|
|
3
|
+
import type { PageState, ProTablePagination, ProTableProps } from '../types/TableTypings';
|
|
4
|
+
export declare function usePagination({ pagination, pageItemRender }: {
|
|
6
5
|
pagination: Ref<ProTableProps['pagination']>;
|
|
6
|
+
pageItemRender: PageItemRender;
|
|
7
7
|
}): {
|
|
8
|
-
|
|
8
|
+
paginationInfo: Ref<ProTablePagination | false>;
|
|
9
|
+
requestPagination: PageState;
|
|
9
10
|
setPagination: (info: Partial<ProTablePagination>) => void;
|
|
10
11
|
};
|
|
@@ -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
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { TableScroll } from '../types/TableTypings';
|
|
3
|
+
export declare function useScrollArea({ fitPage, hashId, scroll, baseClassName }: {
|
|
4
|
+
baseClassName: string;
|
|
5
|
+
hashId: Ref<string>;
|
|
6
|
+
scroll: ComputedRef<TableScroll>;
|
|
7
|
+
fitPage: Ref<boolean | undefined>;
|
|
8
|
+
}): {
|
|
9
|
+
barRef: Ref<any, any>;
|
|
10
|
+
tableCardEl: Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
11
|
+
tableScrollEl: Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
12
|
+
tableOverHidden: ComputedRef<boolean>;
|
|
13
|
+
tableScrollYHeight: ComputedRef<number>;
|
|
14
|
+
tableListToolsHeight: Ref<number, number>;
|
|
15
|
+
};
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,12 +1,58 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
2
|
+
import type { ComputedRef, MaybeRef, Reactive, Ref } from 'vue';
|
|
3
|
+
import type { BaseTableProps } from '../props';
|
|
4
|
+
import type { ProColumnsType, ProSearchMap } from '../types/ColumnTypings';
|
|
5
|
+
import type { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequestConfig, RequestFunction } from '../types/TableTypings';
|
|
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;
|
|
12
17
|
};
|
|
18
|
+
export type BaseTableState<T extends object = RecordType, R extends object = RecordType> = Omit<ProTableProps<T, R>, 'request'>;
|
|
19
|
+
export interface UseTableReturn<T extends object = RecordType, R extends object = RecordType> {
|
|
20
|
+
/** @name loading 状态,可以直接进行修改 */
|
|
21
|
+
loading: Ref<boolean>;
|
|
22
|
+
/** @name 只读表格数据,不能修改 */
|
|
23
|
+
dataSource: ComputedRef<T[]>;
|
|
24
|
+
/** @name 表格列选择keys,只读 */
|
|
25
|
+
selectedKeys: ProCoreActionType<T, R>['selectedKeys'];
|
|
26
|
+
/** @name 表格列选择rows,只读 */
|
|
27
|
+
selectedItems: ProCoreActionType<T, R>['selectedItems'];
|
|
28
|
+
/** @name 表格列选项操作 */
|
|
29
|
+
rowsSelection: ProCoreActionType<T, R>['rowsSelection'];
|
|
30
|
+
/** @name 表格请求参数 */
|
|
31
|
+
requestSearch: ComputedRef<RequestConfig<R>['params']>;
|
|
32
|
+
/** @name 主动刷新,按照当前的参数在当前页重新请求下 */
|
|
33
|
+
reload: ProCoreActionType<T, R>['reload'];
|
|
34
|
+
/** @name 更新表格数据,直接替换,谨慎操作 */
|
|
35
|
+
setTableDataList: ProCoreActionType<T, R>['setTableDataList'];
|
|
36
|
+
/** @name 更新TableData属性值 */
|
|
37
|
+
operateTableDataRow: ProCoreActionType<T, R>['operateTableDataRow'];
|
|
38
|
+
/** @name 设置翻页、排序、筛选、并且刷新(reload) */
|
|
39
|
+
setPageInfo: ProCoreActionType<T, R>['setPageInfo'];
|
|
40
|
+
/** @name 设置翻页 */
|
|
41
|
+
setPagination: ProCoreActionType<T, R>['setPagination'];
|
|
42
|
+
/** @name 刷新并清空表单,重置为第一页 */
|
|
43
|
+
reloadAndReset: ProCoreActionType<T, R>['reloadAndReset'];
|
|
44
|
+
/** @name 改变loading状态 */
|
|
45
|
+
setLoading: ProCoreActionType<T, R>['setLoading'];
|
|
46
|
+
/** @name action表格实例 */
|
|
47
|
+
actionRef: ComputedRef<ProCoreActionType<T, R>>;
|
|
48
|
+
/** @name form查询表单实例 */
|
|
49
|
+
formRef: ComputedRef<ProCoreFormType<R>>;
|
|
50
|
+
/** @name 表格参数,用于传递给ProTable组件使用,可以对其进行修改 */
|
|
51
|
+
tableState: Reactive<ProTableState<T, R>>;
|
|
52
|
+
/** @name 更新表格参数 SearchMap,key为SearchMap唯一字段,value是更新的参数,会merge */
|
|
53
|
+
updateSearchMap: (key: keyof R | keyof T, value: Partial<any>) => void;
|
|
54
|
+
}
|
|
55
|
+
export declare function useTable<T extends object = RecordType, R extends object = RecordType>(tableRef: Ref<ProTableRef<T> | undefined>, options?: {
|
|
56
|
+
state?: MaybeRef<BaseTableState<T, R>> | Reactive<BaseTableState<T, R>> | ComputedRef<BaseTableState<T, R>>;
|
|
57
|
+
request?: RequestFunction<T, R>;
|
|
58
|
+
}): UseTableReturn<T, R>;
|
|
@@ -1,16 +1,78 @@
|
|
|
1
|
-
import type { ComputedRef, Ref } from 'vue';
|
|
2
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
2
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
3
|
+
import type { ProFieldValueType, ProSearchMap } from '../types/ColumnTypings';
|
|
3
4
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function useTableForm({ search, searchMap, params, columns }: {
|
|
7
|
-
search: Ref<ProTableProps['search']>;
|
|
5
|
+
export declare function handleFormDefaultValue(data: ProSearchMap[]): RecordType;
|
|
6
|
+
export declare function useTableForm({ searchMap, columns }: {
|
|
8
7
|
searchMap: Ref<ProTableProps['searchMap']>;
|
|
9
|
-
params: Ref<ProTableProps['params']>;
|
|
10
8
|
columns: ComputedRef<ProTableProps['columns']>;
|
|
11
9
|
}): {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
formCols: Ref<{
|
|
11
|
+
name: string;
|
|
12
|
+
order?: number | undefined;
|
|
13
|
+
valueType?: ProFieldValueType | undefined;
|
|
14
|
+
valueFormat?: import("../types/ColumnTypings").ProFieldValueFormat | undefined;
|
|
15
|
+
placeholder?: string | string[] | undefined;
|
|
16
|
+
allowClear?: boolean | undefined;
|
|
17
|
+
showSearch?: boolean | undefined;
|
|
18
|
+
showToday?: boolean | undefined;
|
|
19
|
+
rangeStartName?: string | undefined;
|
|
20
|
+
rangeEndName?: string | undefined;
|
|
21
|
+
use12Hours?: boolean | undefined;
|
|
22
|
+
loading?: boolean | undefined;
|
|
23
|
+
showTime?: (RecordType | boolean) | undefined;
|
|
24
|
+
initialValue?: any;
|
|
25
|
+
valueKey?: string | undefined;
|
|
26
|
+
request?: {
|
|
27
|
+
fetch?: (() => Promise<import("../types/ColumnTypings").ProSchemaValueEnumType[]>) | undefined;
|
|
28
|
+
manual?: boolean | undefined;
|
|
29
|
+
debounceTime?: number | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
label?: string | undefined;
|
|
32
|
+
labelWidth?: string | number | undefined;
|
|
33
|
+
labelAlign?: "center" | "left" | "right" | undefined;
|
|
34
|
+
field?: {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
rules?: RegExp | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
valueEnum?: {
|
|
39
|
+
label: any;
|
|
40
|
+
value: any;
|
|
41
|
+
disabled?: boolean | undefined;
|
|
42
|
+
}[] | undefined;
|
|
43
|
+
}[], ProSearchMap<"text", string>[] | {
|
|
44
|
+
name: string;
|
|
45
|
+
order?: number | undefined;
|
|
46
|
+
valueType?: ProFieldValueType | undefined;
|
|
47
|
+
valueFormat?: import("../types/ColumnTypings").ProFieldValueFormat | undefined;
|
|
48
|
+
placeholder?: string | string[] | undefined;
|
|
49
|
+
allowClear?: boolean | undefined;
|
|
50
|
+
showSearch?: boolean | undefined;
|
|
51
|
+
showToday?: boolean | undefined;
|
|
52
|
+
rangeStartName?: string | undefined;
|
|
53
|
+
rangeEndName?: string | undefined;
|
|
54
|
+
use12Hours?: boolean | undefined;
|
|
55
|
+
loading?: boolean | undefined;
|
|
56
|
+
showTime?: (RecordType | boolean) | undefined;
|
|
57
|
+
initialValue?: any;
|
|
58
|
+
valueKey?: string | undefined;
|
|
59
|
+
request?: {
|
|
60
|
+
fetch?: (() => Promise<import("../types/ColumnTypings").ProSchemaValueEnumType[]>) | undefined;
|
|
61
|
+
manual?: boolean | undefined;
|
|
62
|
+
debounceTime?: number | undefined;
|
|
63
|
+
} | undefined;
|
|
64
|
+
label?: string | undefined;
|
|
65
|
+
labelWidth?: string | number | undefined;
|
|
66
|
+
labelAlign?: "center" | "left" | "right" | undefined;
|
|
67
|
+
field?: {
|
|
68
|
+
[x: string]: any;
|
|
69
|
+
rules?: RegExp | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
valueEnum?: {
|
|
72
|
+
label: any;
|
|
73
|
+
value: any;
|
|
74
|
+
disabled?: boolean | undefined;
|
|
75
|
+
}[] | undefined;
|
|
76
|
+
}[]>;
|
|
77
|
+
defaultFormSearch: Ref<RecordType, RecordType>;
|
|
16
78
|
};
|
|
@@ -1,28 +1,22 @@
|
|
|
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
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
import type { ProTableProps, TableScroll } from '../types/TableTypings';
|
|
5
|
+
interface ConfigScroll {
|
|
6
|
+
scroll: Ref<ProTableProps['scroll']>;
|
|
7
|
+
autoScroll: Ref<ProTableProps['autoScroll']>;
|
|
8
|
+
modalScroll: Ref<ProTableProps['modalScroll']>;
|
|
9
|
+
neverScroll: Ref<ProTableProps['neverScroll']>;
|
|
10
|
+
rowSelection: Ref<ProTableProps['rowSelection']>;
|
|
11
|
+
scrollBreakpoint: Ref<ProTableProps['scrollBreakpoint']>;
|
|
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
|
-
export declare function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
x?: string | number | true | undefined;
|
|
22
|
-
y?: string | number | undefined;
|
|
23
|
-
} & {
|
|
24
|
-
scrollToFirstRowOnChange?: boolean | undefined;
|
|
25
|
-
}) | undefined>;
|
|
26
|
-
breakpoint: ComputedRef<boolean>;
|
|
18
|
+
export declare function useTableScroll({ scroll, columns, autoScroll, modalScroll, neverScroll, rowSelection, screens, innerWidth, scrollBreakpoint }: useTableScrollType): {
|
|
19
|
+
proScroll: ComputedRef<TableScroll>;
|
|
20
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
27
21
|
};
|
|
28
22
|
export {};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
1
|
import type { SizeType } from '@gx-design-vue/pro-utils';
|
|
3
|
-
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
export declare function useTableSize(options: {
|
|
4
4
|
size: Ref<SizeType>;
|
|
5
|
-
|
|
6
|
-
}):
|
|
7
|
-
sizeRef: Ref<SizeType>;
|
|
8
|
-
setTableSize: (size: SizeType) => void;
|
|
9
|
-
};
|
|
5
|
+
onChange: (value: SizeType) => void;
|
|
6
|
+
}): [Ref<SizeType>, (value: SizeType) => void];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ProTable from './ProTable';
|
|
2
|
+
export * from './hooks/useTable';
|
|
2
3
|
export { proTableProps } from './props';
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
5
|
-
export type {
|
|
6
|
-
export type {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
4
|
+
export { ProTable as GProTable };
|
|
5
|
+
export type { BaseTableProps } from './props';
|
|
6
|
+
export type { ProColumnsType, ProColumnType, ProFieldValueType, ProSearchMap } from './types/ColumnTypings';
|
|
7
|
+
export type { CustomRenderResult, ProTableBodyCellProps } from './types/SlotsTypings';
|
|
8
|
+
export type { PageState, ProTableProps, RequestConfig } from './types/TableTypings';
|
|
9
|
+
export type { FormConfig, OptionConfig, ProCoreActionType, ProCoreFormType, ProTableFetchParams, ProTableRef, RequestFunction } from './types/TableTypings';
|