今天在使用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. tableviewcell选中不变色。

    tableview 选中一行后,不显示选中颜色 添加这样一句话就好 cell.selectionStyle = UITableViewCellSelectionStyleNone; 一定不要table ...

  2. PAT Basic 1020

    1020 月饼 (25 分) 月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼.现给定所有种类月饼的库存量.总售价.以及市场的最大需求量,请你计算可以获得的最大收益是多少. 注意 ...

  3. Ajax实现局部数据交互的一个简单实例

    想要实现的功能:利用Ajax技术通过点击一个<button>按钮,然后在指定的文本框中输出想要的值. 1.使用Jsp创建一个前端页面. <body> <div style ...

  4. Jmeter接口测试实例2-获取所有学生信息

    Jmeter实例2:获取所有学生信息 添加http协议—添加IP.路径.方法,添加信息头管理器,察看结果树,运行 如下图所示,响应结果中获取到所有学生信息

  5. maven 学习

    最近有项目需要储备maven的技能,就学习了一下,找到了一个很适合入门的博客,这里记录下网址. https://www.cnblogs.com/whgk/p/7112560.html

  6. Linux之临时配置网络(ip,网关,dns)+永久配置

    作业一:临时配置网络(ip,网关,dns)+永久配置 配置网络信息 [root@localhost ~]# ifconfig eno16777736: flags=4163<UP,BROADCA ...

  7. elastic-job详解(二):作业的调度

    JobScheduler是elastic-job作业调度的关键类,也是起始类,在包com.dangdang.ddframe.job.lite.api下.调度任务的执行需要包含两大步骤:任务的配置和任务 ...

  8. python之文件处理

    第一:文件基本处理流程 f=open('text') one_line=f.readline() print('one_line:',one_line) #读取一行 print('分割线'.cente ...

  9. 通过IIS操作修改服务器文件没有权限的解决办法

    问题描述:通过部署在IIS上的程序去操做文件(比如删除.旋转图片等)时,在本地执行没有问题,但是部署到服务器上提示“没有权限”.解决方法:找到你需要操作的文件的根文件夹,右键点击属性 选择“安全”选项 ...

  10. 初学vue出现空格警告的原因及其解决办法

    初学vue自己新建一个vue项目来做学习demo.不过在编写代码时一直出现空格不规范的警告.严重影响初学者的热情.错误如下图所示.(这样的错误很多,但大概翻译成中文的意思都是说空格使用不规范.) 这是 ...