index.js
1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
const routes = [
{
path: "/",
name: "home",
component: resolve => require(["../views/Home.vue"], resolve),
children: [
{
path: "/trficcshow",
name: "trficcShow",
component: resolve =>
require(["../views/trafficShow/index.vue"], resolve)
},
{
path: "/behaviorshow",
name: "behaviorshow",
component: resolve =>
require(["../views/behaviorShow/index.vue"], resolve)
},
{
path: "/task/sceneSet",
name: "sceneSet",
component: resolve =>
require(["../views/sceneManage/index.vue"], resolve)
},
{
path: "/task/taskSet",
name: "taskSet",
component: resolve =>
require(["../views/taskManage/index.vue"], resolve)
},
{
path: "/search/vehicleSearch",
name: "taskSet",
component: resolve =>
require(["../views/search/vehicleSearch.vue"], resolve)
},
{
path: "/search/xcycle",
name: "xcycle",
component: resolve => require(["../views/search/xcycle.vue"], resolve)
}
]
},
{
path: "/login",
name: "login",
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: resolve => require(["../views/Login.vue"], resolve)
},
{
path: "/show",
name: "show",
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: resolve => require(["../views/Show.vue"], resolve)
}
];
const router = new VueRouter({
mode: "history",
base: process.env.BASE_URL,
routes
});
export default router;