vuex学习---mutation

更改vuex中的store中的状态的唯一方法是提交mutation, Mutation 必须是同步函数  store中的mutation代码如下; .vue页面中的代码如下;当点击按钮的时候,执行方法increment,通过this.$store.commit('increment') ,然后执行mutation中的increment方法,改变state中的count,页面中的count数值也会自
相关文章
相关标签/搜索