|
@@ -9,22 +9,20 @@ import workManagement from "./workManagement";
|
|
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
-const routes = [
|
|
|
- {
|
|
|
+const routes = [{
|
|
|
path: "/login",
|
|
|
name: "login",
|
|
|
component: () => import("../views/login.vue")
|
|
|
},
|
|
|
{
|
|
|
- path: "/",
|
|
|
- name: "index",
|
|
|
- meta: {
|
|
|
- tabname: "首页"
|
|
|
- },
|
|
|
- component: () => import('../views/index'),
|
|
|
- redirect: '/mainPage',
|
|
|
- children: [
|
|
|
- {
|
|
|
+ path: "/",
|
|
|
+ name: "index",
|
|
|
+ meta: {
|
|
|
+ tabname: "首页"
|
|
|
+ },
|
|
|
+ component: () => import('../views/index'),
|
|
|
+ redirect: '/mainPage',
|
|
|
+ children: [{
|
|
|
path: "/mainPage",
|
|
|
name: "mainPage",
|
|
|
|
|
@@ -81,32 +79,30 @@ const routes = [
|
|
|
component: () => import("@/views/systemManagement/index"),
|
|
|
redirect: '/index',
|
|
|
children: systemManagement,
|
|
|
- },
|
|
|
+ },
|
|
|
]
|
|
|
- .concat([{
|
|
|
- path: "*",
|
|
|
- name: "*",
|
|
|
- component: () => import("../views/mainPage.vue")
|
|
|
- }, ]),
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
+ {
|
|
|
+ path: "*",
|
|
|
+ name: "*",
|
|
|
+ component: () => import("@/views/mainPage.vue")
|
|
|
+ }
|
|
|
];
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
const router = new VueRouter({
|
|
|
mode: "history",
|
|
|
base: process.env.BASE_URL,
|
|
|
routes,
|
|
|
scrollBehavior(to, from, savedPosition) {
|
|
|
- return {x: 0, y: 0}
|
|
|
+ return {
|
|
|
+ x: 0,
|
|
|
+ y: 0
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|