Prechádzať zdrojové kódy

修改个人生平留言分页

Alex 4 rokov pred
rodič
commit
499290056c
1 zmenil súbory, kde vykonal 10 pridanie a 0 odobranie
  1. 10 0
      src/views/template/t1.vue

+ 10 - 0
src/views/template/t1.vue

@@ -56,6 +56,8 @@
             :page-size="queryParams.pageSize"
             :current-page="queryParams.pageNum"
             :total="total"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
           />
       </el-card>
       </el-col>
@@ -183,6 +185,14 @@ export default {
     handleCurrentChange(row){
       this.messageForm.contents = row.contents;
     },
+    handleSizeChange: function(size) {
+      this.queryParams.pageSize =  size
+      this.getMessageList();
+    },
+    handleCurrentChange: function(currentPage) {
+      this.queryParams.pageNum = currentPage
+      this.getMessageList();
+    },
     getMessageList(){
       this.loading = true;
       this.queryParams.personalId = this.personalImg.personalId;