!28 fix(table): 修复分页数据处理逻辑

Merge pull request !28 from 唐振超/dev
This commit is contained in:
马铃薯头
2025-12-07 10:05:30 +00:00
committed by Gitee
+4 -2
View File
@@ -131,7 +131,9 @@ export function useNaivePaginatedTable<ResponseData, ApiData>(
getColumns,
onFetched: data => {
pagination.itemCount = data.total;
pagination.pageSize = data.pageSize;
if (data.pageSize) {
pagination.pageSize = data.pageSize;
}
}
});
@@ -252,7 +254,7 @@ export function defaultTransform<ApiData>(
};
}
const { rows: records, pageSize: current, pageNum: size, total } = data;
const { rows: records, pageSize: size, pageNum: current, total } = data;
return {
data: records,