异常:[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')