fix AutoComplete on-select event error

This commit is contained in:
梁灏 2019-12-16 11:30:00 +08:00
parent ed741b1666
commit dd35ff0f8c

View file

@ -13,7 +13,7 @@
remote
auto-complete
:remote-method="remoteMethod"
@on-change="handleChange"
@on-select="handleSelect"
@on-clickoutside="handleClickOutside"
:transfer="transfer">
<slot name="input">
@ -152,7 +152,8 @@
remoteMethod (query) {
this.$emit('on-search', query);
},
handleChange (val) {
handleSelect (option) {
const val = option.value;
if (val === undefined || val === null) return;
this.currentValue = val;
this.$refs.input.blur();