Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

329
Views
Error al ejecutar 'setAttribute' en 'Elemento': '0' no es un nombre de atributo válido

He creado un componente Vue 3 muy simple:

 <template> <input type="text" :value="value" > </template> <script lang="ts"> import { defineComponent } from 'vue' export default defineComponent({ props:{ value: {type: String, default: ''} } }); </script>

Con el siguiente HTML, estoy tratando de representar el componente en el navegador:

 <div id="app"> {{message}} <my-input></my-input> </div>

Esto funciona correctamente, pero falla cuando intento pasar el atributo de value a este componente:

 <my-input :value="message"></my-input>

Este es un error, me sale en la consola del navegador:

 Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': '0' is not a valid attribute name. at patchAttr (https://unpkg.com/vue@next:9333:18) at patchProp (https://unpkg.com/vue@next:9539:11) at mountElement (https://unpkg.com/vue@next:6051:27) at processElement (https://unpkg.com/vue@next:6024:15) at patch (https://unpkg.com/vue@next:5944:23) at ReactiveEffect.componentUpdateFn [as fn] (https://unpkg.com/vue@next:6484:23) at ReactiveEffect.run (https://unpkg.com/vue@next:580:31) at setupRenderEffect (https://unpkg.com/vue@next:6603:11) at mountComponent (https://unpkg.com/vue@next:6386:11) at processComponent (https://unpkg.com/vue@next:6344:19)

Cualquier comentario por qué estoy recibiendo este error. Gracias por tu ayuda.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!