mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-05 13:37:45 +08:00
优化面包屑导航数据
This commit is contained in:
parent
c003834bd8
commit
fdd3a63f84
@ -37,7 +37,7 @@
|
||||
<div class="breadcrumb">
|
||||
<span v-for="(bc, bcIndex) in item.breadcrumb" :key="bcIndex">
|
||||
{{ bc }}
|
||||
<i class="el-icon-arrow-right" />
|
||||
<svg-icon name="el-icon-arrow-right" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="path">{{ item.path }}</div>
|
||||
@ -347,8 +347,11 @@ function scrollTo(offsetTop) {
|
||||
@include text-overflow(1, true);
|
||||
}
|
||||
.breadcrumb {
|
||||
span:last-child i {
|
||||
display: none;
|
||||
span {
|
||||
margin-right: 5px;
|
||||
&:last-child i {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,13 +43,7 @@ const breadcrumbList = computed(() => {
|
||||
})
|
||||
}
|
||||
if (route.meta.breadcrumbNeste) {
|
||||
route.meta.breadcrumbNeste.map((item, index) => {
|
||||
let tmpItem = deepClone(item)
|
||||
if (index != 0) {
|
||||
tmpItem.path = `${route.meta.breadcrumbNeste[0].path}/${item.path}`
|
||||
}
|
||||
breadcrumbList.push(tmpItem)
|
||||
})
|
||||
breadcrumbList.push(...deepClone(route.meta.breadcrumbNeste))
|
||||
}
|
||||
return breadcrumbList
|
||||
})
|
||||
|
@ -191,7 +191,7 @@ const actions = {
|
||||
item.children = flatAsyncRoutes(item.children, [{
|
||||
path: item.path,
|
||||
title: item.meta.title
|
||||
}])
|
||||
}], item.path)
|
||||
}
|
||||
})
|
||||
commit('setDefaultOpenedPaths', routes)
|
||||
@ -224,7 +224,7 @@ const actions = {
|
||||
item.children = flatAsyncRoutes(item.children, [{
|
||||
path: item.path,
|
||||
title: item.meta.title
|
||||
}])
|
||||
}], item.path)
|
||||
}
|
||||
})
|
||||
commit('setDefaultOpenedPaths', routes)
|
||||
|
Loading…
Reference in New Issue
Block a user