Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

196
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda