html part
<el-pagination v-if="rooms.length > 0" background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
:pager-count="3"
layout="prev, pager, next, jumper"
:total="roomTotal">
</el-pagination>
js part
data() {
return {
rooms:[],
currentPage:0,
pageSize:20,
roomTotal:0
};
},
roomTotal is dynamically set by the backend after responding
error screenshot