1.單元格自適應
.layui-table-cell { height: auto; }
2.固定列單元格自適應
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()); }); },