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