优化 table 多级表头的宽度分配

pull/1220/head
贤心 2023-03-28 13:25:22 +08:00
parent 6cc405f218
commit 76076dbfa3
1 changed files with 4 additions and 4 deletions

View File

@ -811,15 +811,15 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
if(that.autoColNums > 0 && patchNums >= -colNums && patchNums <= colNums){
var getEndTh = function(th){
var field;
th = th || that.layHeader.eq(0).find('thead th:last-child')
th = th || that.layHeader.eq(0).find('thead > tr:first-child > th:last-child')
field = th.data('field');
if(!field && th.prev()[0]){
return getEndTh(th.prev())
}
return th
}
,th = getEndTh()
,key = th.data('key');
};
var th = getEndTh();
var key = th.data('key');
that.getCssRule(key, function(item){
var width = item.style.width || th.outerWidth();