vue組件切換和路由跳轉(zhuǎn)哪個好?性能速度一樣嗎,各自的區(qū)別是什么呀?假如有兩個tab,使用組件可以用<component v-bind:is="currentTabComponent"></component>路由使用routes: [ {
path: 'page1',
component: page1
},
{ path: 'page2',
component: page2
}]嵌套路由使用routes: [{ path: '/page/:id', component: page,
children: [
{
path: 'page1',
component: page1
},
{ path: 'page2',
component: page2
}
]
}]
添加回答
舉報(bào)
0/150
提交
取消