mirror of https://github.com/layui/layui
修复 table 的 `height:'#id-0'` 表达式在窗口 resize 无效的问题
parent
b92932c891
commit
e4ae678cb7
|
@ -353,13 +353,13 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
||||||
|
|
||||||
// 高度铺满:full-差距值
|
// 高度铺满:full-差距值
|
||||||
if(options.height && /^full-.+$/.test(options.height)){
|
if(options.height && /^full-.+$/.test(options.height)){
|
||||||
that.fullHeightGap = parseFloat(options.height.split('-')[1]) || 0;
|
that.fullHeightGap = options.height.split('-')[1];
|
||||||
options.height = _WIN.height() - that.fullHeightGap;
|
options.height = _WIN.height() - (parseFloat(that.fullHeightGap) || 0);
|
||||||
} else if (options.height && /^#\w+\S*-.+$/.test(options.height)) {
|
} else if (options.height && /^#\w+\S*-.+$/.test(options.height)) {
|
||||||
var parentDiv = options.height.split("-");
|
var parentDiv = options.height.split("-");
|
||||||
that.parentHeightGap = parseFloat(parentDiv.pop()) || 0;
|
that.parentHeightGap = parentDiv.pop();
|
||||||
that.parentDiv = parentDiv.join("-");
|
that.parentDiv = parentDiv.join("-");
|
||||||
options.height = $(that.parentDiv).height() - that.parentHeightGap;
|
options.height = $(that.parentDiv).height() - (parseFloat(that.parentHeightGap) || 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开始插入替代元素
|
// 开始插入替代元素
|
||||||
|
|
Loading…
Reference in New Issue