From 6ef7ce8d899785a4e02f9aec3346333e4f9c34c7 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 11 Oct 2024 14:09:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E9=A1=B5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-pagination.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/my-components/my-pagination.vue b/components/my-components/my-pagination.vue index 74d67eb..549e89e 100644 --- a/components/my-components/my-pagination.vue +++ b/components/my-components/my-pagination.vue @@ -57,7 +57,8 @@ let currentPage = ref(props.page === 0 ? 1 : props.page) function returnMaxPage() { - return Math.ceil(props.totalElements / props.size) + const result=Math.ceil(props.totalElements / props.size) + return (result-1<=0?1:result-1) } let maxPage=ref(returnMaxPage()) const pagesData = computed(() => {