datatables 笔记
1 { 2 title:"房屋", 3 "orderable": false, 4 "data": null, 5 className:"noPadding", 6 render:function(data,type,row,meta){ 7 var house = row.house[0]; 8 return Number(house.dong) + '幢' + Number(house.unit) + '单元' + Number(house.house_num); 9 } 10 },
这是特殊的整合数据的方式
1 { 2 title:"真实姓名", 3 data: 'realName', 4 "orderable": false, 5 className:"noPadding", 6 },
1 { 2 title:"处理状态", 3 data: 'progress', 4 "orderable": false, 5 className:"noPadding", 6 render:function(data){ 7 return data == "已处理" ? "已处理" : "<span style='color:red;'>未处理</span>" 8 } 9 },
上面两种是普通的数据渲染的方式