Vuex 使用了 module 后的訪問方法 ..


如果 使用了  module 和 namespace  

state 數據:=>   this.$store.state.User.info  (user 是模塊名字. info 是 state 里面的屬性名字)

getters 數據: => this.$store.getters['User/getUserInfo']    (user namespace,模塊名,  getUserInfo 是 getter 的名字)

mutations  =>   this.$store.commit( 'AppKeepAlive/remove', name);   (AppKeepAlive 模塊名, remove方法名,  name 是荷載數據 payload)

 

 

 
         
         
       


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM