修复小问题

pull/237/head
zhangdaiscott 2022-11-07 19:05:54 +08:00
parent 6a28a0fa58
commit 155b817346
1 changed files with 9 additions and 0 deletions

View File

@ -61,9 +61,15 @@ export function useTable(tableProps?: Props): [
}
return table as TableActionType;
}
function getTableRef(){
return tableRef;
}
const methods: TableActionType & {
getForm: () => FormActionType;
} & {
getTableRef: () => any;
} = {
reload: async (opt?: FetchParams) => {
return await getTableInstance().reload(opt);
@ -153,6 +159,9 @@ export function useTable(tableProps?: Props): [
collapseAll: () => {
getTableInstance().collapseAll();
},
getTableRef: () => {
return getTableRef();
}
};
return [register, methods];