tj
2025-06-05 bba272999cc546f65781bf3d20245a3f819af67f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<template>
  <div>
    <div v-if="menuTabs.length || show">
      <ul class="menu-tab">
        <router-link :to="tab.path" v-for="tab in menuTabs" :key="tab.path" ref="menuTabs">
          <li ref="tabList" class="menu-li">
            <i :class="tab.icon" /> <span class="title">{{ $filters.filterTitle(tab.title) }}</span>
          </li>
        </router-link>
      </ul>
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {
      show: false,
    }
  },
  computed: {
    stageInfo() {
      return this.$store.getters.getStageInfo(this.$route.name)
    },
    menuTabs() {
      if (this.stageInfo.length < 2) {
        return []
      }
      const father = this.stageInfo[this.stageInfo.length - 2]
      if (father.type === 'tab') {
        const menus = []
        father.children.forEach(item => {
          if (item.inNav) {
            menus.push({
              icon: item.icon || '',
              title: item.title,
              path: item.route,
            })
          }
        })
        return menus
      }
      return []
    },
  },
}
</script>
 
<style lang="scss" scoped>
.router-link-active {
  background: black;
}
 
.menu-tab {
  width: 100%;
  height: 38px;
  line-height: 38px;
  background: $reuse-tab-item-background;
  font-size: 14px;
  font-weight: 400;
  color: rgba(140, 152, 174, 1);
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
 
  .router-link-exact-active,
  .router-link-active {
    background: $app-main-background;
    color: $theme;
  }
 
  .menu-li {
    width: 120px;
    height: 38px;
    cursor: pointer;
    display: flex;
    justify-content: center;
 
    .imgIcon {
      width: 16px;
      height: 16px;
      margin: 0 auto;
    }
    .title {
      margin-left: 5px;
    }
  }
}
</style>