Vue项目用了脚手架vue-cli3.0,会报错You are using the runtime-only build of Vue where the template compiler is not available

报错信息如下图:

报错原因是:vue有两种形式的代码:一种是compiler(模版),另一种是runtime(运行时)模式。

修改方法:修改main.js ,对照自己的代码模式对号入座

猜你喜欢

转载自www.cnblogs.com/wpcnblog/p/11356495.html