| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <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">
- <div key="1" class="avue-logo_title">
- <el-image class="myLogo" :src="logoUrl"></el-image>
- <span class="myTitle">{{website.indexTitle}} </span>
- </div>
- </template>
- </transition-group>
- </div>
- </template>
- <script>
- import { mapGetters } from "vuex";
- export default {
- name: "logo",
- data() {
- return {
- logoUrl: '/img/logo_pc.png'
- };
- },
- 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;
- &_subtitle {
- display: block;
- text-align: center;
- font-size: 18px;
- font-weight: bold;
- color: #fff;
- }
- &_title {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- .myLogo {
- margin-left: 5px;
- width: 25px;
- height: 25px;
- }
- .myTitle {
- margin-left: 5px;
- display: block;
- text-align: center;
- font-weight: 300;
- font-size: 20px;
- margin-left: 10px;
- }
- }
- }
- </style>
|