fix:fix tabsView path bug
This commit is contained in:
parent
74cbb26209
commit
660ff765f5
1 changed files with 7 additions and 4 deletions
|
@ -30,13 +30,16 @@ export default {
|
|||
$event.preventDefault()
|
||||
},
|
||||
generateRoute() {
|
||||
if (this.$route.matched[this.$route.matched.length - 1].name) {
|
||||
return this.$route.matched[this.$route.matched.length - 1]
|
||||
if (this.$route.name) {
|
||||
return this.$route
|
||||
}
|
||||
this.$route.matched[0].path = '/'
|
||||
return this.$route.matched[0]
|
||||
return false
|
||||
},
|
||||
addViewTabs() {
|
||||
const route = this.generateRoute()
|
||||
if (!route) {
|
||||
return false
|
||||
}
|
||||
this.$store.dispatch('addVisitedViews', this.generateRoute())
|
||||
},
|
||||
isActive(path) {
|
||||
|
|
Loading…
Reference in a new issue