Skip to content

Commit

Permalink
fix(components): 修复路由在path中包含重复路单词径菜单时,被激活会错误展开
Browse files Browse the repository at this point in the history
  • Loading branch information
shabby2333 committed Jan 13, 2023
1 parent 0882c25 commit 264da00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/router/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 264da00

Please sign in to comment.