mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 09:04:28 +00:00
render router-link in menu only if current route was matched by router, comment out fallback route
This commit is contained in:
@@ -9,6 +9,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isRouterHandled() {
|
||||
let isrouterhandled = this.$route.matched.length > 0;
|
||||
return isrouterhandled;
|
||||
},
|
||||
isCompatLink() {
|
||||
if(this.href === null) {
|
||||
return false;
|
||||
@@ -20,7 +24,7 @@ export default {
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<router-link v-if="this.isCompatLink()"
|
||||
<router-link v-if="this.isRouterHandled() && this.isCompatLink()"
|
||||
:to="this.calcCompatRouterLink()"
|
||||
>
|
||||
<slot></slot>
|
||||
|
||||
Reference in New Issue
Block a user