我现在要做的是element ui table 中的某一个表格背景色变成红色,但是我的表格是循环出来的,如何拿到字段值,我现在判断的时候如何中间有一个字段为空,我要把表格背景色变成红色。
代码
<el-table :data="tableData" stripe highlight-current-row fit border style="width: 100%" @sort-change="handleSort">
<el-table-column width="180" prop="kequn" label="专业课群" show-overflow-tooltip fixed>
<template slot-scope="scope">
{{fhkequn(scope.row.kequn)}}
</template>
</el-table-column>
<el-table-column width="100" prop="name" label="姓名" align='center' fixed></el-table-column>
<el-table-column min-width="100" prop="account" label="学号" sortable="custom"></el-table-column>
<el-table-column min-width="120" :prop="item.prop" :label="item.title" v-for="(item,index) in titleData" :key="index">
<template></template>
</el-table-column>
</el-table>
row-class-name 这个属性应该能满足你的要求
