fix:enter事件触发doneEdit,又会导致blur事件触发,再次触发doneEdit
This commit is contained in:
parent
33b6cee015
commit
0489d9713f
|
@ -58,6 +58,9 @@ export default {
|
|||
this.$emit('toggleTodo', todo)
|
||||
},
|
||||
doneEdit(e) {
|
||||
if (!this.editing) {
|
||||
return
|
||||
}
|
||||
const value = e.target.value.trim()
|
||||
const { todo } = this
|
||||
if (!value) {
|
||||
|
|
Loading…
Reference in New Issue