上路由route/index.js
{
path: '/goodsList/Goods_Index',
name: 'Goods_Index',
component: GoodsIndex,
meta:{
title:'商品中心'
}
},//商品中心页面
{
path: '/goodsList/Hot_Goods',
name: 'Hot_Goods',
component: HotGoods,
meta:{
title:'热门商品'
}
},//热门商品页面
{
path: '/goodsList/SecKill_Goods',
name: 'SecKill_Goods',
component: SecKillGoods,
meta:{
title:'秒杀商品'
}
},//秒杀商品页面
{
path: '/helpCenter/HelpCenter_Com',
name: 'HelpCenter_Com',
component: HelpCenterCom,
meta: {
requireAuth: true,
title: '订单中心'
},
children:[
{
path: '/helpCenter/Common_Problem',
name: 'Common_Problem',
component: CommonProblem,
},//帮助中心-常见问题
],
},//帮助中心-公共组件
上子路由.vue
常见问题
积分消费
{{item.index}}
{{item.Capital}}
上面的栗子就可以实现,当点击左边的子菜单时,会把自己的子路由里的东西渲染到这个
亲测可用,实现了一个模块的功能,用官方的文档纠结了小半天,hh