Skip to content

Commit a8d3649

Browse files
authored
fix: TODO list (#279)
* Vue公式の説明では、属性ではなくプロパティと表現しているので、プロパティに修正 * fix: v-slotの省略記法の間違いを修正 * ogImage true追加 * fix: Fix typo
1 parent 32150dc commit a8d3649

File tree

7 files changed

+34
-14
lines changed

7 files changed

+34
-14
lines changed

content/ja/09.workspace/01.todo-list/.template/files/app.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const todos = ref<Todo[]>([
2424
])
2525
const showUnDoneOnly = ref(false)
2626
const isCreateModalOpen = ref(false)
27-
const inputTitile = ref('')
27+
const inputTitle = ref('')
2828
const inputNote = ref('')
2929
const inputDate = ref('')
3030
@@ -56,7 +56,7 @@ function handleSubmit(e: Event) {
5656
const newTodo: Todo = {
5757
id: Date.now(),
5858
done: false,
59-
title: inputTitile.value,
59+
title: inputTitle.value,
6060
note: inputNote.value,
6161
dueDate: inputDate.value,
6262
}
@@ -123,7 +123,7 @@ interface Todo {
123123
<form @submit="handleSubmit">
124124
<div>
125125
<label for="title">タイトル</label>
126-
<input id="title" v-model="inputTitile" type="text" required>
126+
<input id="title" v-model="inputTitle" type="text" required>
127127
</div>
128128

129129
<div>

content/ja/09.workspace/01.todo-list/06.v-model/index.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
ogImage: true
3+
---
4+
15
# フォーム入力バインディング
26

37
Vueでは [`v-model`](https://ja.vuejs.org/api/built-in-directives.html#v-model) ディレクティブを使うことで、フォーム要素やコンポーネントと「双方向データバインディング」を簡潔に実現できます。ユーザーの入力とVueのデータが常に同期され、フォーム制御が直感的になります。
@@ -32,11 +36,11 @@ Vueでは [`v-model`](https://ja.vuejs.org/api/built-in-directives.html#v-model)
3236
<input v-model="text" type="text" />
3337
```
3438

35-
フォームタイプごとにバインドされる属性やイベントが異なります
39+
フォームタイプごとにバインドされるプロパティやイベントが異なります
3640

37-
- テキスト・テキストエリア:`value` 属性と `input` イベント
38-
- チェックボックス・ラジオ:`checked` 属性と `change` イベント
39-
- セレクトボックス:`value` 属性と `change` イベント
41+
- テキスト・テキストエリア:`value` プロパティと `input` イベント
42+
- チェックボックス・ラジオ:`checked` プロパティと `change` イベント
43+
- セレクトボックス:`value` プロパティと `change` イベント
4044

4145
例えば、テキストエリア、ラジオボックス、セレクトボックスでは、このように使います:
4246

content/ja/09.workspace/01.todo-list/07.reactivity-2/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
ogImage: true
3+
---
4+
15
# リアクティビティー パート2
26

37
[リアクティビティー パート1](reactivity-1)で、データの変更を監視して、変更時に更新を自動的にトリガーする [優れたリアクティビティシステム](https://ja.vuejs.org/guide/essentials/reactivity-fundamentals)`ref`について学習しました。

content/ja/09.workspace/01.todo-list/08.componentization-3/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
ogImage: true
3+
---
4+
15
# コンポーネントの v-model
26

37
[フォーム入力バインディング](v-model)で紹介したように、 `v-model` はフォーム入力欄とVueのデータを自動で同期してくれる仕組みです。

content/ja/09.workspace/01.todo-list/09.slot/index.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
ogImage: true
3+
---
4+
15
# スロット
26

37
[スロット](https://ja.vuejs.org/guide/components/slots.html#slot-content-and-outlet) は、親コンポーネントから子コンポーネントの特定の場所にテンプレートを差し込むための仕組みです。
@@ -115,7 +119,7 @@
115119

116120
名前付きのスロットコンテンツを渡すためには、 `v-slot` を利用します。(例: `<template v-slot:title>`
117121

118-
`v-slot``#` で省略表記ができます。(例: `<template #:title>`
122+
`v-slot``#` で省略表記ができます。(例: `<template #title>`
119123

120124
```vue
121125
<!-- AppModal: 子コンポーネント -->
@@ -151,7 +155,7 @@
151155
<form>
152156
<div>
153157
<label for="title">タイトル</label>
154-
<input id="title" v-model="inputTitile" type="text" required>
158+
<input id="title" v-model="inputTitle" type="text" required>
155159
</div>
156160
</form>
157161
</AppModal>
@@ -174,7 +178,7 @@
174178
<form>
175179
<div>
176180
<label for="title">タイトル</label>
177-
<input id="title" v-model="inputTitile" type="text" required>
181+
<input id="title" v-model="inputTitle" type="text" required>
178182
</div>
179183
</form>
180184
</template>

content/ja/09.workspace/01.todo-list/10.retrospective/.template/solutions/app.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const todos = ref<Todo[]>([
2424
])
2525
const showUnDoneOnly = ref(false)
2626
const isCreateModalOpen = ref(false)
27-
const inputTitile = ref('')
27+
const inputTitle = ref('')
2828
const inputNote = ref('')
2929
const inputDate = ref('')
3030
@@ -56,7 +56,7 @@ function handleSubmit(e: Event) {
5656
const newTodo: Todo = {
5757
id: Date.now(),
5858
done: false,
59-
title: inputTitile.value,
59+
title: inputTitle.value,
6060
note: inputNote.value,
6161
dueDate: inputDate.value,
6262
}
@@ -123,7 +123,7 @@ interface Todo {
123123
<form @submit="handleSubmit">
124124
<div>
125125
<label for="title">タイトル</label>
126-
<input id="title" v-model="inputTitile" type="text" required>
126+
<input id="title" v-model="inputTitle" type="text" required>
127127
</div>
128128

129129
<div>

content/ja/09.workspace/01.todo-list/10.retrospective/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
ogImage: true
3+
---
4+
15
# 復習・まとめ
26

37
TODOリストの作成を通して学べる、基本的なVue.jsの機能の説明は以上になります。
@@ -33,7 +37,7 @@ function handleSubmit(e: Event) {
3337
const newTodo: Todo = {
3438
id: Date.now(),
3539
done: false,
36-
title: inputTitile.value,
40+
title: inputTitle.value,
3741
note: inputNote.value,
3842
dueDate: inputDate.value
3943
}

0 commit comments

Comments
 (0)