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"); } }); }