1.错误详情
2. 错误分析
百度此错误发现,很多人可能忘记在main.js中引入store.js并挂载在vue实例上,或者state单词写错了
我审查了很多遍代码,依然报错,读取不到state中的数据,后来想到可能是版本的问题
此项目是vue2,要使用vuex3才能正常运行,我安装的时候没有指定版本,直接装的是最新的vuex4版本,因此库版本不一致导致不能正常运行
3.错误解决
更改vuex为3版本的
cnpm install --save vuex@3
??可以正确读取到state中的数据✔✔✔
- quot properties TypeError undefined readingproperties typeerror undefined reading quot properties typeerror undefined properties typeerror undefined uncaught properties undefined reading cannot typeerror non-mysql undefined property properties typeerror reading cannot typeerror undefined property cannot typeerror undefined property webpack typeerror undefined property upgrade typeerror undefined uncaught property