未验证 提交 929141be 编写于 作者: L lqxlearn 提交者: GitHub

fix:fetch-success total 0 (#1597)

Co-authored-by: Nqiuxiang <liumeiwang@localhost.com>
上级 e82bafa4
......@@ -292,7 +292,7 @@ export function useDataSource(
const isArrayResult = Array.isArray(res);
let resultItems: Recordable[] = isArrayResult ? res : get(res, listField);
const resultTotal: number = isArrayResult ? 0 : get(res, totalField);
const resultTotal: number = isArrayResult ? res.length : get(res, totalField);
// 假如数据变少,导致总页数变少并小于当前选中页码,通过getPaginationRef获取到的页码是不正确的,需获取正确的页码再次执行
if (resultTotal) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册