element中根据状态改变el-table某个字体颜色
<div
:style="scope.row.projectInfo.status==1?
'color: #E6A23C;':scope.row.projectInfo.status==2?
'color: #67C23A':scope.row.projectInfo.status==3?
'color: #909399;':scope.row.projectInfo.status==4?
'color: #F56C6C':''">
{
{scope.row.projectInfo.status1}}
</div>
格式可能有问题,这样写方便查看源码如下
<el-table-column
align="center"
label="状态"
prop="projectInfo.status1"
show-overflow-tooltip
color
>
<template slot-scope="scope">
<div
:style="scope.row.projectInfo.status==1?'color: #E6A23C;':scope.row.projectInfo.status==2?'