vuex中的dispatch和commit的使用

dispatch 异步操作 this.$store.dispatch('actions的方法',arg)

commit 同步操作 this.$store.commit('mutations的方法',arg)

猜你喜欢

转载自blog.csdn.net/qq_39039128/article/details/87187814