Skip to content
This repository has been archived by the owner on Aug 8, 2022. It is now read-only.

fix: removed v-for for refs, close #357 #391

Merged
merged 1 commit into from
Jan 31, 2021
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: 0 additions & 2 deletions src/guide/component-template-refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ app.component('base-input', {
this.$refs.usernameInput.focusInput()
```

当 `ref` 与 `v-for` 一起使用时,你得到的 `ref` 将是一个数组,其中包含镜像数据源的子组件。

:::warning
`$refs` 只会在组件渲染完成之后生效。这仅作为一个用于直接操作子元素的“逃生舱”——你应该避免在模板或计算属性中访问 `$refs`。
:::
Expand Down