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