mirror of https://github.com/ElemeFE/element
commit
275d092dbb
|
@ -197,13 +197,12 @@
|
|||
});
|
||||
}
|
||||
if (!this.multiple) {
|
||||
if (val === '') {
|
||||
this.selected = {};
|
||||
this.selectedLabel = '';
|
||||
}
|
||||
let option = this.options.filter(option => option.value === val)[0];
|
||||
if (option) {
|
||||
this.$emit('addOptionToValue', option);
|
||||
} else {
|
||||
this.selected = {};
|
||||
this.selectedLabel = '';
|
||||
}
|
||||
}
|
||||
this.resetHoverIndex();
|
||||
|
|
Loading…
Reference in New Issue