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

86
Vistas
Any way to control VueRouter Smoothscroll-Speed?

I can achieve smooth-scroll router-links with:

  <router-link :to="{ hash: 'home' }">Home</router-link>
  <router-link :to="{ hash: 'about' }">About</router-link>

and router.js:

import Vue from "vue";
import VueRouter from "vue-router";

import Home from "../vue/home";
import About from "../vue/about";

Vue.use(VueRouter);

export default new VueRouter ({
    mode: "history",
    routes: [
        {path: "/", name: "home", component: Home},
        {path: "/about", name: "about", component: About},
    ],
    scrollBehavior(to, from,  savedPosition) {
        return {
            selector: to.hash,
            behavior: 'smooth'
        }
    }
});

The smooth-scroll effect is a bit slow compared to vue's v-smooth-scroll class. Is there any way to control the smooth-scroll speed of VueRouter?

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

0

No.

Vue Router's Smooth Scrolling in implementing the native browser API ScrollToOptions.behavior. This is controlled by the client's browser. This can differ from system to system.

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