Merge branch '2.0_upgrade' into '2.0'

2.0 upgrade

See merge request drip-team/iview!3
This commit is contained in:
jilen 2020-02-24 09:42:45 +08:00
commit 95add4925a

View file

@ -662,17 +662,23 @@
}
this.isFocused = true; // so we put back focus after clicking with mouse on option elements
} else {
this.query = '';
this.query = String(option.label).trim();
this.values = [option];
this.lastRemoteQuery = '';
this.hideMenu();
}
this.focusIndex = this.flatOptions.findIndex((opt) => {
if (!opt || !opt.componentOptions) return false;
return opt.componentOptions.propsData.value === option.value;
});
if (this.filterable){
const inputField = this.$el.querySelector('input[type="text"]');
if (!this.autoComplete) this.$nextTick(() => inputField.focus());
}
this.$emit('on-select', option); // # 4441
this.broadcast('Drop', 'on-update-popper');
this.$emit('on-select', this.publicValue); // # 4441
setTimeout(() => {
this.filterQueryChange = false;
}, ANIMATION_TIMEOUT);