vue通过判断动态显示样式

<el-table-column
     align="center"
     prop="submitState"
     label="报送状态"
 >
     <template slot-scope="scope">
         <div :style="scope.row.submitState=== '已上报'?'color:#01b79d;':'color:#ec5656;'">{{scope.row.submitState}}</div>
      </template>
 </el-table-column>

原文地址:https://www.cnblogs.com/yscec/p/12619682.html