报错:vuex报错 this.$store显示undefined,使用vuex保存数据时,发现this.$store是undefined,
打印this,发现没有$store属性。
可能存在的问题
1. Whether the Vuex instance object in the store file is exposed
2. Is the store injected into main.js?
3. If all the above are OK, open package.json and check the versions of vue and vuex
.
Enough!
npm install [email protected] --save