Appearance
formatTableData
▸ formatTableData(response): Partial<RequestData<Record<string, any>>>
在使用 ProTable 渲染表格时,可以直接将 io.xx.find 返回的数据格式化为 ProTable 支持的数据结构
参数
| Name | Type |
|---|---|
response | AxiosResponse<FindRecordResponse, any> |
返回值
Partial<RequestData<Record<string, any>>>
示例
ts
const getTableDataSource = formData => {
return io.admin
.find(formData)
.then(formatTableData)
}
<Table request={getTableDataSource} />