layui table 根据需求设置行的背景色

done: function(res, curr, count){
     var that = $("#taskInfoTable").siblings();
     res.data.forEach(function (item, index) {
         if (item.planDay === 0) {
            var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']");
            tr.css("background-color", "yellow");
         }
    });
}

 

posted @ 2022-07-19 17:27  虚无——缥缈  阅读(1119)  评论(0编辑  收藏  举报