Skip to content

Commit 8851a68

Browse files
mimimilePanJiaChen
authored andcommitted
tweak setLocalStorgae -> setLocalStorage (PanJiaChen#894)
1 parent 878628b commit 8851a68

File tree

1 file changed

+7
-7
lines changed
  • src/views/dashboard/admin/components/TodoList

1 file changed

+7
-7
lines changed

src/views/dashboard/admin/components/TodoList/index.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default {
7272
}
7373
},
7474
methods: {
75-
setLocalStorgae() {
75+
setLocalStorage() {
7676
window.localStorage.setItem(STORAGE_KEY, JSON.stringify(this.todos))
7777
},
7878
addTodo(e) {
@@ -82,30 +82,30 @@ export default {
8282
text,
8383
done: false
8484
})
85-
this.setLocalStorgae()
85+
this.setLocalStorage()
8686
}
8787
e.target.value = ''
8888
},
8989
toggleTodo(val) {
9090
val.done = !val.done
91-
this.setLocalStorgae()
91+
this.setLocalStorage()
9292
},
9393
deleteTodo(todo) {
9494
this.todos.splice(this.todos.indexOf(todo), 1)
95-
this.setLocalStorgae()
95+
this.setLocalStorage()
9696
},
9797
editTodo({ todo, value }) {
9898
todo.text = value
99-
this.setLocalStorgae()
99+
this.setLocalStorage()
100100
},
101101
clearCompleted() {
102102
this.todos = this.todos.filter(todo => !todo.done)
103-
this.setLocalStorgae()
103+
this.setLocalStorage()
104104
},
105105
toggleAll({ done }) {
106106
this.todos.forEach(todo => {
107107
todo.done = done
108-
this.setLocalStorgae()
108+
this.setLocalStorage()
109109
})
110110
}
111111
},

0 commit comments

Comments
 (0)