vue 中的 this.$store.commit

一直不明白 this.$store.commit 这个方法干了啥!vue 好比这行代码web this.$store.commit('login', data); 能够看看下面(在vuex中也就是store 文件夹下面的 index.js 中):vuex new Vuex.Store({ mutations:{ login(state, user){ state.user =
相关文章
相关标签/搜索