feat: 产品菜单路由权限

This commit is contained in:
rd
2025-07-08 16:55:04 +08:00
parent ead209da4d
commit f87e5ff020
26 changed files with 263 additions and 102 deletions

View File

@ -67,7 +67,8 @@ export default defineComponent({
};
listenerRouteChange((newRoute) => {
const { requiresAuth, activeMenu, hideInMenu } = newRoute.meta;
if (requiresAuth && (!hideInMenu || activeMenu)) {
// if (requiresAuth && (!hideInMenu || activeMenu)) {
if (!hideInMenu || activeMenu) {
const menuOpenKeys = findMenuOpenKeys((activeMenu || newRoute.name) as string);
const keySet = new Set([...menuOpenKeys, ...openKeys.value]);
openKeys.value = [...keySet];

View File

@ -18,7 +18,6 @@ const sidebarStore = useSidebarStore();
const exitAccountModalRef = ref(null);
// const selectedKey = ref([]);
// const enterpriseInfo = enterpriseStore.getEnterpriseInfo();
const selectedKey = computed(() => {
return [String(sidebarStore.activeMenuId)];
});