在Vue+element 开发中报: The template root requires exactly one elemen 错的解决和原因
一.我正准备使用Vue + Element进行新的项目开发,然后在进行添加下一个组件时报错

二.解决及原因:
原来template中只允许模板里存在一个根节点,在 template 中添加一个 <div>标签,之后所有的组件全部加在 <div>即可解决。
注意:<template></template>中必须要有一个根节点且只能存在一个根节点
在Vue+element 开发中报: The template root requires exactly one elemen 错的解决和原因的更多相关文章
- vue error:The template root requires exactly one element.
error:[vue/valid-template-root] The template root requires exactly one element. 原因: 因为vue的模版中只有能一个根节 ...
- The template root requires exactly one element
The template root requires exactly one element
- SpringBoot+SpringCloud+vue+Element开发项目——集成Druid数据源
添加依赖 pom.xml <!--druid--> <dependency> <groupId>com.alibaba</groupId> <ar ...
- SpringBoot+SpringCloud+vue+Element开发项目——集成MyBatis框架
添加mybatis-spring-boot-starter依赖 pox.xml <!--mybatis--> <dependency> <groupId>org.m ...
- SpringBoot+SpringCloud+vue+Element开发项目——数据库设计
1.用户表(sys_user) CREATE TABLE `sys_user` ( `id` ) NOT NULL AUTO_INCREMENT COMMENT '编号', `name` ) NOT ...
- SpringBoot+SpringCloud+vue+Element开发项目——集成Swagger文档
在pom.xml文件中添加Maven依赖 <!--swagger--> <dependency> <groupId>io.springfox</groupId ...
- SpringBoot+SpringCloud+vue+Element开发项目——搭建开发环境
1.新建一个项目
- 循序渐进VUE+Element 前端应用开发(15)--- 用户管理模块的处理
在前面随笔介绍了ABP+Vue前后端的整合处理,包括介绍了ABP的后端设计,以及前端对ABP接口API的ES6的封装,通过JS的继承类处理,极大减少了重复臃肿的代码,可以简化对后端API接口的封装,而 ...
- 循序渐进VUE+Element 前端应用开发(25)--- 各种界面组件的使用(1)
在我们使用Vue+Element开发前端的时候,往往涉及到很多界面组件的使用,其中很多直接采用Element官方的案例即可,有些则是在这个基础上封装更好利用.更少代码的组件:另外有些则是直接采用第三方 ...
随机推荐
- java 利用反射创建对象
创建对象: 1.使用Class对象的newInstance()方法创建该Class对象的实例,此时该Class对象必须要有无参数的构造方法. 2.使用Class对象获取指定的Constructor对象 ...
- call undefined function openssl_cipher_iv_length
现象: 访问localhost/blog/public时,报错在verdor/framework/src/Illuminate/Encryption/Encrtpter.php的84行,找不到open ...
- P1093 铺地毯
题目描述 为了准备一个独特的颁奖典礼,组织者在会场的一片矩形区域(可看做是平面直角坐标系的第一象限)铺上一些矩形地毯.一共有 \(n\) 张地毯,编号从 \(1\) 到 \(n\) .现在将这些地毯按 ...
- linux初始化和关停
如已提到的, 模块初始化函数注册模块提供的任何功能. 这些功能, 我们指的是新功能, 可以由应用程序存取的或者一整个驱动或者一个新软件抽象. 实际的初始化函数定义常常 如: static int ...
- 提前终止forEach技巧,使用try catch
学习react优化性能的时候,在render之前,生命周期shouldComponentUpdate里判断前后两次数据是否一致,使用了forEach嵌套if语句,如果满足条件想直接break跳出for ...
- VS2017 OpenCV3.4.2 通过Release的版本 源码编译成 x86
官方release的OpenCV3..2版本只有64bit,由于项目需要,现在把它重新编译成x86的库. 下载源码: github官方仓库 https://github.com/opencv/open ...
- 【hdu 1848】Fibonacci again and again
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s) ...
- Sending Packets LightOJ - 1321 (期望计算)
题面: Alice and Bob are trying to communicate through the internet. Just assume that there are N route ...
- Latex 公式速查
本文记录了一些常用的数学公式对应的 Latex 字符,用于快速查找需要的字符 所有的在 Latex 使用的字符公式,都需要放在\(和\),$ 和 $,\begin{math} 和\end{math}之 ...
- Java 学习笔记(8)——匿名对象与内部类
一般在编写代码时可能会遇到这样的场景--在某些时候,我需要定义并某个类,但是只会使用这一次,或者是某个类对象只会使用一次,为它们专门取名可能会显的很麻烦.为了应对这种情况,Java中允许使用匿名对象和 ...