Merge branch 'next' of github.com:eleme/element-ui into next

pull/2/head
qingwei.li 2016-09-01 12:02:36 +08:00
commit 0ed08bd937
1 changed files with 3 additions and 4 deletions

View File

@ -197,13 +197,12 @@
}); });
} }
if (!this.multiple) { if (!this.multiple) {
if (val === '') {
this.selected = {};
this.selectedLabel = '';
}
let option = this.options.filter(option => option.value === val)[0]; let option = this.options.filter(option => option.value === val)[0];
if (option) { if (option) {
this.$emit('addOptionToValue', option); this.$emit('addOptionToValue', option);
} else {
this.selected = {};
this.selectedLabel = '';
} }
} }
this.resetHoverIndex(); this.resetHoverIndex();