html:
method:{
indexMethod (index) {
let curpage = this.page.pagination.pageData.page //单前页码,具体看组件取值
let limitpage = this.page.pagination.pageData.limit //每页条数,具体是组件取值
return (index+1) + (curpage-1)*limitpage
}
}
也可以这样
<el-table>
<el-table-column type='index'
:index='(index)=>{return (index+1) + (page.pagination.pageData.page-1)*page.pagination.pageData.limit }' >
</el-table-column>
</el-table>
我的博客即将同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=1uvaer0usuq9w