如何获取对象中的对象?

发布于 6 年前作者 bwei9708 次浏览最后编辑 6 年前来自 ask

获取对象中的非对象可以直接this.store.data.latitude,但是获取this.store.data.student是空,怎么取这个值

3 回复
guiying91
guiying911 楼5 年前

this.data.store吧

ping87
ping872 楼5 年前

let x = this.data.store.student || null 或者 let x = this.data.store.student ? this.data.store.student : null

xiuyingsu
xiuyingsu3 楼4 年前

确定不是异步?