wangting
2024-12-30 306a9c4fde94c54d91aee5a69d59b993c7c707a1
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<template>
  <div class="avue-logo">
    <transition name="fade">
      <span v-if="isCollapse" class="avue-logo_subtitle" key="0">
       <img class="imgTop" :src=imgurl>
      </span>
    </transition>
    <transition-group name="fade">
      <template v-if="!isCollapse">
        <span>
          <img class="imgSpan" :src=imgurl>
        </span>
        <span class="avue-logo_title" key="1">
          <span>
            <img class="imgSpan" :src=imgurl>
          </span>
          <span class="indexTitle"> {{ website.indexTitle }}</span>
        </span>
      </template>
    </transition-group>
  </div>
</template>
 
<script>
import {mapGetters} from "vuex";
import img from "./favicon.png"
 
export default {
  name: "logo",
  data() {
    return {
      imgurl: img
    };
  },
  created() {
  },
  computed: {
    ...mapGetters(["website", "isCollapse"])
  },
  methods: {}
};
</script>
 
<style lang="scss" scoped>
.fade-leave-active {
  transition: opacity 0.3s;
}
 
.fade-enter-active {
  transition: opacity .3s;
}
 
.fade-enter,
.fade-leave-to {
  opacity: 0;
}
.avue-logo {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 64px;
  line-height: 64px;
  background-color: #20222a;
  font-size: 20px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 0.8);
  z-index: 1024;
  -webkit-transition: width .2s;
  transition: width .2s;
 
  &_title {
    display: block;
    text-align: center;
    font-weight: 300;
    font-size: 20px;
  }
 
  &_subtitle {
    display: block;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
  }
}
 
.imgSpan {
  position: absolute;
  top: 15px;
  left: 37px;
}
.imgTop{
  position: absolute;
  top: 15px;
  left: 12px;
}
.indexTitle{
  //background-image: linear-gradient(120deg, #54b6d0 16%, #3f8bdb, #3f8bdb);
  background-image: linear-gradient(-225deg, #5D9FFF 0%, #9cbcdc 48%, #6BBBFF 100%);
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
</style>