status can be obtained and has been tinkering with for a long time. Do not know how to call mutations, getters and actions defined in the module?
const mA = {
state : {
a : 1,
b : 1,
},
// mutations
mutations : {
add : state =>{
state.aPP
},
},
getters : {
double : state=> {
return state.a *2
}
}
}
const mB = {
state : {
a : 2,
b : 2,
},
// mutations
mutations: {
addB: state => {
state.aPP
},
},
// actions
actions : {
asyncAdd : ({commit, rootState ,state}) =>{
setTimeout(() => {
commit("add");
}, 1000);
}
}
}
const store = new Vuex.Store({
modules : {
a : mA,
b : mB,
}
});
console.log(store.state.a);