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

408
Views
Botón <v-btn-toggle> en vue.js y vuetify que causan el error "La propiedad o el método no están definidos"

Soy nuevo en vuetify, y es la primera vez que uso <v-btn-toggle>

Quiero agregar esta palanca para poder filtrar mi lista de usuarios según el tipo de usuario, empleado, gerente o administrador...

aquí hay una muestra de mi código:

 <v-btn-toggle v-model="toggle_user" multiple > <v-btn :value="employee"> Employees </v-btn> <v-btn :value="manager"> Managers </v-btn> <v-btn :value="admin"> Admins </v-btn> </v-btn-toggle>
 data() { return { toggle_user: 1, } },

Mostré el resultado en la página usando: <p>{{toggle_user}}</p> y muestra una matriz según los valores seleccionados....

Pero cada vez que hago clic en uno de los tres botones, aparece un error:

 Property or method ["employee" or "manager" or "admin"] is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.

¿Qué tiene de malo el código que escribí?

¡Muchas gracias si puedes ayudar! ¡Que tengas un lindo día!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Está justo ahí en el mensaje de error. Hay datos que aún no se han definido, pero que se han referenciado durante el renderizado.

Intente lo siguiente y vea si eso le da el resultado que está buscando.

 <script> export default { data() { return { toggle_user:1, employee: "employee", manager: "manager", admin: "admin", }; }, }; </script>
about 4 years ago · Juan Pablo Isaza Report
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!