浏览代码

基础路由更改

yunxing 4 年之前
父节点
当前提交
9f4b84f4d0
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 9 1
      src/router/index.js
  2. 1 1
      vue.config.js

+ 9 - 1
src/router/index.js

@@ -7,7 +7,15 @@ const routes = [
     // 登陆页面
     {
         path: '/',
-        redirect: '/home/overview',
+        // redirect: '/home/overview',
+        component: () => import('../views/index'),
+        children: [
+            //概览
+            {
+                path: '/',
+                component: () => import('../views/overview'),
+            },
+        ],
     },
     // home
     {

+ 1 - 1
vue.config.js

@@ -54,7 +54,7 @@ module.exports = {
             .loader('vue-svg-loader')
     },
     lintOnSave: false,
-    publicPath: '/wandaBmGuide',
+    publicPath: '/',
     // 打包名称
     outputDir: 'wandaBmGuide',
     // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录