fix(table): 修复表格分页计算问题

This commit is contained in:
chika
2021-08-01 23:07:37 +08:00
parent 58f0997fb6
commit 6a290b314a

View File

@@ -74,10 +74,9 @@ export function useDataSource(
// 如果数据异常,需获取正确的页码再次执行
if (resultTotal) {
const currentTotalPage = Math.ceil(resultTotal / pageSize);
if (page > currentTotalPage) {
if (page > resultTotal) {
setPagination({
[pageField]: currentTotalPage,
[pageField]: resultTotal,
});
fetch(opt);
}