iview / iview/iview-admin

2.0版本 左侧菜单高亮问题

Open
#775 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
16.3k
Forks
4.7k
PR merge metrics
No merged PRs in 30d

Description

左侧菜单不显示的情况下, 进入子路由, 怎么可以让父菜单高亮, 代码如下
{
path: 'level_2_3',
name: 'level_2_3',
meta: {
icon: 'arrow-graph-up-right',
title: '二级-3'
},
component: parentView,
redirect: '/multilevel/level_2_3/level_2_3_2',
children: [
{
path: 'level_2_3_1',
name: 'level_2_3_1',
meta: {
access: ['super_admin'],
icon: 'arrow-graph-up-right',
title: '三级-1',
hideInMenu: true
},
component: () => import('@/view/multilevel/level-2/level-2-1.vue')
},
{
path: 'level_2_3_2',
name: 'level_2_3_2',
meta: {
access: ['super_admin', 'admin'],
icon: 'arrow-graph-up-right',
title: '三级-2',
hideInMenu: true
},
component: () => import('@/view/multilevel/level-2/level-2-1.vue')
}
]
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the route configuration shown for level_2_3 and its hidden children, especially entering level_2_3_2 while the left menu is hidden. Trace the menu highlighting logic for nested routes and verify the parent menu remains highlighted; done means the parent is highlighted without displaying the hidden child entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.