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) {
2020 )
2121 return
2222 }
23- let router = vm . $route . _router
23+ let router = vm . $route . router
2424 this . handler = ( e ) => {
2525 if ( e . button === 0 ) {
2626 e . preventDefault ( )
@@ -43,7 +43,7 @@ export default function (Vue) {
4343 updateClasses : function ( path ) {
4444 let el = this . el
4545 let dest = this . destination
46- let router = this . vm . $route . _router
46+ let router = this . vm . $route . router
4747 let activeClass = router . _linkActiveClass
4848 let exactClass = activeClass + '-exact'
4949 if ( path . indexOf ( dest ) === 0 && path !== '/' ) {
@@ -62,7 +62,7 @@ export default function (Vue) {
6262 this . destination = path
6363 this . updateClasses ( this . vm . $route . path )
6464 path = path || ''
65- let router = this . vm . $route . _router
65+ let router = this . vm . $route . router
6666 let isAbsolute = path . charAt ( 0 ) === '/'
6767 // do not format non-hash relative paths
6868 let href = router . mode === 'hash' || isAbsolute
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export default function (Vue) {
3737 // all we need to do here is registering this view
3838 // in the router. actual component switching will be
3939 // managed by the pipeline.
40- let router = this . router = route . _router
40+ let router = this . router = route . router
4141 router . _views . unshift ( this )
4242
4343 // 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) {
88 Vue . prototype . $addChild = function ( opts , Ctor ) {
99
1010 let route = this . $route
11- let router = route && route . _router
11+ let router = route && route . router
1212
1313 // inject meta
1414 if ( router ) {
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ export default class Route {
99
1010 constructor ( path , router ) {
1111 this . path = path
12+ this . router = router
13+
1214 let matched = router . _recognizer . recognize ( path )
1315
1416 this . query = matched
@@ -27,15 +29,6 @@ export default class Route {
2729 : { }
2830
2931 // private stuff
30- this . _aborted = false
31- def ( this , '_matched' , matched || router . _notFoundHandler )
32- def ( this , '_router' , router )
32+ this . _matched = matched || router . _notFoundHandler
3333 }
3434}
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