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 },
這是特殊的整合數據的方式spa
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 },
上面兩種是普通的數據渲染的方式code