.layui-table-cell{
overflow:visible;
text-overflow:inherit;
white-space:normal;
height: auto !important;
word-break: break-all;
}
done: function (index, layero) {
//表头部分
//动态监听表头高度变化,冻结行跟着改变高度
$(".layui-table-header tr").resize(function () {
$(".layui-table-header tr").each(function (index, val) {
$($(".layui-table-fixed .layui-table-header table tr")[index]).height($(val).height());
});
});
//初始化高度,使得冻结行表头高度一致
$(".layui-table-header tr").each(function (index, val) {
$($(".layui-table-fixed .layui-table-header table tr")[index]).height($(val).height());
});
//表体部分
//动态监听表体高度变化,冻结行跟着改变高度
$(".layui-table-body tr").resize(function () {
$(".layui-table-body tr").each(function (index, val) {
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
});
});
//初始化高度,使得冻结行表体高度一致
$(".layui-table-body tr").each(function (index, val) {
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
});
}
![](https://i-blog.csdnimg.cn/blog_migrate/08e6506bd5c5b0e4463acb80a17c3aab.png)
image.png
![](https://i-blog.csdnimg.cn/blog_migrate/c41a486a904236410863b7a30eed5d50.png)
image.png