refactor: 调整默认头像规则,由基于性别的固定头像调整为基于昵称展示(背景颜色基于昵称计算随机)

This commit is contained in:
2024-10-26 22:20:33 +08:00
parent 2f30df528c
commit 00c909e6f1
9 changed files with 117 additions and 31 deletions

View File

@@ -1,8 +1,6 @@
<template>
<a-space fill>
<a-avatar :size="24" shape="circle">
<img :src="props.avatar" alt="avatar" />
</a-avatar>
<Avatar :src="props.avatar" :name="props.name" :size="24" />
<a-link v-if="props.isLink" @click="emit('click')">
<a-typography-paragraph
class="link-text"
@@ -15,7 +13,17 @@
{{ props.name }}
</a-typography-paragraph>
</a-link>
<span v-else>{{ props.name }}</span>
<span v-else>
<a-typography-paragraph
:ellipsis="{
rows: 1,
showTooltip: true,
css: true,
}"
>
{{ props.name }}
</a-typography-paragraph>
</span>
</a-space>
</template>