Commit a11e8d11 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by cinwell.li

Select: fix value clear bug when value is initialized in mounted hook

parent 72a66e8c
......@@ -216,7 +216,7 @@
});
},
selected(val) {
selected(val, oldVal) {
if (this.multiple) {
if (this.selected.length > 0) {
this.currentPlaceholder = '';
......@@ -247,7 +247,7 @@
this.selectedInit = false;
return;
}
this.valueChangeBySelected = true;
if (val.value === oldVal.value) return;
this.$emit('input', val.value);
this.$emit('change', val.value);
}
......
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