A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/amejiarosario/vue-todo-app/commit/fcd305c below:

create todo with @keyup.enter · amejiarosario/vue-todo-app@fcd305c · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+10

-1

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+10

-1

lines changed Original file line number Diff line number Diff line change

@@ -7,5 +7,12 @@ const todoApp = new Vue({

7 7

{ text: 'Learn Vue', isDone: false },

8 8

{ text: 'Build something awesome', isDone: false },

9 9

],

10 +

},

11 +

methods: {

12 +

createTodo(event) {

13 +

const textbox = event.target;

14 +

this.todos.push({ text: textbox.value, isDone: false });

15 +

textbox.value = '';

16 +

}

10 17

}

11 18

});

Original file line number Diff line number Diff line change

@@ -14,7 +14,9 @@

14 14

<section class="todoapp">

15 15

<header class="header">

16 16

<h1 v-text="title"></h1>

17 -

<input class="new-todo" placeholder="What needs to be done?" autofocus>

17 +

<input class="new-todo" placeholder="What needs to be done?"

18 +

v-on:keyup.enter="createTodo"

19 +

autofocus>

18 20

</header>

19 21 20 22

<!-- This section should be hidden by default and shown when there are todos -->

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4