Merge remote-tracking branch 'iview/2.0' into 2.0

This commit is contained in:
Роман Ковжогин 2018-12-27 12:21:28 +03:00
commit ce124aeb57
16 changed files with 246 additions and 207 deletions

View file

@ -762,21 +762,12 @@
},
slotOptions(options, old){
// #4626 Options label v-model
if (options && options.length && this.values.length && !this.multiple) {
this.values = this.values.map(value => {
const option = options.find(option => {
if (!option.componentOptions) return false;
return option.componentOptions.propsData.value === value.value;
});
if(!option) return null;
const label = getOptionLabel(option);
return {
value: value.value,
label: label
};
}).filter(Boolean);
// remote getInitialValue bug
if (!this.remote) {
const values = this.getInitialValue();
if (this.flatOptions && this.flatOptions.length && values.length && !this.multiple) {
this.values = values.map(this.getOptionData).filter(Boolean);
}
}
// dropdown