Commit cdeadafd by Netfan Committed by GitHub

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

1 parent ec49a041
......@@ -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"
......
......@@ -81,7 +81,7 @@ function useExtraMenu() {
watch(
() => route.path,
(path) => {
const currentPath = path;
const currentPath = route.meta?.activePath || path;
// if (preferences.sidebar.expandOnHover) {
// return;
// }
......
......@@ -113,7 +113,7 @@ function useMixedMenu() {
// 初始化计算侧边菜单
onBeforeMount(() => {
calcSideMenus();
calcSideMenus(route.meta?.activePath || route.path);
});
return {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!