0
点赞
收藏
分享

微信扫一扫

解决 Vuex 报错 [vuex] unknown mutation type: XXXX

乱世小白 2022-01-06 阅读 63
vue.js前端

页面中这么存值,结果报错了 this.$store.commit('SET_FORM', this.ruleForm)

解决方法:可能项目中 store 是分模块写的,所以在调用模块里的办法时,要在办法名前加上模块名

更改为:this.$store.commit('user/SET_FORM', this.ruleForm)

举报

相关推荐

0 条评论