This commit is contained in:
zhangkai
2024-06-13 15:11:41 +08:00
parent 2734110636
commit fb39b66431
78 changed files with 2868 additions and 2800 deletions

View File

@@ -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);