[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')

  

posted on 2021-12-12 10:46  水行者  阅读(18697)  评论(0编辑  收藏  举报

导航