Nuxt/examples/vuex-store-modules/store/articles.js
2017-03-25 23:04:34 +01:00

20 lines
268 B
JavaScript

export const state = {
list: [
'Lorem ipsum',
'dolor sit amet',
'consetetur sadipscing elitr'
]
}
export const mutations = {
add (state, title) {
state.list.push(title)
}
}
export const getters = {
get (state) {
return state.list
}
}