Commit 67188f45 authored by baiyaaaaa's avatar baiyaaaaa Committed by 杨奕

fix clickoutside bug

parent 383e3a5f
...@@ -123,10 +123,8 @@ ...@@ -123,10 +123,8 @@
}, },
handleChange(value) { handleChange(value) {
this.$emit('input', value); this.$emit('input', value);
this.activated = true;
if (this.isOnComposition || (!this.triggerOnFocus && !value)) { if (this.isOnComposition || (!this.triggerOnFocus && !value)) {
this.suggestions = []; this.suggestions = [];
this.activated = false;
return; return;
} }
this.getData(value); this.getData(value);
......
...@@ -27,6 +27,8 @@ export default { ...@@ -27,6 +27,8 @@ export default {
!mouseup.target || !mouseup.target ||
!mousedown.target || !mousedown.target ||
el.contains(mouseup.target) || el.contains(mouseup.target) ||
el.contains(mousedown.target) ||
el === mouseup.target ||
(vnode.context.popperElm && (vnode.context.popperElm &&
(vnode.context.popperElm.contains(mouseup.target) || (vnode.context.popperElm.contains(mouseup.target) ||
vnode.context.popperElm.contains(mousedown.target)))) return; vnode.context.popperElm.contains(mousedown.target)))) return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment