mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-18 03:35:17 +00:00
19 lines
336 B
JavaScript
19 lines
336 B
JavaScript
|
export default function ({ store }) {
|
||
|
store.registerModule('simpleModule', {
|
||
|
namespaced: true,
|
||
|
state: () => ({
|
||
|
mutateMe: 'not mutated'
|
||
|
}),
|
||
|
actions: {
|
||
|
mutate({ commit }) {
|
||
|
commit('mutate')
|
||
|
}
|
||
|
},
|
||
|
mutations: {
|
||
|
mutate(state) {
|
||
|
state.mutateMe = 'mutated'
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
}
|