版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/LzzMandy/article/details/80926080
1、源码
colModel : [ //此处省略其他的字段设置
{name :'iotype',index : 'iotype',width : '15%',align: 'center',sortable: false,
formatter:function(cellValue){
var intype= "<div class='intype'></div>";
var outtype= "<div class='outtype'></div>";
if(cellValue=="0"){
return intype;
}else{
return outtype;
}
}},
],