Nuxt/examples/vuex-store-modules/store/articles.js

20 lines
268 B
JavaScript
Raw Normal View History

2017-03-25 22:04:34 +00:00
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
}
}