vueRouter-面包屑-图标分隔符

2021-08-19  本文已影响0人  Angel_6c4e

在没有往页面写<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'
                }
            },
          ]
      }
]
上一篇下一篇

猜你喜欢

热点阅读