fixed #3722 that check expected value status
This commit is contained in:
parent
9ccd81961b
commit
73b01ee06b
1 changed files with 7 additions and 6 deletions
|
@ -230,9 +230,7 @@
|
||||||
}).filter(Boolean);
|
}).filter(Boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getInitialValue().length > 0 && this.selectOptions.length === 0){
|
this.checkUpdateStatus();
|
||||||
this.hasExpectedValue = true;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|
||||||
|
@ -632,15 +630,18 @@
|
||||||
},
|
},
|
||||||
updateSlotOptions(){
|
updateSlotOptions(){
|
||||||
this.slotOptions = this.$slots.default;
|
this.slotOptions = this.$slots.default;
|
||||||
|
},
|
||||||
|
checkUpdateStatus() {
|
||||||
|
if (this.getInitialValue().length > 0 && this.selectOptions.length === 0) {
|
||||||
|
this.hasExpectedValue = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value(value){
|
value(value){
|
||||||
const {getInitialValue, getOptionData, publicValue} = this;
|
const {getInitialValue, getOptionData, publicValue} = this;
|
||||||
|
|
||||||
if (getInitialValue().length > 0) {
|
this.checkUpdateStatus();
|
||||||
this.hasExpectedValue = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value === '') this.values = [];
|
if (value === '') this.values = [];
|
||||||
else if (JSON.stringify(value) !== JSON.stringify(publicValue)) {
|
else if (JSON.stringify(value) !== JSON.stringify(publicValue)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue