From 0e5d41b781d14c5b8e015fee0c49e66b4ac1eddd Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 17 Oct 2019 18:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B8=85=E9=99=A4=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E9=AA=8C=E8=AF=81=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/ruoyi/js/ry-ui.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 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 3fe1ff5d..6eedb171 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 @@ -799,10 +799,17 @@ // 详细信息 detail: function(id, width, height) { var _url = $.operate.detailUrl(id); + var _width = $.common.isEmpty(width) ? "800" : width; + var _height = $.common.isEmpty(height) ? ($(window).height() - 50) : height; + //如果是移动端,就使用自适应大小弹窗 + if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) { + _width = 'auto'; + _height = 'auto'; + } var options = { title: $.table._option.modalName + "详细", - width: width, - height: height, + width: _width, + height: _height, url: $.operate.detailUrl(id), skin: 'layui-layer-gray', btn: ['关闭'], @@ -1072,6 +1079,11 @@ form: function (formId) { var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; return $("#" + currentId).validate().form(); + }, + // 重置表单验证(清除提示信息) + reset: function (formId) { + var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; + return $("#" + currentId).validate().resetForm(); } }, // 树插件封装处理