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

754
Vistas
Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited

I'm getting this warning in vue:

    [Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. 
      at <GoodMacroElement macro= Object class="row mt-3" > 

I'm using the component this way

     <GoodMacroElement v-for="goodMacro in goodMacroDataObject" :macro="goodMacro" class="row mt-3"></GoodMacroElement>

and this is the Component:

<template>
    <div class="row">
      <div :class="style1">
        <img :src="img_src" alt="">
        {{ macro.name }}
      </div>
      <div class="col-md-6 pt-3 percentage-div">
        <span class="color-{{ level }}">{{ macro.value }}%</span>
      </div>
    </div>
    <div class="row">
        <div class="col-md-12 categories mb-3">
          <div class="row" v-for="category in macro.categories">
            <div class="col-md-6">
              {{ category.description }}
            </div>
            <div class="col-md-5" style="text-align:right">
              <strong :class="`color-${category.level}`">{{ category.name }}</strong>
            </div>
            <div class="col-md-1 row">
              <div :class="`level-${category.level} level-marker`" ></div>
            </div>
          </div>
        </div>
    </div>
</template>

<script>
export default {
  name: "GoodMacroElement",
  props:{
    macro: Object
  },
  data(){
    return {
      macroData:this.macro,
      style1: `col-md-6 first interactive-table-cell col-md-offset-3 col-md-6 pt-3 background-level-${this.macro.level}`,
      img_src: `/img/results/${this.macro.product_prefix}/macro/${this.macro.label}-${this.macro.level}.png`
    }
  }
}
</script>

<style scoped>

</style>

I tried changing :

props:{
        macro: String
      },

But didn't work , The app is working correctly , the data arrives to the component but I can't avoid this warning

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