根据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