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) })