为了账号安全,请及时绑定邮箱和手机立即绑定

vue vue-router 面包屑问题?

vue vue-router 面包屑问题?

喵喔喔 2018-11-14 13:53:24
vue+element UI 搭建的web项目,面包屑 首页>列表>内容如何书写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)                }那么我在这个面包屑中如何去写才可以在内容页面 可以显示 首页>列表>内容谢谢,在线等
查看完整描述

1 回答

?
郎朗坤

TA贡献1921条经验 获得超9个赞

你都遍历出来了,用V-for 循环显示出来就行了啊


查看完整回答
反对 回复 2018-12-18
  • 1 回答
  • 0 关注
  • 1108 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号