Commit 393d85515e2311e758d5d1328742e8e85b067356
1 parent
d87ce40a
update Select
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
src/components/select/select.vue
| @@ -593,6 +593,10 @@ | @@ -593,6 +593,10 @@ | ||
| 593 | this.$nextTick(() => { | 593 | this.$nextTick(() => { |
| 594 | this.broadcastQuery(''); | 594 | this.broadcastQuery(''); |
| 595 | }); | 595 | }); |
| 596 | + } else { | ||
| 597 | + this.findChild(child => { | ||
| 598 | + child.selected = this.model.indexOf(child.value) > -1; | ||
| 599 | + }); | ||
| 596 | } | 600 | } |
| 597 | this.slotChange(); | 601 | this.slotChange(); |
| 598 | this.updateOptions(true, true); | 602 | this.updateOptions(true, true); |
| @@ -603,6 +607,10 @@ | @@ -603,6 +607,10 @@ | ||
| 603 | this.$nextTick(() => { | 607 | this.$nextTick(() => { |
| 604 | this.broadcastQuery(''); | 608 | this.broadcastQuery(''); |
| 605 | }); | 609 | }); |
| 610 | + } else { | ||
| 611 | + this.findChild(child => { | ||
| 612 | + child.selected = this.model.indexOf(child.value) > -1; | ||
| 613 | + }); | ||
| 606 | } | 614 | } |
| 607 | this.slotChange(); | 615 | this.slotChange(); |
| 608 | this.updateOptions(true, true); | 616 | this.updateOptions(true, true); |
| @@ -670,6 +678,11 @@ | @@ -670,6 +678,11 @@ | ||
| 670 | } else { | 678 | } else { |
| 671 | this.$refs.input.select(); | 679 | this.$refs.input.select(); |
| 672 | } | 680 | } |
| 681 | + if (this.remote) { | ||
| 682 | + this.findChild(child => { | ||
| 683 | + child.selected = this.model.indexOf(child.value) > -1; | ||
| 684 | + }); | ||
| 685 | + } | ||
| 673 | } | 686 | } |
| 674 | this.broadcast('Drop', 'on-update-popper'); | 687 | this.broadcast('Drop', 'on-update-popper'); |
| 675 | } else { | 688 | } else { |