From 581e0d9d769d59b703a153421b205d21ccb8e744 Mon Sep 17 00:00:00 2001 From: Pan Date: Tue, 21 May 2019 10:17:08 +0800 Subject: [PATCH] add demo --- src/layout/components/AppMain.vue | 2 +- src/views/tab/index.vue | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 9e12c662..a8976380 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -16,7 +16,7 @@ export default { return this.$store.state.tagsView.cachedViews }, key() { - return this.$route.fullPath + return this.$route.path } } } diff --git a/src/views/tab/index.vue b/src/views/tab/index.vue index e5746580..da0291d7 100644 --- a/src/views/tab/index.vue +++ b/src/views/tab/index.vue @@ -30,6 +30,11 @@ export default { createdTimes: 0 } }, + watch: { + activeName(val) { + this.$router.push(`${this.$route.path}?tab=${val}`) + } + }, methods: { showCreatedTimes() { this.createdTimes = this.createdTimes + 1