File tree Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default function (Vue) {
20
20
)
21
21
return
22
22
}
23
- let router = vm . $route . _router
23
+ let router = vm . $route . router
24
24
this . handler = ( e ) => {
25
25
if ( e . button === 0 ) {
26
26
e . preventDefault ( )
@@ -43,7 +43,7 @@ export default function (Vue) {
43
43
updateClasses : function ( path ) {
44
44
let el = this . el
45
45
let dest = this . destination
46
- let router = this . vm . $route . _router
46
+ let router = this . vm . $route . router
47
47
let activeClass = router . _linkActiveClass
48
48
let exactClass = activeClass + '-exact'
49
49
if ( path . indexOf ( dest ) === 0 && path !== '/' ) {
@@ -62,7 +62,7 @@ export default function (Vue) {
62
62
this . destination = path
63
63
this . updateClasses ( this . vm . $route . path )
64
64
path = path || ''
65
- let router = this . vm . $route . _router
65
+ let router = this . vm . $route . router
66
66
let isAbsolute = path . charAt ( 0 ) === '/'
67
67
// do not format non-hash relative paths
68
68
let href = router . mode === 'hash' || isAbsolute
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export default function (Vue) {
37
37
// all we need to do here is registering this view
38
38
// in the router. actual component switching will be
39
39
// managed by the pipeline.
40
- let router = this . router = route . _router
40
+ let router = this . router = route . router
41
41
router . _views . unshift ( this )
42
42
43
43
// note the views are in reverse order.
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export default function (Vue) {
8
8
Vue . prototype . $addChild = function ( opts , Ctor ) {
9
9
10
10
let route = this . $route
11
- let router = route && route . _router
11
+ let router = route && route . router
12
12
13
13
// inject meta
14
14
if ( router ) {
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ export default class Route {
9
9
10
10
constructor ( path , router ) {
11
11
this . path = path
12
+ this . router = router
13
+
12
14
let matched = router . _recognizer . recognize ( path )
13
15
14
16
this . query = matched
@@ -27,15 +29,6 @@ export default class Route {
27
29
: { }
28
30
29
31
// private stuff
30
- this . _aborted = false
31
- def ( this , '_matched' , matched || router . _notFoundHandler )
32
- def ( this , '_router' , router )
32
+ this . _matched = matched || router . _notFoundHandler
33
33
}
34
34
}
35
-
36
- function def ( obj , key , val ) {
37
- Object . defineProperty ( obj , key , {
38
- value : val ,
39
- enumerable : false
40
- } )
41
- }
You can’t perform that action at this time.
0 commit comments