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

82
Vistas
How to change element hint dynamically with Vuetify 3?

This is my component.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>

And this is component.ts

import { defineComponent, reactive, ref, Ref} from 'vue';
export default defineComponent({

  setup() {
     
    function onButtonClick() {
      
    }    
    return { onButtonClick }
  }
});

I want to change hint on button click, for example to This is a new hint. Could anyone say how to do in Vuetify 3 using Composition API?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Just create a ref property called hint inside the setup hook then bind it to the hint prop and update it when you click on the button:

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 }
  }
});

in template :


<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 Denunciar
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