We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a76a0ce commit e6dced2Copy full SHA for e6dced2
src/directives/link.js
@@ -1,4 +1,5 @@
1
import { warn } from '../util'
2
+const trailingSlashRE = /\/$/
3
const regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g
4
5
// install v-link, which provides navigation support for
@@ -100,7 +101,14 @@ export default function (Vue) {
100
101
}
102
// add new class
103
if (this.exact) {
- if (path === dest) {
104
+ if (
105
+ dest === path ||
106
+ (
107
+ // also allow additional trailing slash
108
+ dest.charAt(dest.length - 1) !== '/' &&
109
+ dest === path.replace(trailingSlashRE, '')
110
+ )
111
+ ) {
112
_.addClass(el, activeClass)
113
} else {
114
_.removeClass(el, activeClass)
0 commit comments