[vuex] unknown mutation type:


vuex如果分為幾個模塊,方法是在模塊中的話,如果直接在組件中通過this.$store.commit("方法名")是獲取不到,必須要在前面加上模塊名,如this.$store.commit("模塊名/方法名")才可以獲取到。

同理:頁面中使用狀態量this.$store.commit("模塊名/狀態量")

 

 

 

 

 

 

https://blog.csdn.net/World_Mei/article/details/107661566?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase


免責聲明!

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



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