zs 1 rok temu
rodzic
commit
4407220d98
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/router/guard.js

+ 1 - 1
src/router/guard.js

@@ -130,7 +130,7 @@ export const registerBeforeRouter = async (router) => {
       const menus = await getUserMeta(token)
       // 检查目的地路由是否注册
       const hasRoute = hasNecessaryRoute(to, router)
-      if (hasRoute) {
+      if (hasRoute || to.meta.hidden) {
         // 注册了直接进入
         next()
       } else {