From 94312a44445c7040e06ad99826b1a05645dceecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=95?= Date: Wed, 4 Apr 2018 19:26:38 +0800 Subject: [PATCH] Pagination: fix current-change not fire after currentPage manually updated (#10562) --- packages/pagination/src/pagination.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/pagination/src/pagination.js b/packages/pagination/src/pagination.js index cc4474c24..5e359183a 100644 --- a/packages/pagination/src/pagination.js +++ b/packages/pagination/src/pagination.js @@ -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; } }); }