mirror of https://github.com/ElemeFE/element
Select: fix value clear bug when value is initialized in mounted hook
parent
72a66e8c48
commit
a11e8d115c
|
@ -216,7 +216,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
selected(val) {
|
selected(val, oldVal) {
|
||||||
if (this.multiple) {
|
if (this.multiple) {
|
||||||
if (this.selected.length > 0) {
|
if (this.selected.length > 0) {
|
||||||
this.currentPlaceholder = '';
|
this.currentPlaceholder = '';
|
||||||
|
@ -247,7 +247,7 @@
|
||||||
this.selectedInit = false;
|
this.selectedInit = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.valueChangeBySelected = true;
|
if (val.value === oldVal.value) return;
|
||||||
this.$emit('input', val.value);
|
this.$emit('input', val.value);
|
||||||
this.$emit('change', val.value);
|
this.$emit('change', val.value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue