-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrouter.ts
More file actions
42 lines (39 loc) · 1.22 KB
/
router.ts
File metadata and controls
42 lines (39 loc) · 1.22 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
import Vue from 'vue'
import Router from 'vue-router'
import Home from '../components/home/home'
import Callback from '../components/callback/callback'
import Editor from '../components/editor/editor';
Vue.use(Router)
const router = new Router({
mode: 'history',
routes: [
{
path: '/home',
name: 'Home',
component: Home
},
{
path: '/callback',
name: 'Callback',
component: Callback
},
{
path: '*',
redirect: '/home'
},
{
path: '/editor',
name: 'editor',
component: Editor,
props(route) {
return route.query || {}
}
},
{ path: '/', component: require('../components/home/home.vue.html') },
{ path: '/callback', component: require('../components/callback/callback.vue.html') },
{ path: '/counter', component: require('../components/counter/counter.vue.html') },
{ path: '/fetchdata', component: require('../components/fetchdata/fetchdata.vue.html') },
{ path: '/editor', component: require('../components/editor/editor.vue.html') }
]
})
export default router