Skip to content

Commit 58a65e6

Browse files
committed
linterによる修正を訂正
1 parent 17bf04c commit 58a65e6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/guide/component-basics.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ app.component('blog-post', {
215215
問題は、このボタンが何もしないことです:
216216

217217
```html
218-
<button>Enlarge text</button>
218+
<button>
219+
Enlarge text
220+
</button>
219221
```
220222

221223
ボタンをクリックすると、全ての投稿のテキストを拡大する必要があることを親に伝える必要があります。親は、ネイティブ DOM イベントでの場合と同様に、 `v-on``@` を用いて子コンポーネントのインスタンスでのイベントを購読することができます:
@@ -227,7 +229,9 @@ app.component('blog-post', {
227229
そして子コンポーネントはビルトインの [**`$emit`** メソッド](../api/instance-methods.html#emit) にイベントの名前を渡して呼び出すことで、イベントを送出することができます:
228230

229231
```html
230-
<button @click="$emit('enlarge-text')">Enlarge text</button>
232+
<button @click="$emit('enlarge-text')">
233+
Enlarge text
234+
</button>
231235
```
232236

233237
親コンポーネントは `v-on:enlarge-text="postFontSize += 0.1"` リスナーによって、このイベントを受け取り `postFontSize` を更新することができます。
@@ -364,7 +368,9 @@ app.component('custom-input', {
364368
HTML 要素のように、コンポーネントに要素を渡すことができると便利なことがよくあります。例えば以下の通り:
365369

366370
```html
367-
<alert-box> Something bad happened. </alert-box>
371+
<alert-box>
372+
Something bad happened.
373+
</alert-box>
368374
```
369375

370376
これは以下のように描画されるでしょう。:

0 commit comments

Comments
 (0)