通过mutations修改state状态
this.$store.commit('mutations中的方法')
const store = new Vuex.Store({ state: { counter: 100 }, mutations: { //方法 increment(state){ state.counter++; }, decrement(state){ state.counter--; } } })
标签:const,counter,mutations,state,vuex,store From: https://www.cnblogs.com/ixtao/p/16925891.html