vuex中mutations與actions的區別

要執行vuex中的函數,有兩種方法:   1.commit,例如this.$store.commit("GETMODULESELECTLIST");    //mutations中的方法   2.dispatch,例如 this.$store.dispatch("getModuleSelectList");      //actions中的方法 兩者之間的區別在於:   commit是提交執行mu
相關文章
相關標籤/搜索