elementUi给特殊的属性值设置样式


可以通过scope.row.属性名和三目运算符给特殊的属性值设定样式

类似下面的效果

            <el-table-column property="examine" label="审核情况" width="">
                        <template slot-scope="scope">
                            <div :class="scope.row.examine === '待审核' ? 'specailColor' : ''">{{scope.row.examine}}</div>
                        </template>
                    </el-table-column>
                    <el-table-column property="publish" label="公示情况" width="">
                        <template slot-scope="scope">
                            <div :class="scope.row.publish === '未公示' ? 'specailColor' : ''">{{scope.row.publish}}</div>
                        </template>
                    </el-table-column>

 https://www.jianshu.com/p/2251cda42425


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM