vue+element分页和后台链接

// 分页------------------------
    handleCurrentChange(val) {
      //表格中的数据
      this.axios
      .get(`/schools/mapping/list`,{
        params: {
          pageNum: val,  
        }
      })
      .then(res => res.data)
      .then(data => {
        if (data.code === 200) {
          this.currentPage = data.data.pageNum
          this.pagesize = data.data.size
          this.total = data.data.total
          this.list = data.data.list[0];
        }
      });
    }

 

你可能感兴趣的:(vue+element分页和后台链接)