fix: 🐛 混合模式清理activeTopMenuPath缓存导致顶部菜单激活错误问题修复

This commit is contained in:
hxr
2024-06-25 22:55:19 +08:00
parent 956a3e56e6
commit 0543062363

View File

@@ -41,9 +41,14 @@ const appStore = useAppStore();
const permissionStore = usePermissionStore();
const router = useRouter();
// 避免 activeTopMenuPath 缓存被清理从当前路由路径获取顶部菜单路径eg. /system/user → /system
const activeTopMenuPath = useRoute().path.replace(/\/[^\/]+$/, "") || "/";
appStore.activeTopMenu(activeTopMenuPath);
// 激活的顶部菜单路径
const activePath = computed(() => appStore.activeTopMenuPath);
// 顶部菜单集合
// 混合模式顶部菜单集合
const mixTopMenus = ref<RouteRecordRaw[]>([]);
/**