Browse Source

fix: #100 (#103)

hb0730 3 years ago
parent
commit
10e8b296e3
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/layout/components/sidebar/sidebarItem.vue

+ 6 - 1
src/layout/components/sidebar/sidebarItem.vue

@@ -68,7 +68,12 @@ function hasOneShowingChild(
 }
 
 function resolvePath(routePath) {
-  return path.resolve(props.basePath, routePath);
+  const httpReg = /^http(s?):\/\//;
+  if (httpReg.test(routePath)) {
+    return props.basePath + "/" + routePath;
+  } else {
+    return path.resolve(props.basePath, routePath);
+  }
 }
 </script>