vue store存储commit 和dispatch

this.$store.commit('toShowLoginDialog', true); this.$store.dispatch('toShowLoginDialog',false)   主要区别是:异步 dispatch:含有异步操做,例如向后台提交数据,写法: this.$store.dispatch('mutations方法名',值)this commit:同步操做,写法:this.$
相关文章
相关标签/搜索