Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

70
Visualizações
Vue Js. router/Index.js

Screenshot1

Hi everyone,

The screenshot shows a menu from a website built with vue js. What I want to do is to redirect to external resources such as google.com outside the site when this menu is clicked. Is it possible to do this in router/index.js?

let router = new Router({
base: process.env.BASE_URL,
mode: "history",
routes: [
    {
        path: "/xxx",
        name: "dashboard",
        meta: {},
        url: "www.xxxxafafa.org" // as this
    },

With the path field, it is understood which menu is the clicked menu. Since the code will enter here when this menu is clicked on the page, what I want to do is to redirect to any external source from within the block.

I will be waiting for your help. Thanks.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

There is Per-Route Guard

beforeEnter: (to, from, next) => {
    window.location.href = 'http://www.xxxxafafa.org'
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda