Commit 660ff765 authored by Pan's avatar Pan

fix:fix tabsView path bug

parent 74cbb262
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment