Merge pull request #17 from Chika99/fix/table

fix(table): 修复表格分页计算问题
This commit is contained in:
Ah jung
2021-08-02 09:06:43 +08:00
committed by GitHub

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