-
Notifications
You must be signed in to change notification settings - Fork 87
Advanced Guides > Compotion API > Template Refs の翻訳 #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,10 +1,11 @@ | ||||||
| ## Template Refs | ||||||
|
|
||||||
| > This section uses [single-file component](single-file-component.html) syntax for code examples | ||||||
| > この節ではサンプルコードで [単一ファイルコンポーネント](single-file-component.html)の文法を使用しています。 | ||||||
|
||||||
|
|
||||||
| > This guide assumes that you have already read the [Composition API Introduction](composition-api-introduction.html) and [Reactivity Fundamentals](reactivity-fundamentals.html). Read that first if you are new to Composition API. | ||||||
| > このガイドはすでに [Composition API 導入](composition-api-introduction.html) を読んでいることを前提に書かれています。もしまだ読んでいないのなら、先に読みましょう。 | ||||||
|
||||||
| > このガイドはすでに [Composition API 導入](composition-api-introduction.html) を読んでいることを前提に書かれています。もしまだ読んでいないのなら、先に読みましょう。 | |
| > このガイドはすでに [コンポジション API 導入](composition-api-introduction.html) を読んでいることを前提に書かれています。もしまだ読んでいないのなら、先に読みましょう。 |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Composition API の訳は、
コンポジション API - reactive refs は
リアクティブ参照 - template refs は
テンプレート参照
| Composition API を使うとき、 [リアクティブ refs](reactivity-fundamentals.html#creating-standalone-reactive-values-as-refs) と [テンプレート refs](component-template-refs.html) のコンセプトは同じになります。 | |
| コンポジション API を使うとき、 [リアクティブ参照](reactivity-fundamentals.html#creating-standalone-reactive-values-as-refs) と [テンプレート参照](component-template-refs.html) のコンセプトは同じになります。 |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
binding は以下のように 束縛します お願いします!
| 描画コンテキストに `root` 変数を渡していて、`ref="root"` 経由で div 要素とバインドします. 仮想 DOM のパッチアルゴリズムの中で、 もし VNode の `ref` キーは描画コンテキストの ref に対応すると、VNode の対応する要素またはコンポーネントインスタンスに ref の値が割り当てられます。これは仮想 DOM のマウント/パッチ処理中に実行されるので、テンプレート refs では初期描画に値だけを取得できます。 | |
| 描画コンテキストに `root` 変数を渡していて、`ref="root"` 経由で div 要素と束縛します. 仮想 DOM のパッチアルゴリズムの中で、 もし VNode の `ref` キーは描画コンテキストの ref に対応すると、VNode の対応する要素またはコンポーネントインスタンスに ref の値が割り当てられます。これは仮想 DOM のマウント/パッチ処理中に実行されるので、テンプレート refs では初期描画に値だけを取得できます。 |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- template refs は
テンプレート参照 - ここの refs (原文ででてくる用語の refs) は references の略称。なので、訳も参照で。
| テンプレート refs は他の refs と似た挙動をします。つまり、リアクティブかつコンポジション関数に渡せる(または返せる)ことができます。 | |
| テンプレート参照は他の参照と似た挙動をします。つまり、リアクティブかつコンポジション関数に渡せる(または返せる)ことができます。 |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function refs は意訳的に以下のようにすると分かりやすいです。
| コンポジション API のテンプレート refs を `v-for` 内部で使う時に特別な処理はされないです。代わりに、関数 refs を使って独自処理を実行してください。 | |
| コンポジション API のテンプレート参照を `v-for` 内部で使う時には特別な処理はされないです。代わりに、参照を提供する関数を使って独自処理を実行してください。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tempalte Refs ですが、 以下のようにテンプレート参照でお願いします! 🙏