We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfa82b0 commit a1a4808Copy full SHA for a1a4808
src/views/layout/TabsView.vue
@@ -20,8 +20,15 @@
20
this.$store.dispatch('delVisitedViews', view)
21
$event.preventDefault()
22
},
23
+ generateRoute() {
24
+ if (this.$route.matched[this.$route.matched.length - 1].name) {
25
+ return this.$route.matched[this.$route.matched.length - 1]
26
+ }
27
+ this.$route.matched[0].path = '/'
28
+ return this.$route.matched[0]
29
+ },
30
addViewTabs() {
- this.$store.dispatch('addVisitedViews', this.$route.matched[this.$route.matched.length - 1])
31
+ this.$store.dispatch('addVisitedViews', this.generateRoute())
32
}
33
34
watch: {
0 commit comments