mirror of https://github.com/layui/layui
docs: 更新 table 文档
parent
725f6e849c
commit
ef2c7665ec
|
@ -254,6 +254,16 @@ height: function(){
|
|||
|
||||
</td>
|
||||
<td>string</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>syncFixedRowHeight <sup>2.12+ 实验性</sup></td>
|
||||
<td>
|
||||
|
||||
是否强制计算表格主区域的行高度并同步到固定列区域。开启后会对表格性能有一定的影响,仅适用于行高度自适应的场景。
|
||||
|
||||
</td>
|
||||
<td>boolean</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -2993,7 +2993,7 @@ layui.define(['lay', 'i18n', 'laytpl', 'laypage', 'form', 'util'], function(expo
|
|||
|
||||
// 同步固定列表格和主表格高度
|
||||
var lineStyle = that.config.lineStyle;
|
||||
var isAutoHeight = lineStyle && (/\bheight\s*:\s*auto\b/g.test(lineStyle) || lineStyle.indexOf('max-height') !== -1);
|
||||
var isAutoHeight = lineStyle && /\bheight\s*:\s*auto\b/g.test(lineStyle);
|
||||
// 只重载数据时需要主动同步高度,因为 tbody 大小可能不变
|
||||
var needSyncFixedColHeight = that.needSyncFixedColHeight = (that.layBody.length > 1) && (that.config.syncFixedRowHeight || (that.config.syncFixedRowHeight !== false && isAutoHeight));
|
||||
|
||||
|
|
Loading…
Reference in New Issue