layui table 调整行高 并设置内容自动换行

1、css 设置内容自动换行

    
     .layui-table-cell{
        overflow:visible;
        text-overflow:inherit;
        white-space:normal;
        height: 60px;/*在这里设置行高没用*/
    }

2、设置行高

done: function() { 
  //当数据渲染完后,执行的回调 $('.layui-table-cell').css('height','42px'); }

 

posted @ 2021-09-01 14:34  凉面好好吃  阅读(1961)  评论(0编辑  收藏  举报