mirror of https://github.com/ElemeFE/element
Select: fix priority of label and value
parent
807c06071d
commit
2f37355136
|
@ -50,6 +50,10 @@
|
|||
return this.label || ((typeof this.value === 'string' || typeof this.value === 'number') ? this.value : '');
|
||||
},
|
||||
|
||||
currentValue() {
|
||||
return this.value || this.label || '';
|
||||
},
|
||||
|
||||
parent() {
|
||||
let result = this.$parent;
|
||||
while (!result.isSelect) {
|
||||
|
|
|
@ -421,7 +421,7 @@
|
|||
} else {
|
||||
let optionIndex = -1;
|
||||
this.selected.forEach((item, index) => {
|
||||
if (item === option || item.currentLabel === option.currentLabel) {
|
||||
if (item === option || item.currentValue === option.currentValue) {
|
||||
optionIndex = index;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue