From 85c5f0c8c4607910a5d4eba7eeed7a54695c47dd Mon Sep 17 00:00:00 2001 From: webfansplz <308241863@qq.com> Date: Tue, 19 Jul 2022 01:06:16 +0800 Subject: [PATCH] fix(useOffsetPagination): incorrectly `currentPageSize` value (#1949) --- packages/core/useOffsetPagination/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/useOffsetPagination/index.ts b/packages/core/useOffsetPagination/index.ts index 0ba6060a435..91ed045884f 100644 --- a/packages/core/useOffsetPagination/index.ts +++ b/packages/core/useOffsetPagination/index.ts @@ -62,7 +62,7 @@ export function useOffsetPagination(options: UseOffsetPaginationOptions): UseOff onPageCountChange = noop, } = options - const currentPageSize = computed(() => Math.min(unref(pageSize), 1)) + const currentPageSize = useClamp(pageSize, 1, Infinity) const pageCount = computed(() => Math.ceil((unref(total)) / unref(currentPageSize)))