فهرست منبع

Pagination: emit 'current-page' when sizes change, closed #729

qingwei.li 8 سال پیش
والد
کامیت
a81cea32c7
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      packages/pagination/src/pagination.js

+ 2 - 0
packages/pagination/src/pagination.js

@@ -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);
       }
     },