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


问题如上图
代码如下:



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



以上,参考资料:

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 函数)


参考资料:

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。