1. el-table标签增加row-class-name属性
<el-table :data="tableData.body" style="width: 100%" height="400px" ref="testTable" size="mini"
:row-class-name="tableRowClassName"
>
2.新增tableRowClassName方法
tableRowClassName ({row, rowIndex}) {
// 把每一行的索引放进row
row.rowIndex = rowIndex
},