From 01e315c9b1365e57627630ffe2d0414a36aa928d Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Wed, 31 Aug 2016 17:10:41 +0800 Subject: [PATCH] fix select reset bug --- packages/select/src/select.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/select/src/select.vue b/packages/select/src/select.vue index 2b4dcfe65..dd5812bc3 100644 --- a/packages/select/src/select.vue +++ b/packages/select/src/select.vue @@ -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();