关于vuex的赋值和取值相关问题积累
作者:互联网
摘自:https://blog.csdn.net/qq_44469200/article/details/103679882【深刻认识this.$store.dispatch() 与 this.$store.commit()的区别】
commit: 同步操作
this.$store.commit('changeValue',name)
this.$store.state.changeValue
dispatch: 异步操作
this.$store.dispatch('getlists',name)
this.$store.getters.getlists
标签:name,changeValue,vuex,dispatch,commit,getlists,取值,store,赋值 来源: https://www.cnblogs.com/Zhang-jin/p/14148019.html