doum
2025-09-09 9e705c30a3370174a28e8d8d01a50bc7c2bf05ba
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
<template>
  <div class="main-header">
    <div class="header">
      <h2>
        <i class="el-icon-s-unfold" v-if="menuData.collapse" @click="switchCollapseMenu(null)"></i>
        <i class="el-icon-s-fold" v-else @click="switchCollapseMenu(null)"></i>
        {{title}}
      </h2>
      <tagsview class="tags"></tagsview>
    </div>
  </div>
</template>
 
<script>
import { mapState, mapMutations } from 'vuex'
import tagsview from "./tagsview.vue"
export default {
  name: 'Header',
  components: { tagsview },
  computed: {
    ...mapState(['menuData']),
    title () {
      return this.$route.meta.title
    }
  },
  methods: {
    ...mapMutations(['switchCollapseMenu']),
  }
}
</script>
 
<style scoped lang="scss">
@import "@/assets/style/variables.scss";
.header {
  overflow: hidden;
  padding: 0 25px;
  background: #fff;
  height: 100%;
  display: flex;
  overflow: hidden;
  h2 {
    flex-shrink: 0;
    line-height: 48px;
    width: 240px;
    font-size: 19px;
    color: #606263;
    font-weight: normal;
    display: inline;
    & > i {
      font-size: 20px;
      margin-right: 12px;
    }
  }
}
// .tags {
//     padding-bottom: 16px;
//   }
 
</style>