elmentui paging component pagination encountered the problem, that is, the initial current-page setting is invalid, after entering the page has been on page 1, in fact, I set to jump to page 2 by default. (. The details are as follows:
<div class="pagination">
<el-pagination
background
layout="total,prev, pager, next"
:current-page="currentPage"
:page-size="pageSize"
:total="total">
</el-pagination>
</div>
data: in components
data:function() {
return {
flowDatas:[{}],
pageSize:15,
currentPage:2,
total:0,
}
methods: in components
async initData() {
let r = await getFlowList({currentPage:this.curPage,pageSize:this.pageSize});
let res = r.data;
console.log(res);
if(!Object.is(res.statusCode,200)) {
this.$message.error("!")
}else {
let data = res.data;
this.flowDatas = data.rows;
this.total = data.totalCount;
//this.currentPage = 5; 5
}
}