繁华开满天机
//vuex/module.jstest(context,data){
setTimeout(()=>{
context.commit('updateActiveName',data); //调用父级的 actions 或者 mutations
context.commit('setLocation',{key_root:data},{root:true});
context.dispatch('updateLocation',{key_root:data},{root:true});
},10);
}page.vuecreated(){ //vuex mutation
this.$store.commit('setLocation',{key1:"mutation"}); //vuex module mutation
this.$store.commit('filter/updateActiveName',"filter/mutation"); //vuex action
this.$store.dispatch('updateLocation',{key2:"action"}); //vuex module actions
this.$store.dispatch('filter/test',"filter/actions");
}