准备前工作
router.js
{
path: '/propertySystem',
name: '档案信息',
meta: {
title: 'index',
type: "propertySystem"
},
component: propertySystem,
redirect:"/todayMsg",
children:[
{
component: todayMsg,
name: '今日信息',
path:"/todayMsg"
},
{
component: travelRecords,
name: '出行记录',
path:"/travelRecords"
},
{
component: abnormalTotal,
name: '异常记录',
path:"/abnormalTotal"
},
{
component: fileTotal,
name: '档案汇总',
path:"/fileTotal"
},
]
},
html
<strong class="title">{{$route.name}}</strong>
<el-breadcrumb separator="/" class="breadcrumb-inner">
<el-breadcrumb-item v-for="item in $route.matched" :key="item.path">
{{ item.name }}
</el-breadcrumb-item>
</el-breadcrumb>