修复分页问题

This commit is contained in:
YeMingfei666 2024-10-11 14:09:29 +08:00
parent 0430e560e7
commit 6ef7ce8d89
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@
let currentPage = ref(props.page === 0 ? 1 : props.page)
function returnMaxPage() {
return Math.ceil(props.totalElements / props.size)
const result=Math.ceil(props.totalElements / props.size)
return (result-1<=0?1:result-1)
}
let maxPage=ref(returnMaxPage())
const pagesData = computed(() => {