From 2dd48780328ac4e51fad35fcf555392ee2cfa277 Mon Sep 17 00:00:00 2001 From: rongxingsun Date: Mon, 30 Jul 2018 09:01:01 +0800 Subject: [PATCH] setLocalStorgae to setLocalStorage setLocalStorgae to setLocalStorage --- .../dashboard/admin/components/TodoList/index.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/dashboard/admin/components/TodoList/index.vue b/src/views/dashboard/admin/components/TodoList/index.vue index 34f0241d..207cdbab 100644 --- a/src/views/dashboard/admin/components/TodoList/index.vue +++ b/src/views/dashboard/admin/components/TodoList/index.vue @@ -72,7 +72,7 @@ export default { } }, methods: { - setLocalStorgae() { + setLocalStorage() { window.localStorage.setItem(STORAGE_KEY, JSON.stringify(this.todos)) }, addTodo(e) { @@ -82,30 +82,30 @@ export default { text, done: false }) - this.setLocalStorgae() + this.setLocalStorage() } e.target.value = '' }, toggleTodo(val) { val.done = !val.done - this.setLocalStorgae() + this.setLocalStorage() }, deleteTodo(todo) { this.todos.splice(this.todos.indexOf(todo), 1) - this.setLocalStorgae() + this.setLocalStorage() }, editTodo({ todo, value }) { todo.text = value - this.setLocalStorgae() + this.setLocalStorage() }, clearCompleted() { this.todos = this.todos.filter(todo => !todo.done) - this.setLocalStorgae() + this.setLocalStorage() }, toggleAll({ done }) { this.todos.forEach(todo => { todo.done = done - this.setLocalStorgae() + this.setLocalStorage() }) } },