yoyo837 пре 7 година
родитељ
комит
f9c3004c64
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      src/common/router.js

+ 3 - 0
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));
   }