@gx-design-vue/pro-table 0.0.3 → 0.0.4-rc.1

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.
@@ -1,9 +1,9 @@
1
- import type { ComputedRef } from 'vue';
2
- import type { SpinProps } from '../_utils';
1
+ import type { ComputedRef, Ref } from 'vue';
2
+ import type { SpinProps, TableSorter } from '../_utils';
3
3
  import type { ProTableProps } from '../ProTable';
4
4
  import type { RecordType } from '../typing';
5
- import type { ProTablePagination, ProTablePaginationConfig } from '../types/table';
6
- import type { ProColumns } from '../types/column';
5
+ import type { ProTablePagination, ProTabelFeachParams, ProTablePaginationConfig } from '../types/TableTypings';
6
+ import type { ProColumns } from '../types/ColumnTypings';
7
7
  interface ActionType {
8
8
  getLoading: ComputedRef<boolean | SpinProps | undefined>;
9
9
  getPaginationInfo: ComputedRef<ProTablePagination>;
@@ -20,12 +20,12 @@ export declare type ConfigFetchData = {
20
20
  polling: ComputedRef<ProTableProps['polling']>;
21
21
  request: ComputedRef<ProTableProps['request']>;
22
22
  postData: ComputedRef<ProTableProps['postData']>;
23
- waitRequest: ComputedRef<ProTableProps['waitRequest']>;
23
+ waitRequest: Ref<ProTableProps['waitRequest']>;
24
24
  debounceTime: ComputedRef<ProTableProps['debounceTime']>;
25
25
  dataSource: ComputedRef<ProTableProps['dataSource']>;
26
26
  };
27
- export declare function useConfigFetchData(props: ProTableProps): ConfigFetchData;
28
- export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime, }: ConfigFetchData, { columns, getLoading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit }: ActionType, emit: any): {
27
+ export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
28
+ export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns, getLoading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit }: ActionType, emit: any): {
29
29
  getDataSourceRef: ComputedRef<RecordType[]>;
30
30
  isTreeDataRef: ComputedRef<boolean>;
31
31
  reSetDataList: (list: RecordType[]) => void;
@@ -33,7 +33,7 @@ export declare function useFetchData({ polling, request, postData, dataSource, w
33
33
  key?: string | undefined;
34
34
  params: RecordType;
35
35
  }) => void;
36
- handleTableChange: (pagination: ProTablePaginationConfig, filters: any, sorter: any) => void;
37
- reload: (info?: any) => Promise<void>;
36
+ handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, any[] | null>, sorter: TableSorter) => void;
37
+ reload: (info?: ProTabelFeachParams) => Promise<void>;
38
38
  };
39
39
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { Ref, Slots, ComputedRef } from 'vue';
2
2
  import type { ProTableProps } from '../ProTable';
3
- import type { ProTablePagination } from '../types/table';
3
+ import type { ProTablePagination } from '../types/TableTypings';
4
4
  export declare function usePagination({ slots, props, pagination }: {
5
5
  slots: Slots;
6
6
  props: ComputedRef<ProTableProps>;
@@ -1,15 +1,16 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
2
  import type { RecordType } from '../typing';
3
3
  import type { ProTableProps } from '../ProTable';
4
- import type { SearchConfig } from '../types/table';
5
- import type { ProSearchMap } from '../types/column';
4
+ import type { SearchConfig } from '../types/TableTypings';
5
+ import type { ProSearchMap } from '../types/ColumnTypings';
6
+ export declare function handleFormDefaultValue(data: ProSearchMap[]): any;
6
7
  export declare function useTableForm({ search, searchMap, params, columns }: {
7
8
  search: Ref<SearchConfig>;
8
9
  searchMap: Ref<ProSearchMap[]>;
9
10
  params: Ref<ProTableProps['params']>;
10
11
  columns: ComputedRef<ProTableProps['columns']>;
11
12
  }): {
12
- formDataRef: Ref<ProSearchMap<"text", "date">[]>;
13
+ formDataRef: Ref<ProSearchMap<"text">[]>;
13
14
  formParamsRef: RecordType;
14
15
  defaultParamsRef: RecordType;
15
16
  setFormParams: (params: any) => void;
@@ -1,7 +1,7 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
2
  import type { Breakpoint } from '../typing';
3
3
  import type { ProTableProps } from '../ProTable';
4
- import type { ProColumns } from '../types/column';
4
+ import type { ProColumns } from '../types/ColumnTypings';
5
5
  declare type ConfigScroll = {
6
6
  scroll: ComputedRef<ProTableProps['scroll']>;
7
7
  autoScroll: ComputedRef<ProTableProps['autoScroll']>;
package/dist/index.d.ts CHANGED
@@ -2,11 +2,11 @@ import './design/config.less';
2
2
  import './design/ant-design-theme.less';
3
3
  import './design/ant-design-vue.less';
4
4
  import './style/table.less';
5
- import './pro-table.less';
5
+ import './proTable.less';
6
6
  import './style.less';
7
7
  export { proTableProps } from './props';
8
8
  export { default } from './ProTable';
9
9
  export type { ProTableProps } from './ProTable';
10
- export type { RequsetFunction, ProCoreActionTypeConfig, ProTabelFeachParams } from './types/table';
11
- export type { ProColumn, ProColumns } from './types/column';
12
- export { default as ProTable } from './ProTable';
10
+ export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType } from './types/TableTypings';
11
+ export type { ProColumn, ProColumns, ProSearchMap } from './types/ColumnTypings';
12
+ export { default as GProTable } from './ProTable';