· 获取vuex state中的count数据方法有:
方法1: this.$store.state.count 直接使用;
方法2:`import { mapState } from vuex `
然后把`...mapState('count')放入computed中`,然后直接使用count变量。
· 获取vuex getters中getCount数据的方法:
方法1: this.$store.getters.getCount直接使用。
方法2:`import { mapGetters } from vuex `
然后把`...mapGetters ('getCount')放入computed中`,然后直接使用getCount变量。
 
             
             
       
      
 
                   
                   
                   
                   
     
     
    
 
                     
                     
                     
                     
                     
                     
                     
                     
       
         京公网安备 11010802030320号
京公网安备 11010802030320号