Skip to content

Commit

Permalink
fix(dao-select): 搜索完成没有清空
Browse files Browse the repository at this point in the history
  • Loading branch information
RonaLuo committed Apr 28, 2018
1 parent f934794 commit 737a947
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/dao-select/dao-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@
this.$on('on-chosen', (val) => {
this.closeMenu();
this.selectedValue = val;
// 清空 filter
if (this.filter && !this.asyncSearch) {
this.filter = '';
}
});
// 绑定处理异步的事件
this.$on('deal-async', (callback) => {
Expand Down Expand Up @@ -189,6 +193,8 @@
// 处理点击事件
handleClick() {
if (this.isDisabled) return;
// 值不存在时 清空filter
if (!this.selectedValue) this.filter = '';
if (this.async && !this.asyncComplete && !this.visible) {
this.decorateAsync();
} else {
Expand Down

0 comments on commit 737a947

Please sign in to comment.