Skip to content

Commit 2e20d89

Browse files
committed
微修正
1 parent aefebea commit 2e20d89

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/guide/composition-api-setup.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515

1616
### Props
1717

18-
`setup` 関数の 1 番目の引数は `props` 引数です。 標準コンポーネントで期待するように、`setup` 関数内の `props` はリアクティブで、新しい props が渡されたら更新されます。
18+
`setup` 関数の 第一引数は `props` 引数です。 標準コンポーネントで期待するように、`setup` 関数内の `props` はリアクティブで、新しい props が渡されたら更新されます。
1919

2020
```js
2121
// MyBook.vue
2222

2323
export default {
2424
props: {
25-
title: String,
25+
title: String
2626
},
2727
setup(props) {
2828
console.log(props.title)
29-
},
29+
}
3030
}
3131
```
3232

@@ -50,7 +50,7 @@ setup(props) {
5050

5151
### Context
5252

53-
`setup` 関数に渡される 2 番目の引数は `context` です。`context` は 3 つのコンポーネントプロパティを公開する一般的な JavaScript オブジェクトです。:
53+
`setup` 関数に渡される第二引数は `context` です。`context` は 3 つのコンポーネントプロパティを公開する一般的な JavaScript オブジェクトです。:
5454

5555
```js
5656
// MyBook.vue
@@ -65,7 +65,7 @@ export default {
6565

6666
// Emit Events (Method)
6767
console.log(context.emit)
68-
},
68+
}
6969
}
7070
```
7171

@@ -140,9 +140,9 @@ export default {
140140
setup() {
141141
const readersNumber = ref(0)
142142
const book = reactive({ title: 'Vue 3 Guide' })
143-
// Please note that we need to explicitly expose ref value here
143+
// ここでは明示的に ref の値を公開する必要があることに注意してください。
144144
return () => h('div', [readersNumber.value, book.title])
145-
},
145+
}
146146
}
147147
```
148148

0 commit comments

Comments
 (0)