<template>
  <el-image class="pointer radius" style="width: 50px;min-width: 50px; height: 50px" :src="avatar" fit="cover" :preview-src-list="[avatar]" />
</template>

<script setup>
import defAva from '@/assets/images/profile.jpg'
const props = defineProps({
  src: {
    type: String,
    default: "http://uworkplace.cn/img/uice.jpg",
  }, // 背景图
});
const { src } = toRefs(props)
const avatar = computed(() => (src.value == "" || src.value == null) ? defAva : import.meta.env.VITE_APP_BASE_API + src.value)
</script>
