<template>
  <div class="home-header">
    <div class="left">
      <div class="sys-icon" @click="linkToHome">
        <div class="iconfont icon-a-zu11198"></div>
        <div class="title">{{ subTitle }}</div>
      </div>
    </div>
    <div class="right user-panel" v-if="syUser['Name']">
      {{syUser['Name']}}
    </div>
  </div>
</template>
<script setup>
import UserAvatar from '@/views/components/UserNewAvatar.vue';
import { linkToHome } from '@/utils/external-links';
import { useUserStore } from '@/stores';
import { computed } from 'vue';

const store = useUserStore();
console.log("store---------------------------------")
console.log(store.user)
const syUser = computed(() => store.user.syUser);
const systemTitle = ref(AppGlobalConfig.system.name)
const props = defineProps({
  subTitle: {
    type: String,
    default: ''
  }
})
</script>
<style scoped lang="scss">
.home-header {
  width: 100%;
  height: 60px;
  background: #002A7F;
  cursor: pointer;
  padding: 0 40px 0 40px;
  display: flex;
  justify-content: space-between;
  .left {
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    .sys-icon {
      margin-right: 6px;
      display: flex;
      align-items: center;
      >.iconfont {
        color: #FFF;
        font-size: 36px;
      }
      >.title {
        font-family: AlimamaShuHeiTi-Bold;
        font-size: 25px;
        margin-left: 10px;
        color: #fff;
      }
    }
    >.sub_title {
      color: #fff;
      position: relative;
      padding-left: 20px;
      font-size: 22px;
      font-weight: bolder;
      &::before {
        position: absolute;
        width: 15px;
        height: 1px;
        left: 0px;
        top: 0px;
        bottom: 0px;
        margin: auto;
        content: "";
        display: block;
        background: #E5E6E6;
      }
    }
  }

  .right {
    height: 100%;
    width: 180px;
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
}
</style>
