<el-table :row-style="tableRowClassName">
<el-table-column prop="a" label="1号泵站">
</el-table-column>
<el-table-column prop="b" label="1号泵站">
</el-table-column>
<el-table-column prop="c" label="1号泵站">
</el-table-column>
</el-table>
methods: {
// 表格隔行变色 返回必须是个对象
tableRowClassName(obj) {
if (obj.rowIndex % 2 === 0) {
return { background: "#fafafa" };
}
},
}