实现分页功能
分页插件代码
<template>
<div align="center">
<el-pagination :current-page="currentPage" :page-size="pagesize" layout="prev,pager,next" :total="totalCount" @current-change="pageChange">
</el-pagination>
</div>
</template>
复制代码
<script>
export default {
data() {
return {
//表格当前页数据
tableData: [],
//默认每页数据量
pagesize: 50,
//当前页码
currentPage: 1,
//查询的页码
start: 1,
//默认数据总数
totalCount: 0,
};
},
methods: {
pageChange(page) {
this.currentPage = page;
this.getinquire(page);
},
getinquire(page){
datatimelist.page_id = page;
datatimelist.page_count = this.pagesize;
}
}
}
</script>
复制代码
转载于:https://juejin.im/post/5a93cdf66fb9a0633f0e403e