在没有往页面写<router-view>标签的情况下,只单纯通过路由控制面包屑分隔符:
展示效果
rouer.js文件:
export const constantRouterMap = [
{
path: '/oms',
component: Layout,
redirect: '/oms/order',
name: 'oms',
meta: {
title: '订单',
icon: 'order'
},
children: [
//内购订单详情
{
path: "/InappPurchas",
component: {
render(c) {
return c('router-view')
}
},
redirect: '/oms/InappPurchas',
meta: {
title: '内购订单',
icon: 'product-list'
},
children: [{
path: '/oms/InappPurchasDetail',
name: 'InappPurchasDetail',
component: (resolve) => require(['@/views/oms/InappPurchas/detail'], resolve),
meta: {
title: '内购详情',
icon: 'product-list'
}
}, ]
},
//内购订单
{
path: 'InappPurchas',
name: 'InappPurchas',
component: () => import('@/views/oms/InappPurchas/index'),
meta: {
title: '内购订单',
icon: 'product-list'
}
},
]
}
]
网友评论