<template>
  <div class="avue-logo" @click="goHome" style="cursor: pointer">
    <transition name="fade">
      <span v-if="getScreen(isCollapse)" class="avue-logo_subtitle" key="0">
        <img class="logo-img" src="/img/logo.png" />
      </span>
    </transition>
    <transition-group name="fade">
      <template v-if="getScreen(!isCollapse)">
        <span class="logo-title" key="1">{{ website.indexTitle }}</span>
      </template>
    </transition-group>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
  name: 'logo',
  data() {
    return {};
  },
  created() {},
  computed: {
    ...mapGetters(['isCollapse', 'tagWel']),
  },
  methods: {
    goHome() {
      this.$router.push(this.tagWel);
    },
  },
};
</script>
<style scoped>
.logo-title {
  font-size: 17px;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-img {
  width: 30px;
  margin-top: 10px;
}
</style>
