尽大可能的简化vuex的调用和执行过程
<input :value="message" @input="updateMessage">
computed: {
...mapState({
message: state => state.obj.message
})
},
methods: {
updateMessage (e) {
this.$store.commit('updateMessage', e.target.value)
}
}
mutations: {
updateMessage (state, message) {
state.obj.message = message
}
}