This commit is contained in:
lifenglu 2019-10-14 11:42:58 +08:00
parent d5c7ce3017
commit e20098a32d
3 changed files with 32 additions and 19 deletions

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,9 +152,10 @@
remoteMethod (query) {
this.$emit('on-search', query);
},
handleChange (val) {
handleSelect (val) {
if (val === undefined || val === null) return;
this.currentValue = val;
this.$refs.input.blur();
this.$emit('on-select', val);
},

View file

@ -661,6 +661,7 @@
if (!this.autoComplete) this.$nextTick(() => inputField.focus());
}
this.broadcast('Drop', 'on-update-popper');
this.$emit('on-select', this.publicValue); // # 4441
setTimeout(() => {
this.filterQueryChange = false;
}, ANIMATION_TIMEOUT);