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

199
Vistas
Vue 3 set value to router meta

I have some problems with Vue 3 meta tags. The problem is, when I want to set value to router, it's loading setup twice, and sending all requests and everything in setup() double.

So I have router defined like this:

 {
        path: '/product/:id',
        name: 'products',
        component: () => import('@/components/layouts/layout.vue'),
        children: [
          {
            path: '',
            name: 'product.details',
            meta: {
              title: "My website",
              layout: 'default',
              requiredAuth: false,
              breadcrumbs: ref("")
            },
            props: (route: any) => ({
              id:  parseInt(route.params.id),
            }),
            component: () => import('@/components/views/ProductDetailsPage.vue'),
          }
}

So In ProductDetailsPage.VUE I have useRoute function and assigning breadcrumbs value, and it looks like so:

setup() {
  const route = useRoute();
  route.meta.breadcrumbs.value = 'test'
}

Sorry, I can't share full code here, but the problem is clearly from this line of code. When I remove route.meta.breadcrumbs.value = 'test' it's working fine, but I need to set this breadcrumbs.

Anyone had similar problems? Am I doing something wrong here?

about 4 years ago · Juan Pablo Isaza
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