举个栗子,加入我们一页table表格是10行,分页到第二页时候我们想从11开始而不是1,这时候我们就可以这样做(如下图片),里面数字10是根据自己分页器:page-sizes="[10]"而来,这里我是写固定的每页10条数据。
<el-table-column prop="index" type="index" label="序号" width="150">
<!-- 优化选定分页序号 翻页时候新分页不是从1序号开始 (不想实现可以去掉 里面数字7是根据自己分页:page-sizes而来) -->
<template slot-scope="scope">
<span>{{(currentPage - 1) * 10 + scope.$index + 1}}</span>
</template>
</el-table-column>