<el-pagination class="pagination"
:page-size="limit"
background
layout="prev, pager, next"
:total="total"
:current-page="currentPage"
@current-change="handleCurrentChange" >
</el-pagination>
data() {
return {
list:[],
searchData:'',
currentPage:1,
limit:5,
total:null
}
},
<el-pagination
background
layout="prev, pager, next"
:page-size="limit"
:total="total"
@current-change="page">
</el-pagination>
data() {
return {
limit:5,
total:null
}
},
page(currentPage){
const _this =this;
axios({
url:'http://localhost:8181/book/findAll/'+currentPage+'/5',
method:'get',
}).then(res=>{
_this.tableData = res.data.content
_this.total = res.data.totalElements
})