报错信息

[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
报错原因是因为用的是运行时版本的vue, 模版编译器不可用。

解决方案:

使用完整版的Vue

在根目录下建立一个vue.config.js 文件,配置属性runtimeCompiler(运行时编译器)默认情况下是false 改为true
vue You are using the runtime-only build of Vue where the template compiler is not available.

相关文章: