@@ -13,7 +13,7 @@ const Async = () => Promise.resolve({ template: '<div>async</div>' })
13
13
const Hook : ComponentOptions < Vue > = {
14
14
template : '<div>hook</div>' ,
15
15
16
- beforeRouteEnter ( to , from , next ) {
16
+ beforeRouteEnter ( to , from , next ) {
17
17
route . params
18
18
next ( '/' )
19
19
next ( { path : '/' } )
@@ -22,14 +22,14 @@ const Hook: ComponentOptions<Vue> = {
22
22
} )
23
23
} ,
24
24
25
- beforeRouteLeave ( to , from , next ) {
25
+ beforeRouteLeave ( to , from , next ) {
26
26
route . params
27
27
next ( '/' )
28
28
next ( { path : '/' } )
29
29
next ( )
30
30
} ,
31
31
32
- beforeRouteUpdate ( to , from , next ) {
32
+ beforeRouteUpdate ( to , from , next ) {
33
33
route . params
34
34
next ( '/' )
35
35
next ( { path : '/' } )
@@ -49,7 +49,7 @@ const router = new VueRouter({
49
49
}
50
50
51
51
if ( from . path === '/offset' ) {
52
- return { selector : '#foo' , offset : { x : 0 , y : 100 } }
52
+ return { selector : '#foo' , offset : { x : 0 , y : 100 } }
53
53
}
54
54
55
55
if ( to . path === '/child' ) {
@@ -79,7 +79,7 @@ const router = new VueRouter({
79
79
asyncComponent : Async
80
80
} ,
81
81
meta : { auth : true } ,
82
- beforeEnter ( to , from , next ) {
82
+ beforeEnter ( to , from , next ) {
83
83
to . params
84
84
from . params
85
85
next ( { name : 'home' } )
@@ -102,7 +102,7 @@ const router = new VueRouter({
102
102
} ,
103
103
{ path : '/home' , alias : '/' } ,
104
104
{ path : '/foo' , props : true } ,
105
- { path : '/bar' , props : { id : 123 } } ,
105
+ { path : '/bar' , props : { id : 123 } } ,
106
106
{ path : '/baz' , props : ( route : Route ) => route . params } ,
107
107
{ path : '*' , redirect : '/' }
108
108
]
@@ -125,11 +125,11 @@ const matched: RouteRecord[] = route.matched
125
125
matched . forEach ( m => {
126
126
const path : string = m . path
127
127
const components : {
128
- [ key : string ] : ComponentOptions < Vue > | typeof Vue | AsyncComponent
128
+ [ key : string ] : ComponentOptions < Vue > | typeof Vue | AsyncComponent
129
129
} = m . components
130
130
const instances : { [ key : string ] : Vue } = m . instances
131
131
const name : string | undefined | null = m . name
132
- const parant : RouteRecord | undefined = m . parent
132
+ const parent : RouteRecord | undefined = m . parent
133
133
const redirect : RedirectOption | undefined = m . redirect
134
134
} )
135
135
0 commit comments