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错误, 解决办法 ...
随机推荐
- Scikit-learn 安装
Scikit-Learn 3 pip 安装 如果安装了Python,没有安装pip,使用Windows + R,输入cmd,回车打开命令行,输入 python -m pip install -U pi ...
- SQL: Cannot create JDBC driver of class '' for connect URL
使用数据库数据源的web 项目,发布后,访问数据库500报错: 浏览器端: 控制台: 数据库连接池在不启动Tomcat的情况下,测试类通过,没有问题. 一旦在服务器发布,就会出现问题,考虑是Tomca ...
- 关于python的展望
在未接触这门课程以前,我完全对编程一类的操作毫无兴趣.但在短短的两星期时间里,我改变了想法,原因有二.其一是老师幽默,其二是课程实用性高.我希望课程以后可以继续沿用现在由浅入深,给予足够提示的方式,引 ...
- Vue history模式支持ie9
vue 路由里面的history能让浏览器显示平常一样的链接,可以去掉#这种,但是在ie9下面会强制变成hash,因为history不支持ie9自动降级,可能就会影响美感,解决:可以在路由里面添加fa ...
- PHP获取日期时间信息
getdate函数 描述:可以获取日期/时间信息 语法:array getdate( [ int timestamp ] ) 返回一个数组 例: Array ( [seconds] => 30 ...
- Struts2内建拦截器
params拦截器 负责将请求参数设置为Action属性 staticParams拦截器 将配置文件中action元素的子元素param参数设置为Action属性 servletConfig拦截器 将 ...
- 让Spring Boot项目启动时可以根据自定义配置决定初始化哪些Bean
让Spring Boot项目启动时可以根据自定义配置决定初始化哪些Bean 问题描述 实现思路 思路一 [不符合要求] 思路二[满足要求] 思路三[未试验] 问题描述 目前我工作环境下,后端主要的框架 ...
- (转载)sqlmap用户手册详解
文章转载自 http://www.vuln.cn/2035 当给sqlmap这么一个url (http://www.target.com/sqlmap/mysql/get_int.php?id=1) ...
- 关于Eclipse导入项目jsp出现红色叉的解决办法
简单图解概括 右击项目 到这里就ok 如果没解决就检查下以下三个地方的版本是否一致 如果还不行,有什么疑问可以留言,我会及时帮助解决的
- 避免docker异常重启容器挂掉的解决方法
Docker 升级或者重启容器不会被停掉然后重启的解决方法 在/etc/systemd/system/multi-user.target.wants/docker.service文件下添加配置 注意: ...