去除首页面包屑
This commit is contained in:
parent
dbc0b1db88
commit
dc90e752ff
@ -19,8 +19,10 @@ function getBreadcrumb() {
|
||||
let matched = route.matched.filter(item => item.meta && item.meta.title);
|
||||
const first = matched[0]
|
||||
// 判断是否为首页
|
||||
|
||||
// 不自动加“首页”
|
||||
if (!isDashboard(first)) {
|
||||
matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched)
|
||||
matched = matched; // 或直接不处理
|
||||
}
|
||||
|
||||
levelList.value = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
@ -63,4 +65,4 @@ getBreadcrumb();
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user