修复:页面布局面包屑重复问题;

fix: the repeat problem of breadcrumbs in PageLayout.vue;
master
chenghongxing 4 years ago
parent 939f8640d3
commit 990daf2d27
  1. 4
      src/layouts/PageLayout.vue

@ -90,8 +90,10 @@ export default {
...mapMutations('setting', ['correctPageMinHeight']), ...mapMutations('setting', ['correctPageMinHeight']),
getRouteBreadcrumb() { getRouteBreadcrumb() {
let routes = this.$route.matched let routes = this.$route.matched
const path = this.$route.path
let breadcrumb = [] let breadcrumb = []
routes.forEach(route => { routes.filter(item => path.includes(item.path))
.forEach(route => {
const path = route.path.length === 0 ? '/home' : route.path const path = route.path.length === 0 ? '/home' : route.path
breadcrumb.push(this.$t(getI18nKey(path))) breadcrumb.push(this.$t(getI18nKey(path)))
}) })

Loading…
Cancel
Save