refine demo

This commit is contained in:
Pan 2019-05-27 15:46:03 +08:00
parent 581e0d9d76
commit 040c9d8538
1 changed files with 7 additions and 0 deletions

View File

@ -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