///处理列宽问题。
var trArr = $(“#divContent >.layui-table-view >.layui-table-box> .layui-table-header”).css(“height”);
console.log(trArr);
$(“#divContent .layui-table-view .layui-table-box .layui-table-header .layui-table .layui-table-col-special”).css(“height”, trArr);
或者:
function SetFixHeight() {
var trArr = $(“div.layui-table-main table tr”);
var trArrFix = $(“div.layui-table-fixed div.layui-table-body table tr”);
for (var i = 0; i < trArr.length; i++) {
var height = $(trArr[i]).height();
var fixHeight = $(trArrFix[i]).height();
if (height > fixHeight) {
$(trArrFix[i]).height(height);
} else {
$(trArr[i]).height(fixHeight);
}
}
}