Ben Lin
2024-07-19 a41c87a94a0b52688420a7af3b242bc771628e28
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
<!--
 * @Description: file content
 * @Author: Ben Lin
 * @version: 
 * @Date: 2024-06-18 15:09:48
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-19 17:11:23
-->
<template>
  <div class="lg:flex">
    <!-- !mx-auto -->
    <Avatar :src="userinfo.avatar || headerUrl" :size="64" :shape="square" class="!block"/>
    <div class="md:ml-12 flex flex-col justify-start md:mt-0 mt-2">
      <h1 class="md:text-lg text-md">早安, {{ userinfo.realName }}, 开始您一天的工作吧!</h1>
      <span class="text-secondary"> 今日晴,20℃ - 32℃! </span>
    </div>
  </div>
</template>
<script lang="ts" setup>
  import { computed, ref } from 'vue';
  import { Avatar } from 'ant-design-vue';
  import { useUserStore } from '/@/store/modules/user';
  // import headerImg from '/@/assets/images/header.jpg';
  import { useGlobSetting } from '@/hooks/setting';
  // import headerImg from '/@/assets/images/title.jpg';
 
  const userStore = useUserStore();
  const userinfo = computed(() => userStore.getUserInfo);
  const square = "square";  // "circle";
  const { systemType, downloadUrl } = useGlobSetting();
  const headerUrl = ref(`${downloadUrl}\\${systemType}-header.jpg`)
</script>