1
This commit is contained in:
@@ -76,6 +76,7 @@ export function useTable<T extends object>(param, apiFun) {
|
||||
apiFun({ ...page, ...paramRef.current }).then(res => {
|
||||
if (requestId !== requestIdRef.current) return
|
||||
if (!("total" in res)) return console.error('该接口不支持分页,无法正常使用 useTable')
|
||||
// res.data.unshift({type:0})
|
||||
setData(res.data);
|
||||
setTotal(res.total);
|
||||
setLoading(false);
|
||||
|
||||
Reference in New Issue
Block a user