shuishen
2024-01-19 4f8f5e5375b82a5ebc1f67f389b934b3b757f062
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
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-12-14 17:10:00
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-01-19 15:47:47
 * @FilePath: \jczz_web\src\page\index\logo.vue
 * @Description: 
 * 
 * Copyright (c) 2024 by shuishen, All Rights Reserved. 
-->
<template>
    <div class="avue-logo">
        <transition name="fade">
            <span v-if="keyCollapse" class="avue-logo_subtitle" key="0">
                {{ website.logo }}
            </span>
        </transition>
        <transition-group name="fade">
            <template v-if="!keyCollapse">
                <span class="avue-logo_title" key="1">{{ webTitle }} </span>
            </template>
        </transition-group>
    </div>
</template>
 
<script>
import { getStore } from "@/util/store"
import { mapGetters } from "vuex"
 
export default {
    name: "logo",
    data () {
        return {
            webTitle: getStore({ name: "webTitle" })
        }
    },
    created () { },
    computed: {
        ...mapGetters(["website", "keyCollapse"])
    },
    methods: {}
}
</script>
 
<style lang="scss">
.fade-leave-active {
    transition: opacity 0.2s;
}
 
.fade-enter-active {
    transition: opacity 2.5s;
}
 
.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;
 
    &_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;
    }
}
</style>