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错误, 解决办法 ...
随机推荐
- 《修炼之道:.NET开发要点精讲》读书笔记(三)
后几章的习题 1.异步调用开始后,什么时候才能使用异步执行的结果? A:最好在EndInvoke()方法返回之后才能使用异步执行的结果,其它时候不能保证异步调用已完成. 2.委托的异步调用开始后(即调 ...
- Linux无法正常连接服务器,无法连接上 127.0.0.1:8989 (127.0.0.1)。 - connect (111: 拒绝连接)
最近修改了下电脑的hosts文件,电脑就突然不能连接下载更新的服务器了,但是浏览器还能正常上网,这让我很是难受啊!!! 错误现象如下: 错误:1 http://archive.ubuntukylin. ...
- CRT-常用命令
1 目录操作 mkdir a ;(新建文件夹) mkdir -p a/b;(新建多及目录文件夹) Rmdir a (a只能是空目录) Rmdir -p a (a可以是多级目录) 2 文件操作 touc ...
- HDU4521
一个改变的最长上升子序列(LIS),这种题型做的很少,今天做起来很费劲,查了很多资料,还把最基础的LIS补了一遍,具体的看代码吧,我把思路都放在了注释里面 #include<iostream&g ...
- W7500S2E串口转以太网
概述 W7500S2E是一系列串口转以太网模块,支持TCP Server.TCP Client和UDP三种工作模式,串口波特率最高可达460,800bps,并提供配套的上位机配置软件,也可通过网页或A ...
- C++标准库第二版笔记 3 和异常的理解 1
C++标准库第二版笔记 3 和异常的理解 1 差错和异常(error and exception)的处理 标准异常类(exception class) 定义于 分为: 1.语言本身支持的异常 2.标准 ...
- 绑定hover事件
<label> <span id="pattern">实战模式</span> <div class='tab' style="t ...
- Django模板继承和引用
一.模板继承 1.模板继承可以在创建一个基本“骨架”后,被其它子模板继承并覆盖,通过修改基础模板可以修改子模板中的所有框架 2.在模板teacher文件夹下创建基础模板 {% block xxx}与{ ...
- Android手机插上usb能充电但不能识别的一种解决方法
设备要求 已root的Android手机. 背景 这个方法是意外发现的,最初同事有一台测试机插上usb能充电但不能识别,他让我帮他看看怎么回事,于是我就按照常规套路,开发者模式.usb调试.MTP什么 ...
- 1021. Deepest Root DFS 求最长无环路径
第一次出现超时 ac不了的题 思路一:对于每个节点用一次dfs dfs中 记录到当前的最长路径,若大于最长,则清除set,并加入当前节点 思路二:先查找只有一个相邻节点的节点进行dfs,由于可能存在闭 ...