fix: activePath not working in menu, fixed: #4112 (#4113)

This commit is contained in:
Netfan 2024-08-10 18:54:57 +08:00 committed by GitHub
parent ec49a04151
commit cdeadafda5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ async function handleSelect(key: string) {
<Menu
:accordion="accordion"
:collapse="collapse"
:default-active="route.path"
:default-active="route.meta?.activePath || route.path"
:menus="menus"
:rounded="rounded"
:theme="theme"

View File

@ -81,7 +81,7 @@ function useExtraMenu() {
watch(
() => route.path,
(path) => {
const currentPath = path;
const currentPath = route.meta?.activePath || path;
// if (preferences.sidebar.expandOnHover) {
// return;
// }

View File

@ -113,7 +113,7 @@ function useMixedMenu() {
// 初始化计算侧边菜单
onBeforeMount(() => {
calcSideMenus();
calcSideMenus(route.meta?.activePath || route.path);
});
return {