路由配置
import home from '@/pages/home'
import detail from '@/pages/detail'
{
name:'home',
path:'/home',
component:home,
children:[{
name:'detail',
path:'/home/detail',
component:detail
}]
}
html用法
// 左侧菜单
<router-link>home</router-link>
// 右侧内容
<router-view></router-view>
网友评论