This commit is contained in:
zlwu committed 2026-05-26 19:04:27 +08:00
1 parent 4a00f21bfb
commit edf88dc016
1503 files changed
+329728 -41987

No files matched your search

+4 -1
View File
@@ -7,7 +7,10 @@ export function defaultAvatarPathByRole(_role: string | undefined): string {
}
/** 展示用头像:`avatarUrl` 非空则用其值,否则用默认图 */
export function resolveUserAvatarUrl(avatarUrl: string | null | undefined, role: string | undefined): string {
export function resolveUserAvatarUrl(
avatarUrl: string | null | undefined,
role: string | undefined
): string {
const u = avatarUrl != null ? String(avatarUrl).trim() : ''
if (u) return u
return defaultAvatarPathByRole(role)