From edc2ef705e67c6d3246b440d0396fa889c32522b Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 29 Jul 2024 16:09:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=EF=BC=9A=E9=A2=84=E8=A7=88=E5=9B=BE=E7=89=87=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA=E6=8C=89=E6=AF=94=E4=BE=8B=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/LR_Content/script/lr-layer.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js index 8cc37b7cd..ca76d7bcb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js @@ -70,7 +70,7 @@ dfop.width = dfop.width > $(window).width() ? $(window).width() - 10 : dfop.width; dfop.height = dfop.height > $(window).height() ? $(window).height() - 10 : dfop.height; var r = 0; - r=top.layer.open({ + r = top.layer.open({ id: dfop.id, maxmin: dfop.maxmin, type: 2, //0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) @@ -80,6 +80,12 @@ content: op.url, skin: dfop.btn == null ? 'lr-layer-nobtn' : 'lr-layer', success: function (layero, index) { + if (dfop.id == "PreviewForm") { + if (layero.find("iframe").length > 0 && layero.find("iframe").contents().find("img").length > 0) { + layero.find("iframe").contents().find("img").css({ "max-width": "100%", "max-height": "100%", "width": "auto", "height": "auto" }); + } + } + top['layer_' + dfop.id] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); layero[0].learun_layerid = 'layer_' + dfop.id; //如果底部有按钮添加-确认并关闭窗口勾选按钮 @@ -298,7 +304,7 @@ } }); }, - + // 关闭弹层 layerClose: function (name, index) { var _index;