From a55210f9a65bf137f5c4e48e4b9a0d0bd55e4712 Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Thu, 6 Aug 2020 15:06:20 +0800 Subject: [PATCH] chore: add menu invisible configuration for async router; :star2: --- src/utils/routerUtil.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/routerUtil.js b/src/utils/routerUtil.js index 795f0cc..0a88cfb 100644 --- a/src/utils/routerUtil.js +++ b/src/utils/routerUtil.js @@ -36,6 +36,9 @@ function parseRoutes(routesConfig, routerMap) { page: routeCfg.page || router.page } } + if (routeCfg.invisible || router.invisible) { + route.meta.invisible = true + } if (routeCfg.children && routeCfg.children.length > 0) { route.children = parseRoutes(routeCfg.children, routerMap) }