命名视图(同级多视图)

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

 

posted @ 2017-08-11 13:55  瓶子2333  阅读(386)  评论(0)    收藏  举报