跨模块调用state
使用rootState调用根state,拿到对应模块下的state
actionFntion({
state, commit, rootState}){
console.log(rootState.moduleA.a)
}
跨模块调用其他模块mutation和action
moduleA_action(
跨模块调用state
使用rootState调用根state,拿到对应模块下的state
actionFntion({
state, commit, rootState}){
console.log(rootState.moduleA.a)
}
跨模块调用其他模块mutation和action
moduleA_action(