You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
475 B

export const moduleA = {
state: {
state_a: 1,
},
getters: {
getter_a: (state) => {
return state.state_a + 10;
}
},
mutations: {
mutation_a(state, payload) {
state.state_a += payload.num;
}
},
actions: {
action_a(content, payload) {
if (content.state.state_a > 50) {
content.commit('mutation_a', {num: payload.num})
}
}
}
}