fix: constrain week star user avatars
This commit is contained in:
parent
96c224f71d
commit
c5480cdf06
@ -228,6 +228,11 @@ function statusColor(status: string) {
|
||||
}
|
||||
}
|
||||
|
||||
function avatarBackgroundStyle(url?: string) {
|
||||
const avatarUrl = String(url || '').trim();
|
||||
return avatarUrl ? { backgroundImage: `url(${JSON.stringify(avatarUrl)})` } : {};
|
||||
}
|
||||
|
||||
function assignForm(next: Record<string, any>) {
|
||||
Object.assign(form, createEmptyForm(selectedSysOrigin.value), next);
|
||||
}
|
||||
@ -775,11 +780,10 @@ watch(
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'user'">
|
||||
<div class="user-cell">
|
||||
<Image
|
||||
<div
|
||||
v-if="record.userAvatar"
|
||||
:preview="false"
|
||||
:src="record.userAvatar"
|
||||
class="avatar"
|
||||
:style="avatarBackgroundStyle(record.userAvatar)"
|
||||
/>
|
||||
<div v-else class="avatar placeholder">U</div>
|
||||
<div class="user-meta">
|
||||
@ -829,11 +833,10 @@ watch(
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'user'">
|
||||
<div class="user-cell">
|
||||
<Image
|
||||
<div
|
||||
v-if="record.userAvatar"
|
||||
:preview="false"
|
||||
:src="record.userAvatar"
|
||||
class="avatar"
|
||||
:style="avatarBackgroundStyle(record.userAvatar)"
|
||||
/>
|
||||
<div v-else class="avatar placeholder">U</div>
|
||||
<div class="user-meta">
|
||||
@ -901,11 +904,10 @@ watch(
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'user'">
|
||||
<div class="user-cell">
|
||||
<Image
|
||||
<div
|
||||
v-if="record.userAvatar"
|
||||
:preview="false"
|
||||
:src="record.userAvatar"
|
||||
class="avatar"
|
||||
:style="avatarBackgroundStyle(record.userAvatar)"
|
||||
/>
|
||||
<div v-else class="avatar placeholder">U</div>
|
||||
<div class="user-meta">
|
||||
@ -1202,8 +1204,7 @@ watch(
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.thumb,
|
||||
.avatar {
|
||||
.thumb {
|
||||
border-radius: 8px;
|
||||
height: 48px;
|
||||
object-fit: cover;
|
||||
@ -1211,7 +1212,13 @@ watch(
|
||||
}
|
||||
|
||||
.avatar {
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
border-radius: 999px;
|
||||
flex: 0 0 40px;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user