Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

191
Vistas
Mathematical operations for each tag in Vue 3?

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:

enter image description here

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:{
  },
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda