Commit f10b27f99dfd3877b8f837f7631f7f362efd5dc0
1 parent
393d8551
update Select
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
examples/routers/select.vue
src/components/select/select.vue
... | ... | @@ -630,7 +630,8 @@ |
630 | 630 | } |
631 | 631 | |
632 | 632 | if (this.filterable) { |
633 | - this.selectToChangeQuery = true; | |
633 | + // remote&filterable&multiple时,一次点多项,不应该设置true,因为无法置为false,下次的搜索会失效 | |
634 | + if (this.query !== '') this.selectToChangeQuery = true; | |
634 | 635 | this.query = ''; |
635 | 636 | this.$refs.input.focus(); |
636 | 637 | } |
... | ... | @@ -640,7 +641,7 @@ |
640 | 641 | if (this.filterable) { |
641 | 642 | this.findChild((child) => { |
642 | 643 | if (child.value === value) { |
643 | - this.selectToChangeQuery = true; | |
644 | + if (this.query !== '') this.selectToChangeQuery = true; | |
644 | 645 | this.query = child.label === undefined ? child.searchLabel : child.label; |
645 | 646 | } |
646 | 647 | }); |
... | ... | @@ -702,6 +703,10 @@ |
702 | 703 | this.$emit('on-query-change', val); |
703 | 704 | this.remoteMethod(val); |
704 | 705 | } |
706 | + this.focusIndex = 0; | |
707 | + this.findChild(child => { | |
708 | + child.isFocus = false; | |
709 | + }); | |
705 | 710 | } else { |
706 | 711 | if (!this.selectToChangeQuery) { |
707 | 712 | this.$emit('on-query-change', val); | ... | ... |