SoFunction
Updated on 2025-04-05

Examples of vuex storage and value acquisition

Get value in component

 computed: {  
  value() {
   return this.$;
  }
 },

Component memory value

methods: { 
   fn() {   
       this.$('setValue',xxx)    
     }      
  }

The store is in the middle

 setValue(state,xxx){
  = xxx;
 },

The store is in the middle

const state = {
 
 userData: {
  
  "xxx":{}
 }
}

The above example of vuex storage and value acquisition is all the content I share with you. I hope you can give you a reference and I hope you can support me more.