teleport to赋值的dom, 可以是当前的组件或其他组件里的dom节点吗?

来源:3-17 Teleport - 瞬间移动 第一部分

慕码人6329404

2021-10-27

老师, teleport to赋值的dom, 可以是当前的组件或其他组件里的dom节点吗?

写回答

1回答

张轩

2021-10-28

同学你好 vue的官方文档推荐,插入节点就是不属于Vue app的 DOM 节点。

 it would be preferable to move this part of the template somewhere else in the DOM, outside of the Vue app.

我试了一下,也不能使用其他组件的节点。

0
0

Vue3 + TS 仿知乎专栏企业级项目

带你完成前后端分离复杂项目,率先掌握 vue3 造轮子技能

3209 学习 · 2364 问题

查看课程