@gx-design-vue/pro-table 0.2.0-beta.53 → 0.2.0-beta.55
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 +7 -7
- package/dist/_utils/ant-design-vue/table/typings.d.ts +1 -1
- package/dist/hooks/useFetchData.d.ts +5 -5
- package/dist/hooks/useTable.d.ts +19 -12
- package/dist/index.d.ts +3 -2
- package/dist/pro-table.js +1116 -1093
- package/dist/pro-table.umd.cjs +1 -1
- package/dist/props.d.ts +2 -1
- package/dist/types/ColumnTypings.d.ts +1 -1
- package/dist/types/SlotsTypings.d.ts +25 -1
- package/dist/types/TableTypings.d.ts +22 -21
- package/package.json +3 -3
package/dist/ProTable.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { CSSProperties, SlotsType } from 'vue';
|
|
|
2
2
|
import type { FilterValue, Key, SorterResult, SpinProps, TableCurrentDataSource } from './_utils';
|
|
3
3
|
import type { OptionConfig, ProTableProps, SearchConfig } from './types/TableTypings';
|
|
4
4
|
import type { ProColumnsType } from './types/ColumnTypings';
|
|
5
|
-
import
|
|
6
|
-
declare const
|
|
5
|
+
import { AntTabelSlotsType, DefaultRender } from './types/SlotsTypings';
|
|
6
|
+
declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
7
|
rowSelection: {
|
|
8
8
|
type: import("vue").PropType<import("./types/TableTypings").ProTableRowSelection>;
|
|
9
9
|
default: undefined;
|
|
@@ -596,7 +596,8 @@ declare const GProTable: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
596
596
|
optionsExtra: DefaultRender;
|
|
597
597
|
pageItemRender: import("./types/SlotsTypings").PageItemRender | undefined;
|
|
598
598
|
customRender: import("./types/SlotsTypings").CustomDataRender | undefined;
|
|
599
|
-
columns: ProColumnsType<any
|
|
599
|
+
columns: ProColumnsType<Record<string, any>> | undefined;
|
|
600
|
+
dataSource: any[] | undefined;
|
|
600
601
|
scroll: {
|
|
601
602
|
x?: number | true | string;
|
|
602
603
|
y?: number | string;
|
|
@@ -634,7 +635,6 @@ declare const GProTable: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
634
635
|
sticky: boolean | import("ant-design-vue/es/vc-table/interface").TableSticky | undefined;
|
|
635
636
|
transformCellText: import("ant-design-vue/es/vc-table/interface").TransformCellText<any> | undefined;
|
|
636
637
|
dropdownPrefixCls: string;
|
|
637
|
-
dataSource: any[] | undefined;
|
|
638
638
|
pagination: ((false | import("ant-design-vue").TablePaginationConfig) & import("./types/TableTypings").ProTablePagination) | undefined;
|
|
639
639
|
loading: boolean | Partial<import("vue").ExtractPropTypes<{
|
|
640
640
|
prefixCls: StringConstructor;
|
|
@@ -727,7 +727,7 @@ declare const GProTable: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
727
727
|
options: boolean | OptionConfig | undefined;
|
|
728
728
|
waitRequest: boolean | undefined;
|
|
729
729
|
debounceTime: number | undefined;
|
|
730
|
-
request: import("./types/TableTypings").RequsetFunction<any,
|
|
730
|
+
request: import("./types/TableTypings").RequsetFunction<Record<string, any>, Record<string, any>> | undefined;
|
|
731
731
|
searchMap: import("./types/ColumnTypings").ProSearchMap[] | undefined;
|
|
732
732
|
'onUpdate:expandedRowKeys': ((expandedKeys: Key[]) => void) | undefined;
|
|
733
733
|
}, SlotsType<{
|
|
@@ -740,5 +740,5 @@ declare const GProTable: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
740
740
|
default(): void;
|
|
741
741
|
pageItemRender(): void;
|
|
742
742
|
customRender(currenData: any[], dataSource: any[]): void;
|
|
743
|
-
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
744
|
-
export default
|
|
743
|
+
} & AntTabelSlotsType>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
744
|
+
export default ProTable;
|
|
@@ -3,7 +3,7 @@ import type { ColumnsType, FilterValue, GetPopupContainer, SortOrder, SorterResu
|
|
|
3
3
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
4
|
import type { TableProps as RcTableProps } from 'ant-design-vue/es/vc-table/Table';
|
|
5
5
|
export type { TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
|
|
6
|
-
export type { Key } from 'ant-design-vue/es/vc-table/interface';
|
|
6
|
+
export type { Key, RenderExpandIconProps } from 'ant-design-vue/es/vc-table/interface';
|
|
7
7
|
export type TableFilters = Record<string, FilterValue | null>;
|
|
8
8
|
export type TableSorterRecord = SorterResult<RecordType>;
|
|
9
9
|
export type TableSorter = TableSorterRecord | TableSorterRecord[];
|
|
@@ -18,8 +18,8 @@ interface ActionType {
|
|
|
18
18
|
}
|
|
19
19
|
export type ConfigFetchData = {
|
|
20
20
|
polling: ComputedRef<ProTableProps['polling']>;
|
|
21
|
-
request:
|
|
22
|
-
postData:
|
|
21
|
+
request: ProTableProps['request'];
|
|
22
|
+
postData: ProTableProps['postData'];
|
|
23
23
|
waitRequest: Ref<ProTableProps['waitRequest']>;
|
|
24
24
|
debounceTime: ComputedRef<ProTableProps['debounceTime']>;
|
|
25
25
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
@@ -29,10 +29,10 @@ export declare function useFetchData({ polling, request, postData, dataSource, w
|
|
|
29
29
|
getDataSourceRef: ComputedRef<RecordType[]>;
|
|
30
30
|
isTreeDataRef: ComputedRef<boolean>;
|
|
31
31
|
reSetDataList: (list: RecordType[]) => void;
|
|
32
|
-
changeDataValue: ({ key, params, type }: {
|
|
33
|
-
key?:
|
|
32
|
+
changeDataValue: <T = RecordType>({ key, params, type }: {
|
|
33
|
+
key?: keyof T;
|
|
34
34
|
params: RecordType;
|
|
35
|
-
type?: "update" | "
|
|
35
|
+
type?: "update" | "push" | "delete" | "unshift";
|
|
36
36
|
}) => void;
|
|
37
37
|
handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
|
|
38
38
|
reload: (info?: ProTabelFeachParams) => Promise<void>;
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type { ProCoreActionType, ProCoreFormType, ProTableRef } from '../types/TableTypings';
|
|
3
|
-
|
|
2
|
+
import type { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, RequsetFunction } from '../types/TableTypings';
|
|
3
|
+
import type { BaseTableProps } from '../props';
|
|
4
|
+
export declare function useTable<T extends object = Record<string, any>, R extends object = Record<string, any>>(tableRef: Ref<ProTableRef | undefined>, options?: {
|
|
5
|
+
defaultValue: Omit<ProTableProps<T, R>, 'request'>;
|
|
6
|
+
request?: RequsetFunction<T, R>;
|
|
7
|
+
}): {
|
|
4
8
|
dataSource: ComputedRef<T[]>;
|
|
5
9
|
selectedItem: ComputedRef<T[]>;
|
|
6
|
-
selectedKey: ComputedRef<ProCoreActionType['selectedKey']>;
|
|
7
|
-
loading: ComputedRef<boolean
|
|
8
|
-
params: ComputedRef<
|
|
9
|
-
reload: ProCoreActionType['reload'];
|
|
10
|
-
mutate: ProCoreActionType['reSetDataList'];
|
|
11
|
-
setPageAndReload: ProCoreActionType['setPageAndReload'];
|
|
12
|
-
|
|
13
|
-
setPagination: ProCoreActionType['setPagination'];
|
|
14
|
-
|
|
15
|
-
actionRef: ComputedRef<ProCoreActionType
|
|
10
|
+
selectedKey: ComputedRef<ProCoreActionType<T, R>['selectedKey']>;
|
|
11
|
+
loading: ComputedRef<boolean>;
|
|
12
|
+
params: ComputedRef<R>;
|
|
13
|
+
reload: ProCoreActionType<T, R>['reload'];
|
|
14
|
+
mutate: ProCoreActionType<T, R>['reSetDataList'];
|
|
15
|
+
setPageAndReload: ProCoreActionType<T, R>['setPageAndReload'];
|
|
16
|
+
setData: ProCoreActionType<T, R>['changeDataValue'];
|
|
17
|
+
setPagination: ProCoreActionType<T, R>['setPagination'];
|
|
18
|
+
setLoading: ProCoreActionType<T, R>['loadingOperation'];
|
|
19
|
+
actionRef: ComputedRef<Partial<ProCoreActionType<T, R>>>;
|
|
16
20
|
formRef: ComputedRef<ProCoreFormType>;
|
|
21
|
+
tableState: Omit<BaseTableProps, 'params'> & {
|
|
22
|
+
params: R;
|
|
23
|
+
};
|
|
17
24
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useTable } from './hooks/useTable';
|
|
2
|
+
export type { BaseTableProps } from './props';
|
|
3
|
+
export type { ProTableProps } from './types/TableTypings';
|
|
4
|
+
export type { ProColumnType, ProColumnsType, ProSearchMap } from './types/ColumnTypings';
|
|
2
5
|
export { proTableProps } from './props';
|
|
3
6
|
export { default } from './ProTable';
|
|
4
|
-
export type { ProTableProps } from './types/TableTypings';
|
|
5
7
|
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType, OptionConfig, SearchConfig } from './types/TableTypings';
|
|
6
|
-
export type { ProColumnType, ProColumnsType, ProSearchMap } from './types/ColumnTypings';
|
|
7
8
|
export { useTable };
|
|
8
9
|
export { default as GProTable } from './ProTable';
|