xiaodai2022 il y a 2 ans
Parent
commit
417ff3af41
3 fichiers modifiés avec 25 ajouts et 1 suppressions
  1. 0 0
      dist/static/js/0.js
  2. 22 1
      src/components/ExTableNew.vue
  3. 3 0
      src/mixins/elPaginationHandle.js

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/0.js


+ 22 - 1
src/components/ExTableNew.vue

@@ -271,7 +271,28 @@ export default {
       tableSelection: [],
     };
   },
-  watch: {},
+   computed: {
+    page_curr() {
+      return this.page.curr;
+    },
+    page_size() {
+      return this.page.size;
+    },
+    page_total() {
+      return this.page.total;
+    },
+  },
+  watch: {
+    page_curr: function (val) {
+      this.page.curr = val;
+    },
+    page_size: function (val) {
+      this.page.size = val;
+    },
+    page_total: function (val) {
+      this.page.total = val;
+    },
+  },
   mounted() {
     // 拖拽绑定
     this.rowDrop();

+ 3 - 0
src/mixins/elPaginationHandle.js

@@ -2,10 +2,13 @@ export default {
   methods: {
     async handlePageChange(val) {
       this.parmValue.page = val
+      this.pageInfo.curr = val
       await this.searchList()
     },
     async handleSizeChange(val) {
       this.parmValue.page = 1
+      this.pageInfo.curr = 1
+      this.pageInfo.size = val
       this.parmValue.size = val
       await this.searchList()
     }

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff