update AutoComplete
This commit is contained in:
parent
7af00356a9
commit
b904fd871d
1 changed files with 7 additions and 1 deletions
|
@ -82,7 +82,8 @@
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
currentValue: this.value
|
currentValue: this.value,
|
||||||
|
disableEmitChange: false // for Form reset
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -99,11 +100,16 @@
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value (val) {
|
value (val) {
|
||||||
|
this.disableEmitChange = true;
|
||||||
this.currentValue = val;
|
this.currentValue = val;
|
||||||
},
|
},
|
||||||
currentValue (val) {
|
currentValue (val) {
|
||||||
this.$refs.select.query = val;
|
this.$refs.select.query = val;
|
||||||
this.$emit('input', val);
|
this.$emit('input', val);
|
||||||
|
if (this.disableEmitChange) {
|
||||||
|
this.disableEmitChange = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$emit('on-change', val);
|
this.$emit('on-change', val);
|
||||||
this.dispatch('FormItem', 'on-form-change', val);
|
this.dispatch('FormItem', 'on-form-change', val);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue