0
我想改变基于条件的角度ui网格行的背景颜色,所以如果riskValue是1,试图使其红色,如果值是2行背景颜色应该是黄色。任何简单的方法来完成这项任务?如何自定义角度的ui网格行背景颜色?
config.js
"columnDefs": [{
"name": "Ticket Number",
"field": "ticketNum",
"width": 120
},
{
"name": "Asset Id ",
"field": "assetID",
"width": 100
},
{
"name": "Severity",
"field": "severity",
"width": 100
},
{
"name": "Risk Index",
"field": "riskIndex",
"width": 100
},
{
"name": "Risk Val",
"field": "riskValue",
"cellTemplate": "<div ng-if=\"row.entity.Comments_Col1 != 'none'\" title={{row.entity.riskValue}} \" ><div style='white-space:nowrap;border-bottom: 1px solid red !important; height:100%;width:100%;'>{{row.entity.riskValue}}</div></div>",
"sort": {
"direction": "aesc",
"priority": 0
},
"width": 100,
"visible": false
}
],
的可能的复制[?如何颜色在角UI电网特定值的行(https://stackoverflow.com/questions/26362666/how-to-color-row- on-specific-in-angular-ui-grid) – RogerC
不会添加诸如“background-color”的行:#2dff07工作吗? – n4feng