const router = new VueRouter({
      routes: [
        // 重定向:
        // / 是默认的路径,页面第一打开的时候,就会访问这个路径
        // 当这个路径匹配成功后,通过指定的 redirect 就可以重定向到其他路由了
        { path: '/', redirect: '/home' },
        { path: '/home', component: Home }
      ]
    })

相关文章:

  • 2022-02-15
  • 2022-02-16
  • 2022-12-23
  • 2021-07-08
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2021-09-13
  • 2021-07-02
  • 2021-12-02
相关资源
相似解决方案