diff --git a/ruoyi-admin/src/main/resources/static/css/style.css b/ruoyi-admin/src/main/resources/static/css/style.css index 6e9dc257..e7c72ca5 100644 --- a/ruoyi-admin/src/main/resources/static/css/style.css +++ b/ruoyi-admin/src/main/resources/static/css/style.css @@ -865,9 +865,9 @@ body.canvas-menu.mini-navbar nav.navbar-static-side { color: #cacaca; } -/* .form-control, .form-control:focus, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar { */ -/* box-shadow: none; */ -/* } */ +.form-control, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar { + box-shadow: none; +} .btn-outline { color: inherit; diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js index e8da4e9c..ca8c00c4 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js @@ -7,7 +7,7 @@ layer.config({ skin: 'layer-ext-moon' }); -var isMobile = $.common.isMobile() || $(window).width() < 769; +var isMobile = false; var sidebarHeight = isMobile ? '100%' : '96%'; $(function() { @@ -52,12 +52,23 @@ $(function() { }); -$(window).bind("load resize", -function() { - if ($(this).width() < 769) { +$(window).bind("load resize", function() { + isMobile = $.common.isMobile() || $(window).width() < 769; + if (isMobile) { $('body').addClass('canvas-menu'); + $("body").removeClass("mini-navbar"); $("nav .logo").addClass("hide"); - $(".slimScrollDiv").css({ "overflow":"hidden" }) + $(".slimScrollDiv").css({ "overflow": "hidden" }); + $('.navbar-static-side').fadeOut(); + } else { + if($('body').hasClass('canvas-menu')) { + $('body').addClass('fixed-sidebar'); + $('body').removeClass('canvas-menu'); + $("body").removeClass("mini-navbar"); + $("nav .logo").removeClass("hide"); + $(".slimScrollDiv").css({ "overflow": "visible" }); + $('.navbar-static-side').fadeIn(); + } } });