ソースを参照

Pagination: update pager value when page size changes (#10157)

杨奕 7 年 前
コミット
5797325c73
1 ファイル変更8 行追加0 行削除
  1. 8 0
      packages/pagination/src/pagination.js

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

@@ -211,6 +211,14 @@ export default {
 
       components: { ElInput },
 
+      watch: {
+        '$parent.internalPageSize'() {
+          this.$nextTick(() => {
+            this.$refs.input.$el.querySelector('input').value = this.$parent.internalCurrentPage;
+          });
+        }
+      },
+
       methods: {
         handleFocus(event) {
           this.oldValue = event.target.value;