Getters参数列表
getters:{
count(state, getters, rootState, rootGetters){
//...
return
}
}
Mutations参数列表
mutations:{
doMutation(state, payload){
//...
state.someData = payload.someData
}
}
Actions参数列表
actions:{
doSth({state, rootState, getters, rootGetters, dispatch, commit}, ...args){
//args为调用该函数传入的参数列表
dispatch("moduleName/moduleAction", {...args}, {root:true});
}
}
网友评论