Skip to content

Commit 040c9d8

Browse files
committed
refine demo
1 parent 581e0d9 commit 040c9d8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/views/tab/index.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ export default {
3535
this.$router.push(`${this.$route.path}?tab=${val}`)
3636
}
3737
},
38+
created() {
39+
// init the default selected tab
40+
const tab = this.$route.query.tab
41+
if (tab) {
42+
this.activeName = tab
43+
}
44+
},
3845
methods: {
3946
showCreatedTimes() {
4047
this.createdTimes = this.createdTimes + 1

0 commit comments

Comments
 (0)