diff --git a/src/views/tab/index.vue b/src/views/tab/index.vue index da0291d7..6438a47a 100644 --- a/src/views/tab/index.vue +++ b/src/views/tab/index.vue @@ -35,6 +35,13 @@ export default { this.$router.push(`${this.$route.path}?tab=${val}`) } }, + created() { + // init the default selected tab + const tab = this.$route.query.tab + if (tab) { + this.activeName = tab + } + }, methods: { showCreatedTimes() { this.createdTimes = this.createdTimes + 1