您当前的位置: 首页 >  ide

任磊abc

暂无认证

  • 2浏览

    0关注

    182博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

vue3 出现 Component inside <Transition> renders non-element root node that cannot be animated.

任磊abc 发布时间:2022-02-24 10:30:11 ,浏览量:2

项目使用vite脚手架+vue3,在根组件App.vue当中使用了页面过渡动画

首页index.vue 代码

结果控制台出现

  Component inside renders non-element root node that cannot be animated. 这句话的意思是:

中的组件渲染无法设置动画的非元素根节点。

针对这个问题解决方法是在index.vue 当中使用一个

标签,将index.vue所有标签包裹起来即可消除这个错误:

参考文章:

vue.js - Vue 3 – renders non-element root node that cannot be animated - Stack Overflow 

 

关注
打赏
1656830895
查看更多评论
立即登录/注册

微信扫码登录

0.0351s