Vue中使用element-ui中的el-table時修改列的字體顏色


方法

在el-table-column中添加自定義模版樣式進行修改。

示例代碼



<el-table-column prop="isPass" label="是否通過"> <template scope="scope"> <span v-if="scope.row.isPass==='審核通過'" style="color: green">審核通過</span> <span v-else-if="scope.row.isPass==='待審核'">待審核</span> <span v-else style="color: red">未通過</span> </template> </el-table-column>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM