Sky

修改Windows下,path拼接链接错误的问题,将错误页面正确拦截到404

......@@ -71,7 +71,7 @@
</template>
<script>
import path from "path";
// import path from "path";
export default {
name: "SidebarItem",
......@@ -111,7 +111,8 @@ export default {
return false;
},
resolvePath(...paths) {
return path.resolve(this.basePath, ...paths);
return this.basePath + "/" +paths[0]
// return path.resolve(this.basePath, ...paths);
},
OneShowingChild(children) {
this.onlyOneChild = children;
......
......@@ -27,7 +27,7 @@ const Notfound = () => import('@/views/404')
**/
export default [
{ path: '/login', component: Login, hidden: true },
{ path: '/404', component: Notfound, hidden: true },
{ path: '*', component: Notfound, hidden: true },
{
path: '/',
component: Layout,
......