diff --git a/examples/routers/select.vue b/examples/routers/select.vue index 8fd13473..4c935e1d 100644 --- a/examples/routers/select.vue +++ b/examples/routers/select.vue @@ -82,7 +82,7 @@ return item.label.toLowerCase() .indexOf(query.toLowerCase()) > -1; }); - }, 500); + }, 200); } else { this.options = []; } diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 6229e6f0..95d07e00 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -630,7 +630,8 @@ } if (this.filterable) { - this.selectToChangeQuery = true; + // remote&filterable&multiple时,一次点多项,不应该设置true,因为无法置为false,下次的搜索会失效 + 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);