Element ui table gets the current index value index

Use scope.$index to get the current index value.

<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>

Guess you like

Origin blog.csdn.net/qq_40047019/article/details/132039420