Bläddra i källkod

调度中心配置路由

Shannon_mu 2 år sedan
förälder
incheckning
0a68a44bdf
1 ändrade filer med 8 tillägg och 6 borttagningar
  1. 8 6
      commandCenter/src/router/index.js

+ 8 - 6
commandCenter/src/router/index.js

@@ -10,10 +10,12 @@ const quietRoute = [
     {
         path: '/',
         component: () => import('@/components/common/Home.vue'),
-        redirect: '/index',
+        name: 'home',
+        redirect: "/index",
         children: [
             {
                 path: '/index',
+                name: 'index',
                 component: () => import('@views/commandDispatch/index.vue'),
                 meta: { title: 'index' }
             },
@@ -27,16 +29,16 @@ const quietRoute = [
                 component: () => import('@views/errorPage/404.vue'),
                 meta: { title: '404' }
             },
-            {
-                path: '*',
-                redirect: '/404'
-            }
         ],
     },
+    {
+        path: '*',
+        redirect: '/404'
+    }
 ]
 const route = new Router({
     mode: 'history',
     base: process.env.BASE_URL,
-    routes: [...quietRoute]
+    routes: quietRoute
 });
 export default route;