Nuxt/examples/vuex-store/store/articles.js
2019-02-19 09:35:51 +00:00

20 lines
274 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
}
}