From fc2ba807c8b69e871840c151d2d5922e540040cb Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Fri, 18 Apr 2025 23:23:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=B4=E5=83=8F=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ui/Avatar.jsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 client/ui/Avatar.jsx diff --git a/client/ui/Avatar.jsx b/client/ui/Avatar.jsx new file mode 100644 index 0000000..619410b --- /dev/null +++ b/client/ui/Avatar.jsx @@ -0,0 +1,15 @@ +export default function Avatar({ src, text, icon = 'person', ...props } = {}) { + return ( + src ? + {'(头像)' + + : ( + text ? + { + text.substring(0, 0) + } + + : + ) + ) +}