修复翻页按钮栏切页按钮只显示前几页的问题
parent
4ac6768b7a
commit
d16babefbe
|
@ -20,6 +20,7 @@
|
|||
- 修复与优化繁体中文、英语翻译显示(#1845)
|
||||
- 修复歌曲时文件名过长导致歌曲无法下载的问题(#1877)
|
||||
- 修复文本提示气泡在内容过长时,文本未被换行而被截断的问题
|
||||
- 修复翻页按钮栏切页按钮只显示前几页的问题
|
||||
|
||||
### 变更
|
||||
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue