fix select reset bug

pull/2/head
Leopoldthecoder 2016-08-31 17:10:41 +08:00
parent d26e237f81
commit 01e315c9b1
1 changed files with 3 additions and 4 deletions

View File

@ -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();