vuex如果分为几个模块,方法是在模块中的话,如果直接在组件中通过this.$store.commit("方法名")是获取不到,必须要在前面加上模块名,如this.$store.commit("模块名/方法名")才可以获取到。

同理:页面中使用状态量this.$store.commit("模块名/状态量")

[vuex] unknown mutation type:

 

 

[vuex] unknown mutation type:

 

 [vuex] unknown mutation type:

 

 

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

相关文章:

  • 2021-06-07
  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-27
  • 2021-04-10
  • 2022-12-23
  • 2021-12-23
  • 2021-12-28
  • 2021-09-09
  • 2022-12-23
相关资源
相似解决方案