From f9c3004c643eaf94549f1239dcbc104397cb1a21 Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Tue, 14 Aug 2018 18:13:46 +0800 Subject: [PATCH] update --- src/common/router.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/router.js b/src/common/router.js index 98cc6d8b..df247acd 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)); } -- GitLab