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

245
Vistas
How can we set a default value of a v-text-field of vuetify in nuxtjs?

I am new to vuejs and nuxtjs and at my company they are using vuetify. I need to set default value as 0 to v-text-field fields in the application but I cant find the to do so in the vuetify doc.

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

0

You can provide the default value 0 on the actual property bound to v-model from data object itself. <v-text-field> is just a wrapper around an html <input>. Hence, it will bind the data in same way how we are binding for input.

Demo :

new Vue({
  el: '#app',
  vuetify: new Vuetify(),
  data: () => ({
    textFieldValue: 0,
  })
})
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>

<div id="app">
    <v-text-field v-model="textFieldValue"/>
  </div>
</div>

about 4 years ago · Juan Pablo Isaza Denunciar

0

You can use the v-model directive and just set the default value to 0 in your data property. Example: <v-text-field v-model="textField" label="My Text Field/> and in your data: data: () => ({ textField: 0, })

Hope it's the right answer, cheers

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