this.$store.dispatch('toShowLoginDialog',false) this.$store.commit('toShowLoginDialog', true);
主要区别是:
dispatch
this.$store.dispatch('action方法名',值)
commit
this.$store.commit('mutations方法名',值)
《Vue进阶(四十三):Vuex之理解Mutations》
《Vue进阶(七十三):vuex中store存储store.commit和store.dispatch的区别及用法》