From 9abeb6ac418091dcedf9035b379980fa058fc550 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 24 Dec 2020 12:14:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E5=87=BA=E5=B1=82openOptions=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/ruoyi/js/ry-ui.js | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index 4c4a8484..1b2a5893 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -768,7 +768,7 @@ var table = { }, // 弹出层指定宽度 open: function (title, url, width, height, callback) { - //如果是移动端,就使用自适应大小弹窗 + // 如果是移动端,就使用自适应大小弹窗 if ($.common.isMobile()) { width = 'auto'; height = 'auto'; @@ -816,6 +816,11 @@ var table = { var _width = $.common.isEmpty(options.width) ? "800" : options.width; var _height = $.common.isEmpty(options.height) ? ($(window).height() - 50) : options.height; var _btn = [' 确认', ' 关闭']; + // 如果是移动端,就使用自适应大小弹窗 + if ($.common.isMobile()) { + _width = 'auto'; + _height = 'auto'; + } if ($.common.isEmpty(options.yes)) { options.yes = function(index, layero) { options.callBack(index, layero); @@ -852,7 +857,7 @@ var table = { }, // 弹出层全屏 openFull: function (title, url, width, height) { - //如果是移动端,就使用自适应大小弹窗 + // 如果是移动端,就使用自适应大小弹窗 if ($.common.isMobile()) { width = 'auto'; height = 'auto'; @@ -963,17 +968,10 @@ var table = { detail: function(id, width, height) { table.set(); var _url = $.operate.detailUrl(id); - var _width = $.common.isEmpty(width) ? "800" : width; - var _height = $.common.isEmpty(height) ? ($(window).height() - 50) : height; - //如果是移动端,就使用自适应大小弹窗 - if ($.common.isMobile()) { - _width = 'auto'; - _height = 'auto'; - } var options = { title: table.options.modalName + "详细", - width: _width, - height: _height, + width: width, + height: height, url: _url, skin: 'layui-layer-gray', btn: ['关闭'],