瀏覽代碼

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

qingwei.li 9 年之前
父節點
當前提交
0ed08bd937
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      packages/select/src/select.vue

+ 3 - 4
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();