app.vue
<template>
<div id="app">
<router-view />
<router-view name="a"/>
<router-view name="b"/>
</div>
</template>
router.js
export default new Router({
routes: [
{
path: '/',
name: 'RouterVueTest',
components: {
default: RouterVueTest,
a: Foo,
b: Bar,
}
},
]
})
页面效果