fix: console error when toggle page

Issue #4
Close #4
This commit is contained in:
chenghx 2018-08-10 09:47:20 +08:00
parent cd988e20ab
commit 74f9727340

View File

@ -21,7 +21,7 @@ export default {
extraImage: ''
}
},
mounted () {
beforeMount () {
this.getPageHeaderInfo()
},
updated () {
@ -31,9 +31,11 @@ export default {
getPageHeaderInfo () {
this.title = this.$route.name
const page = this.$refs.page
this.desc = page.desc
this.linkList = page.linkList
this.extraImage = page.extraImage
if (page) {
this.desc = page.desc
this.linkList = page.linkList
this.extraImage = page.extraImage
}
}
}
}