Skip to content

Commit

Permalink
docs: tutorial: add verify to avoid empty content for newTodo (#2712)
Browse files Browse the repository at this point in the history
* docs: tutorial: add verify for newTodo - 1

add verify for newTodo

* Update options.js

* Update options.js

* Update options.js 2

* docs: tutorial: update step-8

sync step-7's change to step-8

Signed-off-by: SPeak <[email protected]>

* docs: tutorial: add 'required' attribute to avoid empty content for newTodo

step-7/step-8
add 'required' attribute to avoid empty content for newTodo

Signed-off-by: SPeak <[email protected]>

---------

Signed-off-by: SPeak <[email protected]>
  • Loading branch information
Sunrisepeak authored Feb 25, 2024
1 parent a63715c commit ee2c10b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/tutorial/src/step-7/App/template.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form @submit.prevent="addTodo">
<input v-model="newTodo">
<button>Add Todo</button>
<input v-model="newTodo" required placeholder="new todo">
<button>Add Todo</button>
</form>
<ul>
<li v-for="todo in todos" :key="todo.id">
Expand Down
2 changes: 1 addition & 1 deletion src/tutorial/src/step-8/App/template.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form @submit.prevent="addTodo">
<input v-model="newTodo">
<input v-model="newTodo" required placeholder="new todo">
<button>Add Todo</button>
</form>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion src/tutorial/src/step-8/_hint/App/template.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form @submit.prevent="addTodo">
<input v-model="newTodo">
<input v-model="newTodo" required placeholder="new todo">
<button>Add Todo</button>
</form>
<ul>
Expand Down

0 comments on commit ee2c10b

Please sign in to comment.