<p>{{info.account}}</p>
data () { return {
info: {
account: null
},
mini: false,
adminActive: true
}
}
created () {
Bus.$on('login-on', id => { this.$http.get("http://localhost:8088/api/login/searchAccount?account=" + id).then((response) => {
let res = response.data this.info = res.data console.log(this.info) //能获取到数据
})
.catch((reject) => { console.log(reject)
})
})
}
mounted () { console.log(this.info.account) //undefined}请问我应该怎样才能渲染出info.account
这是this.info打印出的数据

慕森王
BIG阳
随时随地看视频慕课网APP
相关分类