提交
This commit is contained in:
1 parent
4a00f21bfb
commit
edf88dc016
1503 files changed
+329728
-41987
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user