Commit 94312a44 authored by 杨奕's avatar 杨奕 Committed by GitHub

Pagination: fix current-change not fire after currentPage manually updated (#10562)

parent af0c8991
......@@ -299,6 +299,7 @@ export default {
methods: {
handleCurrentChange(val) {
this.internalCurrentPage = this.getValidCurrentPage(val);
this.userChangePageSize = true;
this.emitChange();
},
......@@ -343,9 +344,10 @@ export default {
emitChange() {
this.$nextTick(() => {
if (this.internalCurrentPage !== this.lastEmittedPage) {
if (this.internalCurrentPage !== this.lastEmittedPage || this.userChangePageSize) {
this.$emit('current-change', this.internalCurrentPage);
this.lastEmittedPage = this.internalCurrentPage;
this.userChangePageSize = false;
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment