Commit 1b78c324 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

fix: 修改TableLayout 组件data 返回 null 页数不变的问题

parent d8101384
......@@ -74,7 +74,11 @@ const Table: React.FC<Iprops> = (props: any) => {
return new Promise((resolve, reject) => {
if (!Array.isArray(fetch)) {
fetch({ ...params }).then(res => {
resolve(res.data)
const data = {
totalCount: res.data.totalCount,
data: res.data.data || []
}
resolve(data)
}).catch(error => {
console.warn(error)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment