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

13 lines
164 B
JavaScript

export default {
add(state, { text }) {
state.list.push({
text,
done: false
})
},
toggle(state, todo) {
todo.done = !todo.done
}
}