Element ui table获取当前索引值 index

使用 scope.$index来获取当前索引值。

<el-table :data="list" highlight-current-row border>
    <el-table-column prop="name" :label="姓名">
        <template slot-scope="scope">
            {
   
   { scope.$index }}
        </template>
    </el-table-column>
</el-table>

猜你喜欢

转载自blog.csdn.net/qq_40047019/article/details/132039420
今日推荐