8000 0.3.0-alpha.3版本Global Store存在Bug · Issue #21 · herculesJS/herculex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

0.3.0-alpha.3版本Global Store存在Bug #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mooooooonkey opened this issue Jan 21, 2020 · 1 comment
Open

0.3.0-alpha.3版本Global Store存在Bug #21

mooooooonkey opened this issue Jan 21, 2020 · 1 comment

Comments

@mooooooonkey
Copy link

全局store:
mutations:{
SET_USERNAME(state,payload){
return state.setIn(['userInfo','userName'],payload)
}
},
actions: {
async queryUserInfo({commit,state},param){
let data= await queryUser()
commit("SET_USERNAME",data.userName+moment().format("YYYY-MM-DD HH:mm:ss"))
}
}
局部store:
getters:{
userName:(state, getters, global)=>{return global.getIn(['userInfo','userName'],'匿名')},
},
页面:
onLoad(query) {
let vm = this
vm.dispatch("$global:queryUserInfo")
// 页面加载
},

name:{{$getters.userName}}

版本0.3.0-alpha.3数据更新了,但是没有通知到前台
版本0.2.11-beta.2没有问题
请问目前最稳定的版本是什么,谢谢~

@bingjianguo
Copy link
Collaborator

目前最稳定的是 0.2.15版本,0.3.x作为试验品,都是alpha版本,不太建议使用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0