一.我正准备使用Vue + Element进行新的项目开发,然后在进行添加下一个组件时报错

 二.解决及原因:

  原来template中只允许模板里存在一个根节点,在 template 中添加一个 <div>标签,之后所有的组件全部加在 <div>即可解决。

注意:<template></template>中必须要有一个根节点且只能存在一个根节点

在Vue+element 开发中报: The template root requires exactly one elemen 错的解决和原因的更多相关文章

  1. vue error:The template root requires exactly one element.

    error:[vue/valid-template-root] The template root requires exactly one element. 原因: 因为vue的模版中只有能一个根节 ...

  2. The template root requires exactly one element

    The template root requires exactly one element

  3. SpringBoot+SpringCloud+vue+Element开发项目——集成Druid数据源

    添加依赖 pom.xml <!--druid--> <dependency> <groupId>com.alibaba</groupId> <ar ...

  4. SpringBoot+SpringCloud+vue+Element开发项目——集成MyBatis框架

    添加mybatis-spring-boot-starter依赖 pox.xml <!--mybatis--> <dependency> <groupId>org.m ...

  5. SpringBoot+SpringCloud+vue+Element开发项目——数据库设计

    1.用户表(sys_user) CREATE TABLE `sys_user` ( `id` ) NOT NULL AUTO_INCREMENT COMMENT '编号', `name` ) NOT ...

  6. SpringBoot+SpringCloud+vue+Element开发项目——集成Swagger文档

    在pom.xml文件中添加Maven依赖 <!--swagger--> <dependency> <groupId>io.springfox</groupId ...

  7. SpringBoot+SpringCloud+vue+Element开发项目——搭建开发环境

    1.新建一个项目

  8. 循序渐进VUE+Element 前端应用开发(15)--- 用户管理模块的处理

    在前面随笔介绍了ABP+Vue前后端的整合处理,包括介绍了ABP的后端设计,以及前端对ABP接口API的ES6的封装,通过JS的继承类处理,极大减少了重复臃肿的代码,可以简化对后端API接口的封装,而 ...

  9. 循序渐进VUE+Element 前端应用开发(25)--- 各种界面组件的使用(1)

    在我们使用Vue+Element开发前端的时候,往往涉及到很多界面组件的使用,其中很多直接采用Element官方的案例即可,有些则是在这个基础上封装更好利用.更少代码的组件:另外有些则是直接采用第三方 ...

随机推荐

  1. jQuery 工具类函数-检测浏览器是否属于W3C盒子模型

    浏览器的盒子模型分为两类,一类为标准的w3c盒子模型,另一类为IE盒子模型,两者区别为在Width和Height这两个属性值中是否包含padding和border的值,w3c盒子模型不包含,IE盒子模 ...

  2. 一个vue管理系统的初步搭建总结

    ps:目前这个项目只是有一个大致的框架,并没有做完 前期准备工作 前端构建工具:Visual Studio Code后端构建工具:IDEA数据库和服务器构建工具:WampServer (使用的是2.4 ...

  3. LightOJ - 1287 Where to Run (期望dp+记忆化)

    题面: Last night you robbed a bank but couldn't escape and when you just got outside today, the police ...

  4. Team Foundation Server 2015使用教程【8】:读取器tfs组的checkin权限修改

  5. centos 下yum lock的解决办法

    centos 下yum lock的解决办法 centos7下yum install的时候,报了一堆错误,如下: Another app is currently holding the yum loc ...

  6. SQL Server内连接、左外连接、右外连接、完全连接、交叉lianjie

    数据准备: create table T1( A ) not null, B ) not null, C tinyint not null ); create table T2( B ) not nu ...

  7. Django的安装命令

    国内的一些pipy镜像源: 1.清华源: https://pypi.tuna.tsinghua.edu.cn/simple 2.豆瓣源: https://pypi.douban.com/simple ...

  8. java 使用 apoi 更新 ppt 中图表的数据

    本文源码:    1. https://github.com/zhongchengyi/zhongcy.demos/tree/master/apoi-ppt-chart 2. 在第5节也有核心源码 1 ...

  9. [梁山好汉说IT] 梁山好汉和抢劫银行

    [梁山好汉说IT] 梁山好汉和抢劫银行 0x00 摘要 今天看了一篇文章<史上最有学问的银行劫匪,教你如何把握人生重大机会>.先摘录精华如下,然后看看梁山好汉在类似情况下如何处理 (东京汴 ...

  10. ORM之炀,打造自已独特的开发框架CRL

    ORM一直是长久不衰的话题,各种重复造轮子的过程一直在进行,轮子都一样是圆的,你的又有什么特点呢? CRL这个轮子造了好多年,功能也越来越标准完备,在开发过程中,解决了很多问题,先上一张脑图描述CRL ...