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

77
Views
¿Cómo cambiar la sugerencia de elemento dinámicamente con Vuetify 3?

Este es mi componente.vue:

 <template> <v-text-field name="Foo" :label="$t('foo')" type="text" hint="This is a hint" persistent-hint ></v-text-field> <v-btn color="primary" @click="onButtonClick()">Press</v-btn> </template>

Y esto es componente.ts

 import { defineComponent, reactive, ref, Ref} from 'vue'; export default defineComponent({ setup() { function onButtonClick() { } return { onButtonClick } } });

Quiero cambiar la sugerencia al hacer clic en el botón, por ejemplo, a This is a new hint . ¿Alguien podría decir cómo hacerlo en Vuetify 3 usando la API de composición?

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

0

Simplemente cree una propiedad de referencia llamada hint dentro del enlace de configuración, luego vincúlela al accesorio de hint y actualícela cuando haga clic en el botón:

 import { defineComponent, reactive, ref, Ref} from 'vue'; export default defineComponent({ setup() { const hint=ref('This is a hint') function onButtonClick() { hint.value="new hint" } return { onButtonClick, hint } } });

en plantilla:

 <template> <v-text-field name="Foo" :label="$t('foo')" type="text" :hint="hint" persistent-hint ></v-text-field> <v-btn color="primary" @click="onButtonClick()">Press</v-btn> </template>
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!