Solve the problem of incomplete display of layui table pictures

Problem Description

Insert picture description here

Solution

Use the callback after the dynamic rendering of the table is completed to modify the cell style

done:function (res,curr,count) {
    
    
    $('.layui-table-cell').css({
    
    'height':'auto'});
}

Effect picture

Insert picture description here

Disadvantages

When all the tables in the table fieldhave no sortsorting function, they are completely usable, but when even one in the table fieldhas a sorting function, as long as one click to sort, the style will be destroyed. Dear friends, come according to your own situation, which one is bigger Niu solved this problem, please teach me (/Cry face/Cry face)

Guess you like

Origin blog.csdn.net/qq_47768542/article/details/113637291