fix:enter事件触发doneEdit,又会导致blur事件触发,再次触发doneEdit
This commit is contained in:
		@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user