yuyu
2023-08-10 6c496684e92d7d0d90b50de55f77e3ee93bbabe1
src/components/Breadcrumb/index.vue
@@ -29,12 +29,12 @@
  methods: {
    getBreadcrumb() {
      // only show routes with meta.title
      let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
      const first = matched[0]
      if (!this.isDashboard(first)) {
        matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
      }
      const matched = this.$route.matched.filter(item => item.meta && item.meta.title)
      // const first = matched[0]
      // console.log(this.isDashboard(first))// 判断是否有主页
      // if (!this.isDashboard(first)) {
      //   matched = [{ path: '/home', meta: { title: '主页', icon: 'el-icon-s-home' }}].concat(matched)
      // }
      this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
    },
@@ -43,7 +43,7 @@
      if (!name) {
        return false
      }
      return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
      return name.trim().toLocaleLowerCase() === 'home'.toLocaleLowerCase()
    },
    pathCompile(path) {
      // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
@@ -69,7 +69,8 @@
  font-size: 14px;
  padding: 12px 24px;
  height: 38px;
  width: 100%;
  // width: 100%;
  margin: 0px 9px;
  background: #fff;
  // margin-left: px;
  .no-redirect {