fix pagination issue

This commit is contained in:
liangping 2023-08-24 14:39:19 +08:00
parent b64ada1c95
commit d7fd252afa

View File

@ -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