Merge pull request #4460 from xg-qd/2.0
解决分页器选择大于1的页数时,修改数据数量为空时,分页器当前页数不变的问题
This commit is contained in:
commit
38a33d4368
1 changed files with 2 additions and 2 deletions
|
@ -156,8 +156,8 @@
|
||||||
watch: {
|
watch: {
|
||||||
total (val) {
|
total (val) {
|
||||||
let maxPage = Math.ceil(val / this.currentPageSize);
|
let maxPage = Math.ceil(val / this.currentPageSize);
|
||||||
if (maxPage < this.currentPage && maxPage > 0) {
|
if (maxPage < this.currentPage ) {
|
||||||
this.currentPage = maxPage;
|
this.currentPage = (maxPage === 0 ? 1 : maxPage);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
current (val) {
|
current (val) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue