There are 3 separate tags in my modal. I want to do different mathematical operations in each tag. There are 3 inputs in each tag. 2 of them to enter numbers and the other to give the result. For example, I have x + y = z problem in the first tag and I have to find the z value. In the second tag, let the formula x+y=z be the problem again, I have to enter the x and z values and find the y value.In the third tag I have to enter the y and z values in it and find the x value.My question is, I cannot write the values I need to find in 3 separate tags in a single computed?
Output:
Template:
<form>
<div class="row">
<div class="mb-3 col-sm-4 col-xs-12">
<h6 class="text-dark" for="purchasePrice">x</h6>
<input
type="text"
class="form-control"
autocomplete="off"
v-model="x"
/>
</div>
<div class="mb-3 col-sm-4 col-xs-12">
<h6 class="text-dark" for="salePrice">y</h6>
<input
type="text"
class="form-control"
autocomplete="off"
v-model="y"
/>
</div>
<div class="mb-3 col-sm-4 col-xs-12">
<h6 class="text-dark" for="marginResult">z</h6>
<input
type="text"
class="form-control"
autocomplete="off"
disabled
v-model="z"
/>
</div>
</div>
</form>
Script
data() {
return {
x: 0,
y: 0,
z: 0,
};
},
computed:{
},