原文:在vue組件中訪問vuex模塊中的getters/action/state

store的結構: city模塊: 在各模塊使用了命名空間的情況下,即 namespaced: true時: 組件中訪問模塊里的state 傳統方法: 例如:this. store.state.city.list。 控制台輸出this. store.state mapState方法: 組件中dispatch模塊里的actions 傳統方法: 組件中使用如:this. store.dispatch ...

2019-11-14 00:01 0 2622 推薦指數:

查看詳情

vue組件訪問vuex模塊getters/action/state

store的結構: city模塊: 在各模塊使用了命名空間的情況下,即 namespaced: true 時: 組件訪問模塊里的state 傳統方法: 例如:this.$store.state.city.list。 控制台輸出 this. ...

Tue Mar 16 02:17:00 CST 2021 0 478
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM