From d06227e349997973b8694cf0b9079f44b962d641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E4=BB=AA=E5=BC=8F?= <854085467@qq.com> Date: Thu, 28 Jan 2021 16:18:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8F=9C=E5=8D=95=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=BB=86=E8=8A=82=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/pear/modules/admin.js | 1 + component/pear/modules/menu.js | 7 +++++++ config/pear.config.yml | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/component/pear/modules/admin.js b/component/pear/modules/admin.js index 2d7a028..bcfba70 100644 --- a/component/pear/modules/admin.js +++ b/component/pear/modules/admin.js @@ -148,6 +148,7 @@ layui.define(['table', 'jquery', 'element', 'yaml','form', 'tab', 'menu', 'frame close: true }, 300); compatible(); + }) } else { bodyFrame = pearFrame.render({ diff --git a/component/pear/modules/menu.js b/component/pear/modules/menu.js index 526ae49..d8e1547 100644 --- a/component/pear/modules/menu.js +++ b/component/pear/modules/menu.js @@ -64,6 +64,13 @@ layui.define(['table', 'jquery', 'element'], function(exports) { if (domsss.text() != '') { data['menuPath'] = domsss.find("span").text() + " / " + data['menuPath']; } + if ($("#" + _this.option.elem).is(".pear-nav-mini")) { + if(_this.option.accordion){ + activeMenus = $(this).parent().parent().parent().children("a"); + }else{ + activeMenus.push($(this).parent().parent().parent().children("a")); + } + } clickEvent(dom, data); }) } diff --git a/config/pear.config.yml b/config/pear.config.yml index abb360b..f00fb6a 100644 --- a/config/pear.config.yml +++ b/config/pear.config.yml @@ -10,7 +10,7 @@ menu: ## 菜单数据来源 data: "admin/data/menu.json" ## 是否同时只打开一个菜单目录 - accordion: true + accordion: false ## 是否开启多系统菜单模式 control: false ## 默认选中的菜单项 @@ -24,7 +24,7 @@ tab: ## 切换选项卡时,是否刷新页面状态 keepState: true ## 是否开启 Tab 记忆 - session: true + session: false ## 最大可打开的选项卡数量 tabMax: "30" ## 默认选项卡数据