vue踩坑 导出new Vue.Store首字母要大写

 

  

控制台报错  : Uncaught TypeError: vuex__WEBPACK_IMPORTED_MODULE_6__.default.store is not a constructor

根据报错原因:

   这个报错是_vuex2.default.store 不是一个构造函数因为我们用vuex的时候需要将用到的actions,mutations模块最终导出,在导出的时候

new Vuex.Store中的Store小写了,这里的一定要大写,就相当于我们在使用构造函数(类)的时候首字母要大写。

猜你喜欢

转载自www.cnblogs.com/sna-ling/p/11651252.html