type tableAction<T> = {
getTableData: () => T;
//SupplierTable返回的form里的搜索条件对象
type formObjectState = {
code: string;
grade: string;
name: string;
productType: string;
region: string;
status: string;
type: string;
const tableRef = useRef<tableAction<formObjectState>>(null);
<a href="#" onClick={() => {
let temp = tableRef?.current?.getTableData();
console.log('====添加', temp);
setFormObject(temp);