From 2feb19982b77e0e023766aa9a6a456bc9dd90802 Mon Sep 17 00:00:00 2001 From: pbenz <46677126@qq.com> Date: Tue, 17 Nov 2020 17:17:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8adminlte.js=E4=B8=AD=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E5=9C=A8=E6=89=8B=E6=9C=BA=E7=AB=AF=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E6=97=B6=E5=80=99=E7=82=B9=E5=87=BB=E5=AE=8C=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=90=8E=E8=8F=9C=E5=8D=95=E8=87=AA=E5=8A=A8=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/adminlte.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/public/assets/js/adminlte.js b/public/assets/js/adminlte.js index 16c9459e8..d70c834ae 100644 --- a/public/assets/js/adminlte.js +++ b/public/assets/js/adminlte.js @@ -238,6 +238,24 @@ $(function () { */ function _init() { 'use strict'; + + + /*** + * @Description Hide sidebar of body class when after clicked submenu. + * @param null + * @return null + * @author pbenz + * @since 2020/11/17 09:05:26 + */ + $(".treeview-menu li a").on("click",function(){ + if ((navigator.userAgent.match(/(iPhone|daoiPod|Android|ios|iOS|iPad|Backerry|WebOS|Symbian|Windows Phone|Phone)/i))) { + $(document.body).removeClass('sidebar-open'); + } + }); + + + + /* Layout * ====== * Fixes the layout height in case min-height fails. @@ -247,6 +265,9 @@ function _init() { * $.AdminLTE.layout.fix() * $.AdminLTE.layout.fixSidebar() */ + + + $.AdminLTE.layout = { activate: function () { var _this = this; -- Gitee