Merge pull request #173 from shabby2333/main

fix(components): 修复路由在path中包含重复路单词径菜单时,被激活会错误展开
This commit is contained in:
Soybean 2023-01-15 19:27:47 +08:00 committed by GitHub
commit 458b7adb29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {