Skip to content

Commit 581e0d9

Browse files
committed
add demo
1 parent 131b9b9 commit 581e0d9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/layout/components/AppMain.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
return this.$store.state.tagsView.cachedViews
1717
},
1818
key() {
19-
return this.$route.fullPath
19+
return this.$route.path
2020
}
2121
}
2222
}

src/views/tab/index.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ export default {
3030
createdTimes: 0
3131
}
3232
},
33+
watch: {
34+
activeName(val) {
35+
this.$router.push(`${this.$route.path}?tab=${val}`)
36+
}
37+
},
3338
methods: {
3439
showCreatedTimes() {
3540
this.createdTimes = this.createdTimes + 1

0 commit comments

Comments
 (0)