公式:
page.total - (循环变量 + page.limit * (当前页数 - 1))
样式:
思路:
<el-table-column label="序号" width="100"> <template slot-scope="scopeIndex"> <span>{{computedIndex(scopeIndex.$index)}}</span> </template> </el-table-column>
computed: { computedIndex() { return val => { return this.page.total - (val + this.page.pageSize * (this.page.currentPage - 1)) }; }, }