修复小问题

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

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