Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/guide/built-ins/teleport.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const open = ref(false)

## 搭配组件使用 {#using-with-components}

`<Teleport>` 只改变了渲染的 DOM 结构,它不会影响组件间的逻辑关系。也就是说,如果 `<Teleport>` 包含了一个组件,那么该组件始终和这个使用了 `<teleport>` 的组件保持逻辑上的父子关系。传入的 props 和触发的事件也会照常工作。
`<Teleport>` 只改变了渲染的 DOM 结构,它不会影响组件间的逻辑关系。也就是说,如果 `<Teleport>` 包含了一个组件,那么该组件始终和这个使用了 `<Teleport>` 的组件保持逻辑上的父子关系。传入的 props 和触发的事件也会照常工作。

这也意味着来自父组件的注入也会按预期工作,子组件将在 Vue Devtools 中嵌套在父级组件下面,而不是放在实际内容移动到的地方。

Expand Down