update Select

This commit is contained in:
梁灏 2017-05-08 17:04:25 +08:00
parent 393d85515e
commit f10b27f99d
2 changed files with 8 additions and 3 deletions

View file

@ -82,7 +82,7 @@
return item.label.toLowerCase()
.indexOf(query.toLowerCase()) > -1;
});
}, 500);
}, 200);
} else {
this.options = [];
}

View file

@ -630,7 +630,8 @@
}
if (this.filterable) {
this.selectToChangeQuery = true;
// remote&filterable&multipletruefalse
if (this.query !== '') this.selectToChangeQuery = true;
this.query = '';
this.$refs.input.focus();
}
@ -640,7 +641,7 @@
if (this.filterable) {
this.findChild((child) => {
if (child.value === value) {
this.selectToChangeQuery = true;
if (this.query !== '') this.selectToChangeQuery = true;
this.query = child.label === undefined ? child.searchLabel : child.label;
}
});
@ -702,6 +703,10 @@
this.$emit('on-query-change', val);
this.remoteMethod(val);
}
this.focusIndex = 0;
this.findChild(child => {
child.isFocus = false;
});
} else {
if (!this.selectToChangeQuery) {
this.$emit('on-query-change', val);