@gx-design-vue/pro-table 0.2.0-beta.65 → 0.2.0-beta.67

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.
@@ -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: import("ant-design-vue/es/vc-table/interface").AlignType | undefined;
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<ProColumnType<import("../typing").DefaultRecordType, Record<string, any>>[]>;
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: (w: number, col: ProColumnType) => void;
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
- loadingStatus: ComputedRef<boolean | undefined>;
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, loadingStatus, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
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
- loadingStatus: import("vue").ComputedRef<boolean>;
8
- setLoading: (loading: boolean) => void;
7
+ loadingComputed: import("vue").ComputedRef<boolean | undefined>;
8
+ loading: Ref<boolean | undefined, boolean | undefined>;
9
+ setLoading: (value: boolean) => void;
9
10
  };
@@ -9,4 +9,5 @@ export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, ro
9
9
  removeRowKeys: (keyList: (string | number)[]) => void;
10
10
  changeRowKey: () => void;
11
11
  syncSelectedRows: (dataList: any[]) => void;
12
+ clearAllRowKeys: () => void;
12
13
  };
@@ -1,15 +1,18 @@
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'>;
7
7
  request?: RequsetFunction<T, R>;
8
8
  }): {
9
9
  dataSource: ComputedRef<T[]>;
10
- selectedItem: ComputedRef<T[]>;
11
- selectedKey: ComputedRef<ProCoreActionType<T, R>['selectedKey']>;
12
- loading: ComputedRef<boolean>;
10
+ rowsSelection: () => {
11
+ keys: (string | number)[];
12
+ items: T[];
13
+ clear: () => void;
14
+ };
15
+ loading: Ref<boolean>;
13
16
  requestParams: ComputedRef<RequsetConfig<R>['params']>;
14
17
  reload: ProCoreActionType<T, R>['reload'];
15
18
  mutate: ProCoreActionType<T, R>['reSetDataList'];
@@ -20,9 +23,10 @@ export declare function useTable<T extends object = Record<string, any>, R exten
20
23
  setLoading: ProCoreActionType<T, R>['setLoading'];
21
24
  actionRef: ComputedRef<Partial<ProCoreActionType<T, R>>>;
22
25
  formRef: ComputedRef<ProCoreFormType<R>>;
23
- tableState: Omit<BaseTableProps, 'params' | 'dataSource' | 'searchMap'> & {
26
+ tableState: Omit<BaseTableProps, 'params' | 'dataSource' | 'searchMap' | 'rowSelection'> & {
24
27
  params: R;
25
28
  dataSource: T[];
29
+ rowSelection: ProTableRowSelection<T>;
26
30
  searchMap: ProSearchMap<undefined, keyof R>[];
27
31
  };
28
32
  };