diff --git a/src/common/router.js b/src/common/router.js index 98cc6d8b8551c4d16e060a4b022f4b4148b3a949..df247acdbc65a188c04a430f094ec82b556a0c88 100644 --- a/src/common/router.js +++ b/src/common/router.js @@ -80,6 +80,9 @@ function findMenuKey(menuData, path) { if (lastIdx < 0) { return null; } + if (lastIdx === 0) { + return findMenuKey(menuData, '/'); + } // 如果没有,使用上一层的配置 return findMenuKey(menuData, path.substr(0, lastIdx)); }