根據elementui表格中的值確定顯示顏色


 

 1.在tabel標簽中綁定 :cell-style="cellStyle"    
 2.在methods中定義cellStyle方法
        cellStyle(row, column, rowIndex, columnIndex) {
            if (row.column.label == "事件告警信息" || row.column.label == "性能告警信息"  ) {
                return "color:#FF747B";
            }
            if(row.column.label == "系統狀態" && row.row.equStatus == "正常" ){
                 return "color:#08AD2B";
            }
            if(row.column.label == "均衡狀態" && row.row.equStatus == "正常" ){
                 return "color:#08AD2B";
            }
        },

 


免責聲明!

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



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