fix bug of AutoComplete that can not blur when click outside
This commit is contained in:
parent
139c4b518f
commit
9fa451d7c6
5 changed files with 43 additions and 6 deletions
|
@ -14,6 +14,7 @@
|
|||
auto-complete
|
||||
:remote-method="remoteMethod"
|
||||
@on-change="handleChange"
|
||||
@on-clickoutside="handleClickOutside"
|
||||
:transfer="transfer">
|
||||
<slot name="input">
|
||||
<i-input
|
||||
|
@ -167,6 +168,11 @@
|
|||
this.currentValue = '';
|
||||
this.$refs.select.reset();
|
||||
this.$emit('on-clear');
|
||||
},
|
||||
handleClickOutside () {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.input.blur();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue