File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export default {
23
23
const base = router . history . base
24
24
const href = base ? cleanPath ( base + fullPath ) : fullPath
25
25
const classes = { }
26
- const activeClass = this . activeClass || router . _options . linkActiveClass || 'router-link-active'
26
+ const activeClass = this . activeClass || router . options . linkActiveClass || 'router-link-active'
27
27
classes [ activeClass ] = this . exact
28
28
? current . path === resolved . path
29
29
: current . path . indexOf ( resolved . path ) === 0
Original file line number Diff line number Diff line change @@ -7,9 +7,8 @@ import { inBrowser, supportsHistory } from './util/dom'
7
7
8
8
export default class VueRouter {
9
9
constructor ( options = { } ) {
10
- this . _rootComponent = null
11
- this . _options = options
12
-
10
+ this . app = null
11
+ this . options = options
13
12
this . match = createMatcher ( options . routes || [ ] )
14
13
15
14
let mode = options . mode || 'hash'
@@ -19,7 +18,7 @@ export default class VueRouter {
19
18
if ( ! inBrowser ) {
20
19
mode = 'abstract'
21
20
}
22
- this . _mode = mode
21
+ this . mode = mode
23
22
24
23
switch ( mode ) {
25
24
case 'history' :
@@ -36,7 +35,7 @@ export default class VueRouter {
36
35
}
37
36
38
37
this . history . listen ( location => {
39
- this . _rootComponent . _route = location
38
+ this . app . _route = location
40
39
} )
41
40
}
42
41
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export function install (Vue) {
14
14
beforeCreate ( ) {
15
15
if ( this . $options . router ) {
16
16
this . _router = this . $options . router
17
- this . _router . _rootComponent = this
17
+ this . _router . app = this
18
18
Vue . util . defineReactive ( this , '_route' , this . _router . history . current )
19
19
}
20
20
}
You can’t perform that action at this time.
0 commit comments