首页 > 其他 > 详细

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

时间:2015-12-29 19:21:29      阅读:176      评论:0      收藏:0      [点我收藏+]

今天在使用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

原文:http://www.cnblogs.com/ayseeing/p/5086703.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!