javascript - vue vue-router breadcrumb issue?
学习ing
学习ing 2017-06-12 09:31:30
0
1
967

Web project built by vue element UI, breadcrumbs Homepage>List>Content
How to write router.js

{
            path: '/index',
            component: CdnLayout,
            children: [
                { path: 'list', component: List, name: '列表页' },
                { path: 'list/detal', component: Detail, name: '内容'}
            ]
        },
 let matched = this.$route.matched.filter(item => item.name;
                );
                const first = matched[0];
                if (first && (first.name !== '首页' || first.path !== '')) {
                     matched = [{ name: '首页', path: '/index' }].concat(matched)

                }

So how do I write in this breadcrumb so that it can be displayed on the content page Home>List>Content

Thank you, waiting online

学习ing
学习ing

reply all(1)
过去多啦不再A梦

You have already traversed it, just use V-for loop to display it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template