From 40eb4ed86c955e5fb420d689f80fdeb8ed1fbd7d Mon Sep 17 00:00:00 2001 From: "1170535111@qq.com" <1170535111@qq.com> Date: Wed, 29 Apr 2020 22:54:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=8F=92=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=BC=B9=E7=AA=97=E5=9C=A8=E6=89=8B=E6=9C=BA=E4=B8=AD?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94=E5=AE=BD=E9=AB=98=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/backend/addon.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/public/assets/js/backend/addon.js b/public/assets/js/backend/addon.js index 409066cf9..68286b9db 100644 --- a/public/assets/js/backend/addon.js +++ b/public/assets/js/backend/addon.js @@ -14,6 +14,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function var table = $("#table"); + // 弹窗自适应宽高 + var area = Fast.config.openArea != undefined ? Fast.config.openArea : [$(window).width() > 800 ? '800px' : '95%', $(window).height() > 600 ? '600px' : '95%']; + table.on('load-success.bs.table', function (e, json) { if (json && typeof json.category != 'undefined' && $(".nav-category li").size() == 2) { $.each(json.category, function (i, j) { @@ -202,7 +205,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function Layer.open({ content: Template("logintpl", {}), zIndex: 99, - area: ['430px', '350px'], + area: area, title: __('Login FastAdmin'), resize: false, btn: [__('Login'), __('Register')], @@ -240,7 +243,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function }, function (data) { Layer.open({ content: Template("userinfotpl", userinfo), - area: ['430px', '360px'], + area: area, title: __('Userinfo'), resize: false, btn: [__('Logout'), __('Cancel')], @@ -301,7 +304,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function Layer.open({ content: Template("paytpl", ret.data), shade: 0.8, - area: ['800px', '600px'], + area: area, skin: 'layui-layer-msg layui-layer-pay', title: false, closeBtn: true, @@ -319,7 +322,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function return; } top.Fast.api.open(ret.data.payurl, __('Pay now'), { - area: ["650px", "700px"], + area: area, end: function () { top.Layer.alert(__('Pay tips')); } @@ -329,7 +332,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function Layer.open({ content: Template("conflicttpl", ret.data), shade: 0.8, - area: ['800px', '600px'], + area: area, title: __('Warning'), btn: [__('Continue install'), __('Cancel')], end: function () { @@ -362,7 +365,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function Layer.open({ content: Template("conflicttpl", ret.data), shade: 0.8, - area: ['800px', '600px'], + area: area, title: __('Warning'), btn: [__('Continue uninstall'), __('Cancel')], end: function () { @@ -396,7 +399,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function Layer.open({ content: Template("conflicttpl", ret.data), shade: 0.8, - area: ['800px', '600px'], + area: area, title: __('Warning'), btn: [__('Continue operate'), __('Cancel')], end: function () { -- Gitee