如下,當"當前狀態"列中的內容是1時,將其變為"異常",並紅色顯示出來
{
header: '當前狀態',
align: 'center',
dataIndex: 'IsWork',
sortable: true,
//menuDisabled:true,
width: 80,
renderer:function(value,cellmeta,record, rowIndex, columnIndex, store){
if(value != 1){
value = "異常";
cellmeta.css="RedFont";
}else{
value = "正常";
}
return value;
}
}
.RedFont{
color:#ff0000;
}
摘自 漂泊小柒的專欄