首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX 提问指南
广告
V2EX
›
问与答
mounted()和通过 ...mapState 实现的 computed 执行顺序
kgloveyou
·
2018-08-07 09:14:43 +08:00
· 2416 次点击
这是一个创建于 2089 天前的主题,其中的信息可能已经有所发展或是发生改变。
computed:{
...mapState(
mapStore.name
, ['mapInstance']),
...mapState(
mapStore.name
, ['mapConfig']),
},
利用上述代码从 store 中读取了 computed 属性值
mounted(){
if(this.mapInstance){
...
}
},
在 mounted 中却获取不到 mapInstance,提示未定义。
这里该怎么读取?
目前尚无回复
computed
mapstate
mounted
读取
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
我们的愿景
·
实用小工具
·
2459 人在线
最高记录 6543
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms ·
UTC 16:05
·
PVG 00:05
·
LAX 09:05
·
JFK 12:05
Developed with
CodeLauncher
♥ Do have faith in what you're doing.