这个是前端代码
<div style="margin: 10px 0 ; text-align: center">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync = currentPage
:page-sizes=[5,10,20]
:page-size=pageSize
layout="total, sizes, prev, pager, next, jumper"
:total=total>
</el-pagination>
</div>
<script>
handleSizeChange(pageSize) { /*改变当前每页个数触发*/
this.pageSize = pageSize;
this.load();
},
handleCurrentChange(pageNum) { /*改变当前页触发*/
this.currentPage = pageNum;
this.load();
},
</script>