Commit 12bd19d7a8634c6f10a1d53f722ccd4b9b3022ce

Authored by Aresn
Committed by GitHub
2 parents 2810d8c7 eda30489

Merge pull request #184 from candyHuang/master

可搜索下拉菜单 输入无匹配时,移出焦点,应该清楚输入的query
Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
src/components/select/select.vue
@@ -442,7 +442,7 @@ @@ -442,7 +442,7 @@
442 const model = this.model; 442 const model = this.model;
443 443
444 if (this.multiple) { 444 if (this.multiple) {
445 - // 445 + this.query = '';
446 } else { 446 } else {
447 if (model !== '') { 447 if (model !== '') {
448 this.findChild((child) => { 448 this.findChild((child) => {
@@ -450,6 +450,8 @@ @@ -450,6 +450,8 @@
450 this.query = child.label === undefined ? child.searchLabel : child.label; 450 this.query = child.label === undefined ? child.searchLabel : child.label;
451 } 451 }
452 }); 452 });
  453 + } else {
  454 + this.query = '';
453 } 455 }
454 } 456 }
455 }, 300); 457 }, 300);