<el-table :data="dataBox" style="width: 100%" @row-click="clickitemdata"
:row-style="rowStyle" border v-loading="fullscreenLoading"
@sort-change="sortChange"
element-loading-text="拼命加载中">
...
// 分页
<div class="block" style="margin-top: 20px;">
<el-pagination
background
layout="total,prev, pager, next"
hide-on-single-page
:total="runProcessTotal"
:current-page="currentPage"
@current-change="handleCurrentChangeyunxing"
></el-pagination>
</div>
computed: {
dataBox() {
// allList 全部数据
return this.allList.slice(
(this.currentPage - 1) * this.pageSize,
this.currentPage * this.pageSize
);
},
},
methods:
handleCurrentChangeyunxing(val) {
this.currentPage = val;
},