Vuex 使用了 module 后的访问方法 ..
生活随笔
收集整理的這篇文章主要介紹了
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)
?
?
轉載于:https://www.cnblogs.com/whm-blog/p/10089157.html
總結
以上是生活随笔為你收集整理的Vuex 使用了 module 后的访问方法 ..的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 第二次博客作业
- 下一篇: Jmeter-接口测试相关