[Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'state')"

 

 

 异常:[Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'state')"

出现这个bug的原因是没在main.js中引入store.js并挂载在vue实例上

 

import Vue from 'vue'
import App from './App.vue'
import store from './store'


Vue.config.productionTip = false

new Vue({
  store,
  render: h => h(App),
}).$mount('#app')

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
  • 2021-08-04
  • 2021-07-29
  • 2022-01-16
  • 2021-05-21
猜你喜欢
  • 2021-09-06
  • 2021-05-05
  • 2022-12-23
  • 2021-08-06
  • 2021-07-10
  • 2021-05-26
  • 2022-12-23
相关资源
相似解决方案