chore: update

This commit is contained in:
就眠儀式
2022-03-17 17:10:51 +08:00
parent 4d0e68448c
commit 1ead396b51
3 changed files with 51 additions and 23 deletions

View File

@@ -56,7 +56,12 @@ const maxPage = ref(0);
const totalPage = computed(() => {
maxPage.value = Math.ceil(props.total / props.limit);
let r: number[] = [],
start = maxPage.value <= props.pages ? 1 : currentPage.value > pages ? currentPage.value - pages : 1;
start =
maxPage.value <= props.pages
? 1
: currentPage.value > pages
? currentPage.value - pages
: 1;
for (let i = start; ; i++) {
if (r.length >= props.pages || i > maxPage.value) {
break;