Skip to content
Snippets Groups Projects
Commit 660ff765 authored by Pan's avatar Pan
Browse files

fix:fix tabsView path bug

parent 74cbb262
No related branches found
No related tags found
No related merge requests found
...@@ -30,13 +30,16 @@ export default { ...@@ -30,13 +30,16 @@ export default {
$event.preventDefault() $event.preventDefault()
}, },
generateRoute() { generateRoute() {
if (this.$route.matched[this.$route.matched.length - 1].name) { if (this.$route.name) {
return this.$route.matched[this.$route.matched.length - 1] return this.$route
} }
this.$route.matched[0].path = '/' return false
return this.$route.matched[0]
}, },
addViewTabs() { addViewTabs() {
const route = this.generateRoute()
if (!route) {
return false
}
this.$store.dispatch('addVisitedViews', this.generateRoute()) this.$store.dispatch('addVisitedViews', this.generateRoute())
}, },
isActive(path) { isActive(path) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment