【Layui】Table单元格高度自适应

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());
    });
},

  

posted @ 2021-04-15 11:06  詹楠_Aric  阅读(7050)  评论(0)    收藏  举报