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