<el-pagination
prev-text="上一页"
next-text="下一页"
background
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-size="pageSize"
layout="total, prev, pager, next, jumper"
:total="totlalCount"
></el-pagination>
<script>
export default {
props: {},
components: {},
data() {
return {
pageNo: 1,
pageSize: 10,
totlalCount: 0,
rightList: []
};
},
methods: {
getCompanyData() {
let parmars = {
pageNo: this.pageNo,
pageSize: this.pageSize
};
api.searchPage(parmars).then(res => {
this.totlalCount = res.data.totlalCount;
this.rightList = res.data.data;
});
},
handleCurrentChange(pageNum) {
this.pageNo = pageNum;
this.getCompanyData();
},
},
created() {},
mounted() {
this.getCompanyData();
}
};
</script>