,limits:[10,20,30,40,50,60,70,80,90], done: function (res, curr, count) {// 表格渲染完成之后的回调 var that = this.elem.next(); res.data.forEach(function (item, index) { //console.log(item.empName);item表示每列显示的数据 if (index % 2 == 0) { var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']").css("background-color", "#fff"); } else { var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']").css("background-color", "#f7f7f7"); } }); }})
layui数据表格偶数行背景颜色
最新推荐文章于 2023-09-15 15:55:05 发布