zhaoyun 6 kuukautta sitten
vanhempi
commit
de02c5bc73
1 muutettua tiedostoa jossa 28 lisäystä ja 15 poistoa
  1. 28 15
      src/router/index.js

+ 28 - 15
src/router/index.js

@@ -114,21 +114,34 @@ export const constantRoutes = [
       },
     ],
   },
-  {
-    path: "/home",
-    name: "home",
-    // hidden: true,
-    meta: { title: "首页", icon: "dashboard", affix: true },
-    component: Layout,
-    children: [
-      {
-        path: "/home/index",
-        component: () => import("@/views/home/index"),
-        name: "home",
-        meta: { title: "首页", icon: "dashboard", affix: true },
-      },
-    ],
-  },
+	{
+	    path: '',
+	    component: Layout,
+	    redirect: 'index',
+	    children: [
+	      {
+	        path: 'index',
+	        component: () => import('@/views/home/index'),
+	        name: 'Index',
+	        meta: { title: '首页', icon: 'dashboard', affix: true }
+	      }
+	    ]
+	  },
+  // {
+  //   path: "/home",
+  //   name: "home",
+  //   // hidden: true,
+  //   meta: { title: "首页", icon: "dashboard", affix: true },
+  //   component: Layout,
+  //   children: [
+  //     {
+  //       path: "/home/index",
+  //       component: () => import("@/views/home/index"),
+  //       name: "home",
+  //       meta: { title: "首页", icon: "dashboard", affix: true },
+  //     },
+  //   ],
+  // },
   // {
   //   path: "/secure",
   //   name: "secure",