columns:[[]],两个括号是因为可以有两行标题:
columns:[[
{field:'name',title:'绰号',width:100}
],
[
{field:'name',title:'姓名',width:100}
]]
处理object在colomun中显示问题:
{field:'dept',title:'部门',width:100,formatter:function (value,row,index) {
return value.name;
}
}
处理单个单元格背景色:
{field:'state',title:"状态",width:100,formatter:function (value,row,index) {
return value?"在职":"离职";
},styler:function (value,row,index) {
if(!value){
return 'background-color:pink;color:red'
}
}
}