|
//设置列表指定行的背景色
const prefix = 'public_fixedDataTableRow';
const cusStyle = `.${prefix}_bg-red [role="gridcell"] { background-color: red; }`;
loadStyle(cusStyle);
gridModel.on('afterSetDataSource',function(){
gridModel.setRowState(3, 'className', 'bg-red');
})
function loadStyle(params){
var headobj=document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
headobj.appendChild(style);
style.sheet.insertRule(params, 0);
} |
|