element ui table 是循环出来的表格,如何根据字段判断为空时,将表格背景色变成红色

我现在要做的是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>

页面展示

阅读 9k
1 个回答

row-class-name 这个属性应该能满足你的要求
图片描述

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题