Elementui表格获取索引index用于v-for
Vue + Elementui
在<el-table-column>里获取每一行表格的索引,从0开始自增:
slot-scope="scope" 和 scope.$index 配合就能获取索引
<template slot-scope="scope">
{{scope.%index}} <!--输出索引-->
</template>

Vue + Elementui
在<el-table-column>里获取每一行表格的索引,从0开始自增:
slot-scope="scope" 和 scope.$index 配合就能获取索引
<template slot-scope="scope">
{{scope.%index}} <!--输出索引-->
</template>
