From e39fcbdce6b095268c8c775a671b7ce92f657a1a Mon Sep 17 00:00:00 2001 From: "Argo Zhang (Win)" Date: Mon, 5 Aug 2019 23:07:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(#I1067G):=20=E4=BF=AE=E5=A4=8D=E4=B8=89?= =?UTF-8?q?=E7=BA=A7=E4=BB=A5=E4=B8=8A=E8=8F=9C=E5=8D=95=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Comment comment #I1067G 使用客户端脚本设置 active 节点以及父节点 临时解决 寻找更合适的菜单 #Issue close https://gitee.com/LongbowEnterprise/dashboard/issues?id=I1067G close https://gitee.com/LongbowEnterprise/dashboard/issues?id=I100XI --- Bootstrap.Admin/wwwroot/js/common-scripts.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Bootstrap.Admin/wwwroot/js/common-scripts.js b/Bootstrap.Admin/wwwroot/js/common-scripts.js index ba96219c..80bda9c1 100644 --- a/Bootstrap.Admin/wwwroot/js/common-scripts.js +++ b/Bootstrap.Admin/wwwroot/js/common-scripts.js @@ -131,6 +131,14 @@ $(function () { var $sideMenu = $(".sidebar"); + + // 临时使用脚本解决多层菜单收缩问题 + // Issue https://gitee.com/LongbowEnterprise/dashboard/issues?id=I1067G + var $activeLink = $sideMenu.find('a.nav-link.active'); + while ($activeLink.length > 0) { + var $li = $activeLink.parent('li').addClass('active'); + $activeLink = $li.parent().prev().addClass('active'); + } $sideMenu.dcAccordion({ autoExpand: true, saveState: false