<router-view class="view one"></router-view>

<router-view class="view two" name="a"></router-view>

<router-view class="view three" name="b"></router-view>

JS:

routes: [ { path: '/',redirect: '/b' ,components: { default: Foo, a: Bar, b: Baz } } ]

重定向:跳转到redirect的地址。

 

别名:url匹配为/b,但路由仍然匹配到视图/a

routes: [ { path: '/a', component: A, alias: '/b' } ]

 

在routes配置。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2021-11-12
  • 2021-07-23
  • 2022-02-03
  • 2021-12-01
猜你喜欢
  • 2021-08-10
  • 2022-01-22
  • 2022-03-05
  • 2021-09-17
  • 2021-09-18
  • 2021-06-06
  • 2021-08-29
相关资源
相似解决方案