Merge pull request #173 from shabby2333/main
fix(components): 修复路由在path中包含重复路单词径菜单时,被激活会错误展开
This commit is contained in:
commit
458b7adb29
@ -45,7 +45,7 @@ export function getActiveKeyPathsOfMenus(activeKey: string, menus: App.GlobalMen
|
||||
|
||||
function getActiveKeyPathsOfMenu(activeKey: string, menu: App.GlobalMenuOption) {
|
||||
const keys: string[] = [];
|
||||
if (activeKey.includes(menu.routeName)) {
|
||||
if (activeKey.startsWith(menu.routeName)) {
|
||||
keys.push(menu.routeName);
|
||||
}
|
||||
if (menu.children) {
|
||||
|
Loading…
Reference in New Issue
Block a user