Explorar o código

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

qingwei.li %!s(int64=8) %!d(string=hai) anos
pai
achega
a81cea32c7
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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);
       }
     },