mirror of
https://github.com/bitinflow/ui.git
synced 2026-03-13 05:35:59 +00:00
Add exact link
This commit is contained in:
@@ -22,12 +22,19 @@ export default {
|
||||
href: {
|
||||
type: String,
|
||||
default: '/'
|
||||
},
|
||||
exact: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
calculateClasses: function () {
|
||||
return {
|
||||
'router-link-active': document.location.href.includes(this.href) && this.href !== '/',
|
||||
'router-link-active':
|
||||
this.exact
|
||||
? document.location.href === this.href
|
||||
: document.location.href.includes(this.href) && this.href !== '/',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user