使用layui前端样式,但是表格初始化加载数据之后上下列没有对其怎么办
代码如下
//列表加载
table.render({
elem: '#table_list'
,url: request_url + '/evaluate/getList'
,cols: [[
{type: 'checkbox', fixed: 'left'}
,{field: 'objectName', title: '商品名称'}
,{field: 'orderNo', title: '订单号'}
,{field: 'nickName', title: '用户昵称'}
,{field: 'score', title: '评分', width: 70}
,{field: 'content', title: '评价内容', width: 200},
,{field: 'createTime', title: '评价时间'}
,{title: '操作', width: 150, align:'center', toolbar: '#barDemo'}
]]
,page: true
,limit: 10
,height: 'full-220'
,text: {
none: '暂无相关数据' //默认:无数据。注:该属性为 layui 2.2.5 开始新增
},
done: function(res,curr,count){
var tableArray = new Array();
tableArray = res.value;
for(var i=0;i<tableArray.length;i++){
if(tableArray[i].score == 0){
$("tr").eq(i).css("background-color","red")
}
}
}
});~~~~
大哥表头明显多了一列啊