fix AutoComplete on-select event error
This commit is contained in:
parent
ed741b1666
commit
dd35ff0f8c
1 changed files with 3 additions and 2 deletions
|
@ -13,7 +13,7 @@
|
||||||
remote
|
remote
|
||||||
auto-complete
|
auto-complete
|
||||||
:remote-method="remoteMethod"
|
:remote-method="remoteMethod"
|
||||||
@on-change="handleChange"
|
@on-select="handleSelect"
|
||||||
@on-clickoutside="handleClickOutside"
|
@on-clickoutside="handleClickOutside"
|
||||||
:transfer="transfer">
|
:transfer="transfer">
|
||||||
<slot name="input">
|
<slot name="input">
|
||||||
|
@ -152,7 +152,8 @@
|
||||||
remoteMethod (query) {
|
remoteMethod (query) {
|
||||||
this.$emit('on-search', query);
|
this.$emit('on-search', query);
|
||||||
},
|
},
|
||||||
handleChange (val) {
|
handleSelect (option) {
|
||||||
|
const val = option.value;
|
||||||
if (val === undefined || val === null) return;
|
if (val === undefined || val === null) return;
|
||||||
this.currentValue = val;
|
this.currentValue = val;
|
||||||
this.$refs.input.blur();
|
this.$refs.input.blur();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue