diff --git a/app/admin/view/system/admin/theme.html b/app/admin/view/system/admin/theme.html index bef8e16b3ed2118677bb817f5b7542fb557baee6..1d267bbbf49e18a6a0caa65c64983f9ec0b5768a 100644 --- a/app/admin/view/system/admin/theme.html +++ b/app/admin/view/system/admin/theme.html @@ -59,7 +59,7 @@
- +
@@ -284,8 +284,14 @@ }) // 路由动画 - layui.form.on('switch(router)',function(obj) { - layer.msg('系统已内置loading','info'); + var router = admin.getStorage('showloading'); + if (typeof router == 'undefined') { + router = admin.options.showloading; + } + $('.router').prop('checked', router); + layui.form.on('switch(router)',function(obj) { + admin.setStorage('showloading',obj.elem.checked); + layer.msg('系统已内置loading切换成功','info'); }) // 重置选项 diff --git a/public/static/system/module/admin.js b/public/static/system/module/admin.js index 6a0fbeab080a65300cdcf6a5536e3266cc0b8690..2b1a2669988b5e06f05b5be806964f6e3304ec14 100644 --- a/public/static/system/module/admin.js +++ b/public/static/system/module/admin.js @@ -45,7 +45,7 @@ layui.define(['jquery', 'i18n', 'element', 'layer', 'form', 'rate', 'table', 'sl fluid: true, // 是否内容铺满 openHeader: true, openFooter: true, - + showloading: false, //是否加载路由动画,默认关闭。 }, getSpinningHtml: function () { return ['
', @@ -2060,7 +2060,9 @@ layui.define(['jquery', 'i18n', 'element', 'layer', 'form', 'rate', 'table', 'sl } // 增加动画 - admin.showLoading($('iframe[lay-id="' + url + '"]').parent()); + if(admin.getStorage('showloading')) { + admin.showLoading($('iframe[lay-id="' + url + '"]').parent()); + } element.render("breadcrumb"); element.tabChange(TABFILTER, id); } @@ -2084,7 +2086,9 @@ layui.define(['jquery', 'i18n', 'element', 'layer', 'form', 'rate', 'table', 'sl admin.setBreadHtml(); element.render("breadcrumb"); - admin.showLoading($('#swiftadmin-iframe')); + if(admin.getStorage('showloading')) { + admin.showLoading($('#swiftadmin-iframe')); + } } // 添加到选项卡