{items.map((item) => {
const checked = checkedMap.has(item.id);
const disabled = selectedIdSet.has(item.id);
const preview = buildPreviewUrl(item.previewUrl || item.displayUrl || item.resourceUrl);
return (
!disabled && toggle(item)}
style={{
position: 'relative',
borderRadius: 14,
border: checked ? '2px solid #8b5cf6' : '1px solid #e2e8f0',
background: disabled ? '#f8fafc' : '#fff',
opacity: disabled ? 0.55 : 1,
cursor: disabled ? 'not-allowed' : 'pointer',
overflow: 'hidden',
boxShadow: checked ? '0 10px 24px rgba(139, 92, 246, 0.18)' : '0 6px 18px rgba(15,23,42,0.06)',
}}
>
{item.resourceType === 'image' ? (

) : item.resourceType === 'video' ? (
) : (
)}
{typeLabel(item.resourceType)}
{item.durationSeconds ? {Number(item.durationSeconds).toFixed(1)}s : null}
{item.fileName || item.id}
{item.moduleLabel || '普通上传'}
{checked && (
)}
{disabled &&
已选
}