vue store 存儲 dispatch 和 commit的區別

dispatch: 含有異步操做 存儲:javascript this.$store.dispatch('initUserInfo',friend); 取值:java this.$store.getters.userInfo; commit:同步操做 存儲:web this.$store.commit('initUserInfo',friend); 取值:異步 this.$store.state.
相關文章
相關標籤/搜索