You are using the runtime-only build of Vue where the template compiler is not available

You are using the runtime-only build of Vue where the template compiler is not available_第1张图片

问题如上图
代码如下:


You are using the runtime-only build of Vue where the template compiler is not available_第2张图片

注意红圈标注的地方!
解决方案如下:


You are using the runtime-only build of Vue where the template compiler is not available_第3张图片

以上,参考资料:

https://www.cnblogs.com/steamed-twisted-roll/p/11796480.html

由此了解,vue有两种代码模式:Runtime + Compiler和Runtime-only
Runtime + Compiler: recommended for most users
(运行程序+编译器:推荐给大多数用户)
· Runtime-only: about 6KB lighter min+gzip, but templates (or any Vue-specificHTML) are ONLY allowed in .vue files - render functions are required elsewhere
(仅运行程序: 比上面那种模式轻大约 6KB min+gzip,但是 template (或任何特定于vue的html)只允许在.vue文件中使用——其他地方用需要 render 函数)

You are using the runtime-only build of Vue where the template compiler is not available_第4张图片

参考资料:

https://blog.csdn.net/qq_40938301/article/details/104357910

你可能感兴趣的:(You are using the runtime-only build of Vue where the template compiler is not available)