Explorar el Código

💄 style(avatar): 优化头像选择器中文件名显示样式

- 添加 truncate 类防止文件名过长溢出
- 设置不同屏幕宽度下的最大宽度(w-40 sm:w-64)以适应响应式布局
yourname hace 4 meses
padre
commit
29a7b8ef6b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/client/admin-shadcn/components/AvatarSelector.tsx

+ 1 - 1
src/client/admin-shadcn/components/AvatarSelector.tsx

@@ -168,7 +168,7 @@ const AvatarSelector: React.FC<AvatarSelectorProps> = ({
                 {currentFile ? '更换头像' : placeholder}
               </Button>
               {currentFile && (
-                <p className="text-xs text-muted-foreground">
+                <p className="text-xs text-muted-foreground truncate w-40 sm:w-64 ">
                   当前: {currentFile.name}
                 </p>
               )}