Skip to content

Commit 30116a8

Browse files
authored
The description of this in setup is inconsistent with the source code (#388)
vuejs/docs@42bb2a2
1 parent a7f9b60 commit 30116a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/composition-api-introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default {
7676
新しい `setup` コンポーネントオプションは、コンポーネントが作成される前に `props` が解決されると実行され、 Composition API のエントリポイントとして機能します。
7777

7878
::: warning
79-
`setup` が実行されたときは、まだコンポーネントのインスタンスが作られないため、`setup` オプションの中では `this` を使用できません。これは `props` を除いて、コンポーネント内で宣言されているあらゆるプロパティ (**ローカルの state****computed プロパティ****methods**) にアクセスできないことを意味します
79+
コンポーネントのインスタンスを参照しないため、`setup` の中で `this` を使うのは避けるべきです。`setup``data` プロパティ、`computed` プロパティ`methods` が解決される前に呼び出されるため、`setup` の中では利用できません
8080
:::
8181

8282
`setup` オプションは `props`[後で](composition-api-setup.html#引数)紹介する `context` を受け付ける関数であるべきです。さらに、`setup` から返される全てのものは、コンポーネントの残りの要素 (computed プロパティ、methods、ライフサイクルフックなど) およびコンポーネントの template に公開されます。

0 commit comments

Comments
 (0)