mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-15 21:53:48 +08:00
修复菜单active_menu参数刷新页面后失效问题
This commit is contained in:
@@ -150,6 +150,10 @@
|
||||
|
||||
onMounted(() => {
|
||||
updateMenu();
|
||||
const matched = currentRoute.matched;
|
||||
state.openKeys = matched.map((item) => item.name);
|
||||
const activeMenu: string = (currentRoute.meta?.activeMenu as string) || '';
|
||||
selectedKeys.value = activeMenu ? (activeMenu as string) : (currentRoute.name as string);
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user