今天在使用vue框架搭建环境时,遇到这个错误提示:

[Vue warn]: Attribute "id" is ignored on component <div> because the component is a fragment instanc

这个提示的原因是使用 vue-router 和 vue-loader 插件的时候在最外面那个 template 里面,所有内容的外面没有使用一个div包起来。

如果没有使用div或者其他的元素包起来,vue-router 跳转时,vue不知道要删除哪些东西,所以才会报错。

[Vue warn]: Attribute "id" is ignored on component <div> because the component is a fragment instanc的更多相关文章

  1. [Vue warn]: You may have an infinite update loop in a component render function

    [Vue warn]: You may have an infinite update loop in a component render function 这个问题很奇怪,之前从来没有遇到过.如果 ...

  2. vue报错:[Vue warn]: Do not use built-in or reserved HTML elements as component id: header

    报错的信息大致是不要将内置或保留的HTML元素用作组件ID 解决的办法是修改name符合规范或者直接删除组件内的name属性.

  3. [Vue warn]: Do not use built-in or reserved HTML elements as component id: header

    因为header在HTML5里面是个原生的标签,所以在开发的时候会提示错误,解决方法:修改components里面左边的header

  4. [Vue warn]: Do not use built-in or reserved HTML elements as component id: content

    错误如下: 报错原因: 不能使用内建标签,组件不能和html标签重复. 解决办法: 把name改成mContent解决.

  5. VUE - vue.runtime.esm.js?6e6d:619 [Vue warn]: Do not use built-in or reserved HTML elements as component i

    <script> export default {     name:'header'       //  不要使用内置或保留的HTML元素 , 改为Header或者置或保留的HTML元素 ...

  6. Vue报错之"[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead......"

    一.报错截图 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the p ...

  7. Vue报错之" [Vue warn]: Unknown custom element: <wzwzihello> - did you register the component correctly? For recursive components, make sure to provide the "name" option."

    一.报错截图 [Vue warn]: Unknown custom element: <wzwzihello> - did you register the component corre ...

  8. "[Vue warn]: Failed to mount component: template or render function not defined"错误的解决

    VUE中动态路由出错: vue.esm.js?a026: [Vue warn]: Failed to mount component: template or render function not ...

  9. vue报错[Vue warn]: Unknown custom element: <router-Link> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

    vue浏览器报错,如下 vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: <router-Link> - di ...

随机推荐

  1. Python中关于列表排序并保留id/enumerate()使用方法

    新手才开始写博客,不周之处请原谅,有错误请指正. >>> a = [1,4,2,5,3]>>> b = sorted(enumerate(a),key = lamb ...

  2. 面向对象编程技术的总结和理解(c++)

    目录树 1.继承 1.1 基类成员在派生类中的访问属性 1.2继承时导致的二义性 1.3 多基继承 2.虚函数的多态 2.1虚函数的定义 2.2派生类中可以根据需要对虚函数进行重定义 2.3 虚函数的 ...

  3. IntelliJ IDEA使用maven-javadoc-plugin生成Java Doc控制台乱码

    问题描述 在使用IDEA生成Java Doc的过程中,发现IDEA控制台乱码,作为有轻微代码强迫症的我来说,这是不可忍受的,需要鼓捣一番.先上pom.xml中的javadoc插件配置 <!--配 ...

  4. Pandas 使用笔记

    创建空的数据框: import pandas as pd df = pd.DataFrame(columns = ["ebayno", "p_sku", &qu ...

  5. [Python设计模式] 第12章 基金理财更省事——外观模式

    github地址:https://github.com/cheesezh/python_design_patterns 题目1 用程序模拟股民直接炒股的代码,比如股民投资了股票1,股票2,股票3,国债 ...

  6. 每天一个linux命令(4):mkdir

    1.命令简介 mkdir (Make Directory 创建目录): 若指定目录不存在则创建目录.在创建目录时,要求创建目录的用户具有写权限,并应保证新建的目录没有重名. 2.用法 用法:mkdir ...

  7. 关于用wkwebview加载沙盒documents下html文件 模拟器可以,真机不行的解决方案

    最近也遇到这个问题,把我解决的思路记录一下 1.问题: 用wkwebview加载(loadRequest)沙盒documents下html文件 模拟器可以,真机不行 (前提是html内部含引用外联样式 ...

  8. Jexus 5.4.6 on CentOS 6.6

    Mono 通过脚本安装 https://github.com/cjy37/linux-asp.net-installScript 版本 3.10 MongoDB 也可通过以上脚本安装 默认端口 270 ...

  9. Spark 官方博文专区(目录)

    关于转载一些 Spark 官方的文档以及 DataBricks 公司博文,本系列基本是中英双语,主要是为了提高自己的英语水平. 文章分类 spark databricks A Tale of Thre ...

  10. 偏离中轴的cos半球积分问题

    问题: 如果N与n重合,则就是普通的cos半球积分,地球人都知道结果是pi. 对于N与n不重合的一般情况,稍微麻烦一些. 解法1(同济高数课本的方法,参考同济高数第六版第二册“曲面积分”一章): 解法 ...