关于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

 

posted @ 2020-12-17 09:56  吾本人间一叶茶  阅读(780)  评论(0编辑  收藏  举报
Live2D