feat: add client-side onerror fallback to default avatar

This commit is contained in:
antv
2026-07-09 09:10:15 +07:00
parent 48bdf21de2
commit badc453389
3 changed files with 3 additions and 3 deletions
@@ -18,7 +18,7 @@
<!-- Avatar & Info -->
<div class="flex items-center gap-3 ml-1 min-w-0 flex-1">
<img src="{{ $avatar }}" alt="{{ $name }}" class="w-10 h-10 rounded-full object-cover shadow-sm border border-gray-100 flex-shrink-0">
<img src="{{ $avatar }}" alt="{{ $name }}" class="w-10 h-10 rounded-full object-cover shadow-sm border border-gray-100 flex-shrink-0" onerror="this.onerror=null; this.src='{{ asset('images/avatar.png') }}';">
<div class="flex flex-col min-w-0 flex-1">
<span class="text-[14px] font-bold {{ $isCurrent ? 'text-[#1a2b49]' : 'text-gray-800' }} leading-tight mb-0.5 truncate">{{ $name }}</span>
<span class="text-[12px] text-gray-500 font-medium truncate" title="{{ $team }}">{{ $team }}</span>