为什么?
需求:在一个路径映射一个组件,访问两个路径会分别渲染两个组件
怎么做?
const routes =[
{
path:'/home',
component:()=>important('../comportants/Home'),
children:[
{
path:'/home/news'
component:()=>important('../comportants/Home/news'),
}
]
},
{
component:()=>important('../comportants/About')
}
];