<template>
  <el-avatar shape="square" class="select-none" :size="size" :src="getAvatarURL(avatar)">
    <slot><div class="text-black">暂无图片</div></slot>
  </el-avatar>
</template>
<script setup lang="ts">
import { getAvatarURL } from '@/api';
defineProps<{
  avatar: string | undefined;
  size: number;
}>();
</script>
