admin管理员组文章数量:1320865
I seriously don't know, why the fragments is the problem.
<template>
<div id="page">
</div>
<div class="some">
</div>
</template>
[Vue warn]: Attribute "id" is ignored on ponent "div"
I seriously don't know, why the fragments is the problem.
<template>
<div id="page">
</div>
<div class="some">
</div>
</template>
Share Improve this question asked May 3, 2016 at 13:40 Ladislav JanečekLadislav Janeček 1392 silver badges10 bronze badges[Vue warn]: Attribute "id" is ignored on ponent "div"
2 Answers
Reset to default 10You need to wrap the contents of your template in another div. When it es to render it, it needs the single root element to replace
<template>
<div>
<div id="page">
</div>
<div class="some">
</div>
</div>
</template>
Vue v3 now supports multi-root templates. Your code should work out-of-the-box.
https://v3-migration.vuejs/new/fragments.html
本文标签: javascriptVuejs fragment instanceStack Overflow
版权声明:本文标题:javascript - Vue.js fragment instance - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742020614a2414540.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论