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

131
Vistas
vue js increase the value with mousedown

With this code, the pos_number only increases by one when the mouse is held down. How to make a button that will increase the value as long as the mouse is held down?

<button
  @mousedown="setValue({name: 'robotx_increase',value: (robotx_increase = 'true'),});robotx_pos_number ++ "
  @mouseup="setValue({name: 'robotx_increase',value: (robotx_increase = 'false'),})">
</button>

data() {
    return {
      robotx_pos_number: 0
    }
  },
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You could call a function like 'startAdding()' on the mousedown event, which uses the setInterval method that keeps adding 1 to 'robotx_pos_number' every x milliseconds. This interval should then be cleared with the mouseup event.

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