Commit 57bd5393c55e6f0101e8a2f92b5ae2dff9228ce2
1 parent
0f5c1b36
fix Select bug that can not select in group mode
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/components/select/select.vue
@@ -761,9 +761,9 @@ | @@ -761,9 +761,9 @@ | ||
761 | }, | 761 | }, |
762 | slotOptions(options, old){ | 762 | slotOptions(options, old){ |
763 | // #4626,当 Options 的 label 更新时,v-model 的值未更新 | 763 | // #4626,当 Options 的 label 更新时,v-model 的值未更新 |
764 | - if (options && options.length && this.values.length && !this.multiple) { | 764 | + if (this.flatOptions && this.flatOptions.length && this.values.length && !this.multiple) { |
765 | this.values = this.values.map(value => { | 765 | this.values = this.values.map(value => { |
766 | - const option = options.find(option => { | 766 | + const option = this.flatOptions.find(option => { |
767 | if (!option.componentOptions) return false; | 767 | if (!option.componentOptions) return false; |
768 | return option.componentOptions.propsData.value === value.value; | 768 | return option.componentOptions.propsData.value === value.value; |
769 | }); | 769 | }); |