标签:size 分页 console get pad 覆盖 catch lan padding
前端分页: element-UI分页组件
<!-- 分页 -->
<el-pagination
:current-page="page"
:page-size="size"
:total="total"
style="padding: 30px 0; text-align: center;"
layout="total, prev, pager, next, jumper"
@current-change="getTeacherList" //每次分页要重新调用查询方法
/>
getTeacherList(page = 1){ //设置page默认值为1,es6写法
this.page = page //若page有值则覆盖默认值
teacher.getTeacherListPage(this.page,this.size,this.teacherQuery)
.then(res => {
this.list = res.data.list
this.total = res.data.total
console.log(this.list)
console.log(this.total)
})
.catch()
}
标签:size 分页 console get pad 覆盖 catch lan padding
原文地址:https://www.cnblogs.com/silloutte/p/14397373.html