I've made multiple Vue watch fucntions affected each other. But It doesn't seem to operate as I intended.
When a user tab 'vinput01' and change, vinput02 change under only vinput01 functions. And When a user tab 'vinput02' and change value, 'vinput02' change only under vinput02 functions.
But now, my Code trigger infinite loop. Changing 'vinput01' affects 'vinput02' and 'vinput02' affects 'vinput01' at the same time.
Here is my Code. How can I avoid this problem??
data () {
return {
vinput01: '',
vinput02: '',
}
},
watch: {
vinput01: function(_val) {
this.vinput02 = _val *1.1
},
vinput02: function(_val) {
this.vinput01 = _val / 1.1
}