mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-12 22:29:59 +08:00
fix:enter事件会导致blur事件触发,触发了两次doneEdit
This commit is contained in:
parent
4e00cb8276
commit
b9d12ce5a8
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user