Merge pull request #745 from QingWei-Li/feat/pagination

Pagination: emit 'current-page' when sizes change, closed #729
pull/754/head
SkyAo 2016-10-31 16:43:30 +08:00 committed by GitHub
commit 5a02fdd57e
1 changed files with 2 additions and 0 deletions

View File

@ -309,8 +309,10 @@ export default {
/* istanbul ignore if */
if (newVal > 0 && this.internalCurrentPage === 0) {
this.internalCurrentPage = 1;
this.$emit('current-change', 1);
} else if (this.internalCurrentPage > newVal) {
this.internalCurrentPage = newVal;
this.$emit('current-change', newVal);
}
},