{
filed:'status',
checkbox:true,
formatter:function(value,row,index){
if (row.status == 1) //根据行里字段判断是否选中
return {
checked : true//设置选中
};
return value;
}
}
行样式:
rowStyle: function (row, index) {
//这里有5个取值代表5中颜色['active', 'success', 'info', 'warning', 'danger'];
var strclass = "";
if (row.name == "删除环境") {
strclass = 'danger';//还有一个active
}
else if (row.name == "新增环境") {
strclass = 'success';
}
else {
return {};
}
return { classes: strclass }
},