Commit 2f373551 authored by kingwl's avatar kingwl Committed by 杨奕

Select: fix priority of label and value

parent 807c0607
......@@ -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;
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment