From 1caa24fd981af805e97373a7b6562b9ddf2c76c9 Mon Sep 17 00:00:00 2001 From: sunxb <470459819@qq.com> Date: Fri, 14 Oct 2022 15:42:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B=E5=B0=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/laydate.js | 2 +- src/modules/layer.js | 14 +++++++------- src/modules/table.js | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/modules/laydate.js b/src/modules/laydate.js index fdf6f9ca..51606f0b 100644 --- a/src/modules/laydate.js +++ b/src/modules/laydate.js @@ -1409,7 +1409,7 @@ setTimeStatus(); scroll(); - (that.endDate || options.type === 'time') && that.done(null, 'change'); + (that.endDate || options.type === 'time' || (options.type === 'datetime' && options.fullPanel)) && that.done(null, 'change'); //同步按钮可点状态 that.setBtnStatus(); diff --git a/src/modules/layer.js b/src/modules/layer.js index d900a733..f455483b 100644 --- a/src/modules/layer.js +++ b/src/modules/layer.js @@ -902,8 +902,8 @@ Class.pt.openLayer = function(){ //记录宽高坐标,用于还原 ready.record = function(layero){ var area = [ - layero.width(), - layero.height(), + layero[0].style.width || layero.width(), + layero[0].style.height || layero.height(), layero.position().top, layero.position().left + parseFloat(layero.css('margin-left')) ]; @@ -981,11 +981,11 @@ layer.style = function(index, options, limit){ if(type === ready.type[2]){ layero.find('iframe').css({ - height: parseFloat(options.height) - titHeight - btnHeight + height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight }); } else { contElem.css({ - height: parseFloat(options.height) - titHeight - btnHeight + height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight - parseFloat(contElem.css('padding-top')) - parseFloat(contElem.css('padding-bottom')) }) @@ -1058,9 +1058,9 @@ layer.restore = function(index){ //恢复原来尺寸 layer.style(index, { - width: parseFloat(area[0]), - height: parseFloat(area[1]), - top: parseFloat(area[2]), + width: area[0], // 数值或百分比 + height: area[1], + top: parseFloat(area[2]), left: parseFloat(area[3]), position: layero.attr('position'), overflow: 'visible' diff --git a/src/modules/table.js b/src/modules/table.js index f01df71b..74f15f33 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1363,7 +1363,8 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ tds.push(td); }); - that.layTotal.find('tbody').html('