<!-- 左上：logo部分 -->
<template>
    <div class="com-logo-box" :title="settingStore.title" @click="appStore.showHome()">
        <transition name="left-jump-right">
            <div class="tr-box" v-if="appStore.isOpen">
                <img :src="settingStore.logo" class="admin-logo" alt="logo">
                <span class="admin-title">{{ settingStore.title }} 后台</span>
            </div>
            <div class="tr-box" v-else>
                <img :src="settingStore.logo" class="admin-logo" alt="logo" style="margin-left: 18px;">
            </div>
        </transition>
    </div>
</template>

<script setup name="nav-logo">
import {useAppStore} from "../../store/app";
import {useSettingStore} from "../../store/setting";

const appStore = useAppStore();
const settingStore = useSettingStore();

</script>

<style scoped>
.com-logo-box {
    cursor: pointer;
    overflow: hidden;
}
.tr-box{
    display: inline-block;
    white-space: nowrap;
    transition: all 0.6s
}

.admin-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 22px;
    transition: all 0.2s;
}

.admin-title{padding-left: 10px; font-size: 1.1em; /*font-weight: 700;*/ vertical-align: middle;}

</style>
