<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryCondition.page"
:page-sizes="[10, 20, 30, 40]"
:page-size="queryCondition.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
请求参数
queryCondition: {
limit: 10,
page: 0
},
total: 0,
方法
//每页的展示条数发生改变
handleSizeChange(limit) {
this.queryCondition.limit = limit
this.handleCurrentChange(1)
},
//当前页码发生改变
handleCurrentChange(page) {
this.queryCondition.page = page
},