问题:Property or method "$store" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
原因:版本不对。默认安装的vuex最新的版本,我使用的是vue2,版本不兼容。
解决:npm install vuex@3 --save
效果: