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

61
Views
El valor predeterminado de la biblioteca vue-select no funciona correctamente

Esta es la biblioteca que estoy usando.

vue-select

Y tengo este tipo de datos.

 [ { text: "AAA", value: 1 }, { text: "BBB", value: 2 }, ]
 <v-select id="modal-job_type" :value="1" // v-model also doesnt work for me item-value="value" name="job_type" :options="jobTypeOptions" label="text" />

Espero ver "AAA" seleccionado.

Pero en su lugar veo el texto "1".

¿Qué está mal?

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

0

Supongo que debe establecer un valor de opciones para v-model, en lugar del índice. (Sin embargo, no pude encontrar una página donde se indique claramente en el documento oficial).

Se vería como;

 const options = [ { text: "AAA", value: 1 }, { text: "BBB", value: 2 }, ] const selected = ref(options[1]) // Setting initial value
 <v-select v-model="selected" label="text" />

Además, Vue Select no tiene propiedad item-value . Parece que estás confundido con el v-select de Vuetify. https://vuetifyjs.com/en/api/v-select/#props-item-value

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!