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

106
Vistas
Random Landing Page (Vue / Javascript)

I would like to show a different .vue file when the visitor refreshes the Home page.

Right now I have one page called Home.vue I'm trying to load Home1.vue Home2.vue randomly on every refresh.

{
  path: '/',
  name: 'home',
  component: () => import('./views/Home.vue')
},

Maybe I have have one "homepage" but the whole content/template can be loaded randomly.

Can someone figure out how to archive this?

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

0

import function takes the path as the string may this will help you

const pages = ['home.vue', 'about.vue', 'third.vue']
import(`./views/${pages[Math.floor(Math.random()*pages.length)]}`)

Good luck!

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