<page-header-wrapper :title="title" @back="() => $router.go(-1)" :breadcrumb="{
        props: {
            routes: customRoutes,
            itemRender: defaultItemRender
        }
    }">
return {

customRoutes: [
    {
        path: '/',
        title: '首页'
    },
    {
        path: '/ruleCen/ruleSetList',
        title: '规则集类别'
    },
    {
        path: '/ruleCen/ruleList',
        title: '规则集列表'
    },
    {
        path: '',
        title: '规则集名称'
    },
]

},
methods: {
    defaultItemRender (_ref) {
        var route = _ref.route
        var routes = _ref.routes
        var h = _ref.h
        return (
            (routes.indexOf(route) === routes.length - 1 && h('span', [route.title])) ||
            h(
                'router-link',
                {
                    attrs: {
                        to: {
                            path: route.path || '/'
                        }
                    }
                },
                [route.title]
            )
        )
    }
}

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐