1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > elementUI table组件获取表格当前行的索引

elementUI table组件获取表格当前行的索引

时间:2020-06-28 12:42:41

相关推荐

elementUI  table组件获取表格当前行的索引

一般情况下,我们通过scope.row获取每一行的数据,但是怎么获取每一行的索引呢?

答案就在下面:

<el-table max-height="290" :data="userTableData" border style="width: 100%"><el-table-column label="序号"><template slot-scope="scope">{{scope.$index+1}} </template></el-table-column><el-table-column prop="user_nickname" label="用户昵称"></el-table-column><el-table-column prop="create_time" label="提交时间"></el-table-column></el-table>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。