From d7fd252afab2e90025d2a5832f0e8b5e3a08ef78 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Thu, 24 Aug 2023 14:39:19 +0800 Subject: [PATCH] fix pagination issue --- src/components/PaginationBar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PaginationBar.vue b/src/components/PaginationBar.vue index 1b5d28f9..28247b06 100644 --- a/src/components/PaginationBar.vue +++ b/src/components/PaginationBar.vue @@ -14,8 +14,8 @@ const pages = computed(() => { if (total > 0 && props.limit && total > props.limit) { let page = 0 while (true) { + if (page * props.limit >= total) break page += 1 - if (page * props.limit > total) break if (total / props.limit > 10 && page > showSize && page < (total / props.limit - showSize + 1)) { if (!(page >= current.value - 1 && page <= current.value + 1)) { continue