setHoveredImageKey(img.key)}
- onMouseLeave={() => setHoveredImageKey(null)}
- style={{
- position: 'relative',
- border: `2px solid ${selected ? '#1677ff' : 'transparent'}`,
- borderRadius: 8,
- padding: 2,
- background: selected ? 'rgba(22,119,255,0.06)' : undefined,
- aspectRatio: '3 / 4',
- overflow: 'hidden',
- }}
- >
-
- {img.assetId && (
-
handleDeleteAsset(img.assetId!, [img.key, `asset-${img.assetId}`])}
- >
- }
- title="删除这张图片"
- onClick={(e) => e.stopPropagation()}
- style={{
- position: 'absolute', top: 5, left: 5, zIndex: 3,
- opacity: hoveredImageKey === img.key ? 1 : 0,
- pointerEvents: hoveredImageKey === img.key ? 'auto' : 'none',
- transition: 'opacity 0.15s', background: 'rgba(255,255,255,0.94)',
- }}
- />
-
- )}
-
toggleResultKey(img.key)}
- style={{
- position: 'absolute', top: 5, right: 5, width: 20, height: 20,
- borderRadius: '50%', background: selected ? '#1677ff' : 'rgba(255,255,255,0.9)',
- color: selected ? '#fff' : '#bbb', border: '1px solid #d9d9d9', display: 'flex',
- alignItems: 'center', justifyContent: 'center', cursor: 'pointer', fontSize: 12,
- zIndex: 2, userSelect: 'none',
- }}
- >
- ✓
-
-
}
- title="下载这张图片"
- loading={downloadingResultKeys.has(img.key)}
- onClick={(e) => {
- e.stopPropagation();
- void handleDownloadResultImage(img);
- }}
- style={{
- position: 'absolute', bottom: 5, left: 5, zIndex: 3,
- opacity: hoveredImageKey === img.key ? 1 : 0,
- pointerEvents: hoveredImageKey === img.key ? 'auto' : 'none',
- transition: 'opacity 0.15s', background: 'rgba(255,255,255,0.94)',
- }}
- />
-
-
- {img.name}
-