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

197
Vistas
vuejs computed functions not updating in v-model

I'm new to vueJS and I'm trying to restructure my data and display it in a TABLE. I used computed variantsData to create the new array.

My problem is that its displaying correctly but the fields are not updating

computed

variantsData() {
  const table = {
    varOneItems: this.variation1, // ['red','white]
  };

  const newArray = [];

    table.varOneItems.forEach((v1) => {
      newArray.push({
        var1: v1.name,
        var2: null,
        price: null,
        qty: 0,
        sku: null,
        image: false,
      });
    });

  return newArray;
}

template

    <tr v-for="(v, index) in variantsData" :key="index">
                <td>
                  <b-input-group prepend="$">
                    <b-form-input
                      type="number"
                      placeholder="Price"
                      v-model="v.price" <!-- not updating  -->
                    ></b-form-input>
                  </b-input-group>
                </td>
                <td>
                  <b-form-input
                    v-model="v.qty" <!-- not updating  -->
                    type="number"
                    placeholder="stock"
                  ></b-form-input>
                </td>
                <td>
                  <b-form-input type="text" v-model="v.sku"></b-form-input> <!-- not updating  -->
                </td>
              </tr>
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