zs hace 1 año
padre
commit
4407220d98
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 {