vue error:The template root requires exactly one element.
error:[vue/valid-template-root]
The template root requires exactly one element.
原因:
因为vue的模版中只有能一个根节点,所以在<template>中插入第二个元素就会报错
解决方案:
将<template>中的元素先用一个<div>包起来。
<template>
<div>
<p>123</p>
<p>456</p>
</div>
</template>

vue error:The template root requires exactly one element.的更多相关文章
- The template root requires exactly one element
The template root requires exactly one element
- 在Vue+element 开发中报: The template root requires exactly one elemen 错的解决和原因
一.我正准备使用Vue + Element进行新的项目开发,然后在进行添加下一个组件时报错 二.解决及原因: 原来template中只允许模板里存在一个根节点,在 template 中添加一个 &l ...
- Vue入门之旅:一报错 Unknown ... make sure to provide the "name" option及error compiling template
报错一: Unknown custom element: <custom-select> - did you register the component correctly? For r ...
- 聊聊Vue.js的template编译
写在前面 因为对Vue.js很感兴趣,而且平时工作的技术栈也是Vue.js,这几个月花了些时间研究学习了一下Vue.js源码,并做了总结与输出. 文章的原地址:https://github.com/a ...
- org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/ template might not exist or might not be accessible by any of the configured
异常现象:在本地打包部署完全没有问题,资源文件也都可以映射上,但是打包成jar包部署到服务器上时,就一直报异常,异常信息如下: 严重: Servlet.service() for servlet [d ...
- [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.
转载自:https://segmentfault.com/a/1190000006435886 解决办法:添加package.config.js配置文件中,添加本文章的红色部分代码 import vu ...
- Vue学习笔记 template methods,filters,ChromeDriver,安装sass
ChromeDriver installation failed Error with http(s) request: Error: connect ETIMEDOUT 172.217.160.80 ...
- 在执行gem install redis时 : ERROR: Error installing redis: redis requires Ruby version >= 2.2.2
在执行gem install redis时 提示: gem install redis ERROR: Error installing redis: redis requires Ruby versi ...
- Error: Bootstrap's JavaScript requires jQuery错误
引入bootstrap时会出现的问题:boostrap下拉菜单无效,浏览器报Uncaught Error: Bootstrap's JavaScript requires jQuery错误, 解决办法 ...
随机推荐
- mac查看当前调用tcp的进程并关闭指定进程
查看所有tcp进程 监听的端口 lsof -iTCP -sTCP:LISTEN 查看指定端口信息 lsof -i: 关闭指定进程 kill -
- Redis学习笔记:与SpringBoot结合使用
首先需要在pom文件中导入相应的Redis依赖(版本可以会变化,下面坐标也可能会变化) <dependency> <groupId>org.springframework.bo ...
- Python从入门到精通之Forth!
Python基本数据类型之列表 补充:range()方法 python2: range 立即创建 xrange for循环的时候才一个一个创建 Python3: range for循环的 ...
- Atcoder Beginner Contest 115 D Christmas 模拟,递归 B
D - Christmas Time limit : 2sec / Memory limit : 1024MB Score : 400 points Problem Statement In some ...
- HDU 6348 序列计数 (树状数组 + DP)
序列计数 Time Limit: 4500/4000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Subm ...
- JavaScript基础视频教程总结(101-110章)
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...
- Android从入门到进阶——布局
一.组件 1.UI组件 (Android.view.View的子类或者间接子类) 2.容器组件(Android.view.ViewGroup子类或者间接子类) 二.UI组件:TextView,Spin ...
- CSS3新增特性及知识学习线路
- MapGIS DataStore
http://www.mapgis.com/index.php/index-show-tid-206.html 异构数据同时加载 DCServer感觉已经集成到 IGServer中了. >> ...
- ajax提交数组至后台,无法获取值得问题
$(".delAll_btn").click(function(){ var checkStatus = table.checkStatus('userList'), data = ...