Merge pull request #1562 from rijn/1543

Fix #1543
This commit is contained in:
Aresn 2017-08-09 11:42:43 +08:00 committed by GitHub
commit 0da09e9a8c
2 changed files with 20 additions and 2 deletions

View file

@ -135,6 +135,12 @@
};
},
watch: {
total (val) {
let maxPage = Math.ceil(val / this.currentPageSize);
if (maxPage < this.currentPage && maxPage > 0) {
this.currentPage = maxPage;
}
},
current (val) {
this.currentPage = val;
},