Loading...

TypeError: Cannot read properties of undefined (reading ‘state‘)

写个刚好写个项目中要用到vuex在app里面挂载了一个player组件
main.js里也引用了这个store文件但报了一个Error in render: "TypeError: Cannot read properties of undefined (reading ‘state’)

import Storefrom'./store/index'import Vuefrom'vue'import Appfrom'./App.vue'import routerfrom'./router'import'./style/reset.css'// 引入重置样式import axiosfrom'./Utils/axios'import VueLazyloadfrom'vue-lazyload'// 将axios挂载到vue的原型上 组件继承实例 Vue.config.productionTip=falseVue.prototype.$axios= axios// 图片的懒加载 Vue.use(VueLazyload,{   preLoad:1.3,   error:'../public/favicon.ico',   loading:'../public/favicon.ico',   attempt:1});newVue({   router,   Store,render:h=>h(App)}).$mount('#app')

原因是这个store大写了,具体原因不太清楚,希望有大神能告知。