修正分页more计算
This commit is contained in:
parent
e686d60bb4
commit
46e9a205c3
|
|
@ -1025,8 +1025,11 @@ class ListNode extends EntityNode {
|
|||
}
|
||||
if (typeof total === 'number') {
|
||||
this.pagination.total = total;
|
||||
if (typeof getTotal === 'number' && this.pagination.more && total < getTotal) {
|
||||
const pages = Math.floor((total - 1) / this.pagination.pageSize) + 1;
|
||||
}
|
||||
if (typeof getTotal === 'number') {
|
||||
const total2 = this.pagination.total || 0;
|
||||
if (this.pagination.more && total2 < getTotal) {
|
||||
const pages = Math.floor((total2 - 1) / this.pagination.pageSize) + 1;
|
||||
this.pagination.more = this.pagination.currentPage + 1 < pages;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1028,8 +1028,11 @@ class ListNode extends EntityNode {
|
|||
}
|
||||
if (typeof total === 'number') {
|
||||
this.pagination.total = total;
|
||||
if (typeof getTotal === 'number' && this.pagination.more && total < getTotal) {
|
||||
const pages = Math.floor((total - 1) / this.pagination.pageSize) + 1;
|
||||
}
|
||||
if (typeof getTotal === 'number') {
|
||||
const total2 = this.pagination.total || 0;
|
||||
if (this.pagination.more && total2 < getTotal) {
|
||||
const pages = Math.floor((total2 - 1) / this.pagination.pageSize) + 1;
|
||||
this.pagination.more = this.pagination.currentPage + 1 < pages;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1268,10 +1268,12 @@ class ListNode<
|
|||
}
|
||||
if (typeof total === 'number') {
|
||||
this.pagination.total = total;
|
||||
|
||||
if (typeof getTotal === 'number' && this.pagination.more && total < getTotal) {
|
||||
const pages = Math.floor((total - 1) / this.pagination.pageSize) + 1;
|
||||
this.pagination.more = this.pagination.currentPage + 1 < pages
|
||||
}
|
||||
if (typeof getTotal === 'number') {
|
||||
const total2 = this.pagination.total || 0;
|
||||
if (this.pagination.more && total2 < getTotal) {
|
||||
const pages = Math.floor((total2 - 1) / this.pagination.pageSize) + 1;
|
||||
this.pagination.more = this.pagination.currentPage + 1 < pages;
|
||||
}
|
||||
}
|
||||
if (append) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue