element ui 分页

<el-pagination class="page-bar" @@size-change="changePageSize" @@current-change="changeCurrentPage"
:current-page="reqOccupation.page" :page-size="reqOccupation.limit" :total="totalCount"
:page-sizes="[5, 10, 15, 20, 30]" layout="total, sizes, prev, pager, next">
</el-pagination>

 

 

 

loadData() { // 获取所有
  axios.post('/LaborPersonnel/SpecialPersonnel/GetQualification', this.reqOccupation ).then(res => {
    this.loadingData = false;
    if (res.data.errcode == 0) {
      this.totalCount = res.data.result.count;
      this.tbCompany = res.data.result.list;
    }
  })
},

 

 

 

 

changePageSize(val) {
  this.reqOccupation.limit = val;
  this.reloadData();
},
changeCurrentPage(val) {
  this.reqOccupation.page = val;
  this.loadData();
},
reloadData() {
  this.tbCompany = [];
  idthis.reqOccupation.page = 1;
  this.loadData();
},

posted @ 2022-02-25 15:54  QQc198  阅读(42)  评论(0)    收藏  举报