element-ui表格翻页的序号递增
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element
免费下载资源
·
1、写方法体里
<el-table>
<el-table-column type='index' :index='indexMethod' ></el-table-column>
</el-table>
js:
method:{
indexMethod (index) {
let curpage = this.page.pagination.pageData.page //单前页码,具体看组件取值
let limitpage = this.page.pagination.pageData.limit //每页条数,具体是组件取值
return (index+1) + (curpage-1)*limitpage
}
}
2、直接写dom里
<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>
GitHub 加速计划 / eleme / element
54.06 K
14.63 K
下载
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:3 个月前 )
c345bb45
7 个月前
a07f3a59
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update table.md
* Update transition.md
* Update popover.md 7 个月前
更多推荐
已为社区贡献1条内容
所有评论(0)