Alex_TD

vuex状态管理 ---store
export default new Vue.Store({
state: {
        count:0,
      },
      mutations: {
       
      },
      actions: {
        
      },
    modules:{
    } })
import {mapStates,mapMutations,mapActions} from 'vuex'
this.$store.state.count
this.%store.dispatch(actions)
this.$store.commit(mutations)

 

posted on 2020-03-15 20:29  Alex_TD  阅读(96)  评论(0编辑  收藏  举报