fix: 🐛 混合模式清理activeTopMenuPath缓存导致顶部菜单激活错误问题修复
This commit is contained in:
@@ -41,9 +41,14 @@ const appStore = useAppStore();
|
|||||||
const permissionStore = usePermissionStore();
|
const permissionStore = usePermissionStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
// 避免 activeTopMenuPath 缓存被清理,从当前路由路径获取顶部菜单路径,eg. /system/user → /system
|
||||||
|
const activeTopMenuPath = useRoute().path.replace(/\/[^\/]+$/, "") || "/";
|
||||||
|
appStore.activeTopMenu(activeTopMenuPath);
|
||||||
|
|
||||||
|
// 激活的顶部菜单路径
|
||||||
const activePath = computed(() => appStore.activeTopMenuPath);
|
const activePath = computed(() => appStore.activeTopMenuPath);
|
||||||
|
|
||||||
// 顶部菜单集合
|
// 混合模式顶部菜单集合
|
||||||
const mixTopMenus = ref<RouteRecordRaw[]>([]);
|
const mixTopMenus = ref<RouteRecordRaw[]>([]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user