
Vue2数据管理插件vuex使用方法
mapMutations('模块名',{ 要改的名字: '名字'})$store.commit('模块名/方法名')(mutations)$store.dispatch('模块名/方法名')(actions)$store.getters['模块名/方法名'] (getter)mapActions('模块名',{ 要改的名字: '名字'})mapState('模块名', { 要改的名字: '名字'})mapGetters('模块名',{要改的名字: '名字'})作用:方便做不同组件的传值。









