diff --git a/src/common/component/Avatar.tsx b/src/common/component/Avatar.tsx index 46a33c93..df3c559c 100644 --- a/src/common/component/Avatar.tsx +++ b/src/common/component/Avatar.tsx @@ -36,10 +36,15 @@ const Avatar: FC = ({ if (!error && src) { return ; } + // 长度限制在六个字符 + let initials = getInitials(name).substring(0, 6); + const len = initials.length; + const scaleVal = len > 2 ? (11 - len) / 10 : 1; return (
= ({ color: type === "channel" ? "#475467" : "#FFFFFF" }} > - {getInitials(name)} + {initials}
); };