Nuxt/examples/vuex-store/store/todos/mutations.js

13 lines
166 B
JavaScript
Raw Normal View History

export default {
add (state, { text }) {
2016-12-25 20:16:30 +00:00
state.list.push({
text,
done: false
})
},
toggle (state, todo) {
2016-12-25 20:16:30 +00:00
todo.done = !todo.done
}
}