mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 14:41:29 +00:00
refactor:优化前台顶栏菜单被点击时无需激活的菜单项的处理
This commit is contained in:
parent
3db75e0ff2
commit
028710bcb9
@ -120,7 +120,11 @@ const setActiveMenu = (route: RouteLocationNormalizedLoaded) => {
|
||||
* 检查菜单是否需要激活,如果否,还原 state.activeMenu
|
||||
*/
|
||||
const onSelect = (index: string) => {
|
||||
if (noNeedActive(siteConfig.headNav, index) || noNeedActive(memberCenter.state.navUserMenus, index)) {
|
||||
if (
|
||||
noNeedActive(siteConfig.headNav, index) ||
|
||||
noNeedActive(memberCenter.state.navUserMenus, index) ||
|
||||
noNeedActive(memberCenter.state.viewRoutes, index)
|
||||
) {
|
||||
const oldActiveMenu = state.activeMenu
|
||||
state.activeMenu = ''
|
||||
nextTick(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user