From d16babefbe63151035e5cb6a99152f7f1bcdf949 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Wed, 15 May 2024 13:21:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BF=BB=E9=A1=B5=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=A0=8F=E5=88=87=E9=A1=B5=E6=8C=89=E9=92=AE=E5=8F=AA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=89=8D=E5=87=A0=E9=A1=B5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/renderer/components/material/Pagination.vue | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index ff0a96a5..c3920c4c 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -20,6 +20,7 @@ - 修复与优化繁体中文、英语翻译显示(#1845) - 修复歌曲时文件名过长导致歌曲无法下载的问题(#1877) - 修复文本提示气泡在内容过长时,文本未被换行而被截断的问题 +- 修复翻页按钮栏切页按钮只显示前几页的问题 ### 变更 diff --git a/src/renderer/components/material/Pagination.vue b/src/renderer/components/material/Pagination.vue index b33a87de..8c25f5b0 100644 --- a/src/renderer/components/material/Pagination.vue +++ b/src/renderer/components/material/Pagination.vue @@ -81,12 +81,12 @@ export default { return Math.floor(props.btnLength / 2) }) const pages = computed(() => { - if (maxPage <= props.btnLength) return Array.from({ length: maxPage }, (_, i) => i + 1) - let start = props.page - pageEvg > 1 + if (maxPage.value <= props.btnLength) return Array.from({ length: maxPage.value }, (_, i) => i + 1) + let start = props.page - pageEvg.value > 1 // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - ? maxPage - props.page < pageEvg + 1 - ? maxPage - (props.btnLength - 1) - : props.page - pageEvg + ? maxPage.value - props.page < pageEvg.value + 1 + ? maxPage.value - (props.btnLength - 1) + : props.page - pageEvg.value : 1 return Array.from({ length: props.btnLength }, (_, i) => start + i) })