Home
Sign Up
Sign In
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member
Sign In
V2EX
›
问与答
mounted()和通过 ...mapState 实现的 computed 执行顺序
kgloveyou
·
Aug 7, 2018
· 2751 views
This topic created in 2825 days ago, the information mentioned may be changed or developed.
computed:{
...mapState(
mapStore.name
, ['mapInstance']),
...mapState(
mapStore.name
, ['mapConfig']),
},
利用上述代码从 store 中读取了 computed 属性值
mounted(){
if(this.mapInstance){
...
}
},
在 mounted 中却获取不到 mapInstance,提示未定义。
这里该怎么读取?
No Comments Yet
computed
mapstate
mounted
读取
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
2566 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 29ms ·
UTC 06:09
·
PVG 14:09
·
LAX 23:09
·
JFK 02:09
♥ Do have faith in what you're doing.
❯