File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ export default {
14
14
} ,
15
15
append : Boolean ,
16
16
replace : Boolean ,
17
- activeClass : {
18
- type : String ,
19
- default : 'router-link-active'
20
- }
17
+ activeClass : String
21
18
} ,
22
19
render ( h ) {
23
20
const router = this . $router
@@ -28,7 +25,8 @@ export default {
28
25
const base = router . history . base
29
26
const href = base ? cleanPath ( base + fullPath ) : fullPath
30
27
const classes = { }
31
- classes [ this . activeClass ] = isSameLocation ( resolved , this . $route )
28
+ const activeClass = this . activeClass || router . _options . linkActiveClass || 'router-link-active'
29
+ classes [ activeClass ] = isSameLocation ( resolved , this . $route )
32
30
33
31
return h ( this . tag , {
34
32
attrs : { href } ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { inBrowser, supportsHistory } from './util/dom'
8
8
export default class VueRouter {
9
9
constructor ( options = { } ) {
10
10
this . _rootComponent = null
11
- this . _activeViews = [ ]
11
+ this . _options = options
12
12
13
13
this . match = createMatcher ( options . routes || [ ] )
14
14
You can’t perform that action at this time.
0 commit comments