命名视图(同级多视图)

<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配置。

原文地址:https://www.cnblogs.com/alan2kat/p/7345570.html