fix Select bug that can not select in group mode

This commit is contained in:
梁灏 2018-12-22 08:47:52 +08:00
parent 0f5c1b3640
commit 57bd5393c5

View file

@ -761,9 +761,9 @@
}, },
slotOptions(options, old){ slotOptions(options, old){
// #4626 Options label v-model // #4626 Options label v-model
if (options && options.length && this.values.length && !this.multiple) { if (this.flatOptions && this.flatOptions.length && this.values.length && !this.multiple) {
this.values = this.values.map(value => { this.values = this.values.map(value => {
const option = options.find(option => { const option = this.flatOptions.find(option => {
if (!option.componentOptions) return false; if (!option.componentOptions) return false;
return option.componentOptions.propsData.value === value.value; return option.componentOptions.propsData.value === value.value;
}); });