element-ui根据report_null值改变字体颜色
<el-table-column prop="name" label="名称" >
<template slot-scope="scope">
<span v-if="scope.row.report_null === 1 " style="color:#37B328">
{{ scope.row.name }}</span>
<span v-else style="color: red">
{{ scope.row.name }}</span>
</template>
</el-table-column>
tag标签
<el-table-column prop="method" label="周期">
<template slot-scope="scope">
<el-tag :type="scope.row.report_null === 1 ? 'primary' : 'success'" disable-transitions>
{{scope.row.method}}</el-tag>
</template>
</el-table-column>