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/a73e058 below:

DELETE todo list on @click event · amejiarosario/vue-todo-app@a73e058 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+5

-1

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+5

-1

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

@@ -27,5 +27,9 @@ const todoApp = new Vue({

27 27

cancelEditing() {

28 28

this.editing = null;

29 29

},

30 +

destroyTodo(todo) {

31 +

const index = this.todos.indexOf(todo);

32 +

this.todos.splice(index, 1);

33 +

},

30 34

}

31 35

});

Original file line number Diff line number Diff line change

@@ -27,7 +27,7 @@ <h1 v-text="title"></h1>

27 27

<div class="view">

28 28

<input class="toggle" type="checkbox" v-model="todo.isDone">

29 29

<label @dblclick="startEditing(todo)">{{todo.text}}</label>

30 -

<button class="destroy"></button>

30 +

<button class="destroy" @click="destroyTodo(todo)"></button>

31 31

</div>

32 32 33 33

<input class="edit"

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