方案1:
js部分:
done: function () {
//设置工具栏表头高度
$(".layui-table-header").eq(1).find("table").height($(".layui-table-header").eq(0).height()+1);
//设置工具栏按钮栏高度
$(".layui-table").eq(1).find("tr").each(function(index,ele){
$(".layui-table-body").eq(1).find("tr").eq(index).height($(ele).height());
});
}
css部分:
.layui-table-cell {
height: auto !important;
}方案二(推荐):
js部分:
,done: function(res, curr, count){
// 该方法用于解决,使用fixed固定列后,行高和其他列不一致的问题
$(".layui-table-main tr").each(function (index, val) {
$($(".layui-table-fixed .layui-table-body tbody tr")[index]).height($(val).height());
});
}
css部分:
.layui-table-cell {
height: auto !important;
}