Skip to content

Commit

Permalink
perf: v-model editable-row示例
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Jun 29, 2023
1 parent fa25d08 commit 0304d51
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/fast-crud/src/use/use-expose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,16 @@ export function useExpose(props: UseExposeProps): UseExposeRet {
}
const { currentPage = page[ui.pagination.currentPage], pageSize = page.pageSize, total } = pageRes;
const { records } = pageRes;
if (records == null || total == null || currentPage == null || pageSize == null) {
if (
records == null ||
total == null ||
currentPage == null ||
currentPage <= 0 ||
pageSize == null ||
pageSize <= 0
) {
logger.error(
"pageRequest返回结构不正确,请配置正确的request.transformRes,期望:{currentPage, pageSize, total, records:[]},实际返回:",
"pageRequest返回结构不正确,请配置正确的request.transformRes,期望:{currentPage>0, pageSize>0, total, records:[]},实际返回:",
pageRes
);
return;
Expand Down

0 comments on commit 0304d51

Please sign in to comment.