修改bootstrap table 单元格背景色
cellStyle:function(value,row,index){ var allTableData = $('#table').bootstrapTable('getData'); var tmp = allTableData[index]; //console.log(tmp[3]); console.log(tmp[6]+","+tmp[3]); // console.log(value+","+row+","+index); if (value==1){ return {css:{"background-color":"red"}} }else{ return {css:{"background-color":"green"}} } }
抱歉,暂停评论。