feat: 在 RepoCard 组件中添加站点链接点击事件,防止事件冒泡

This commit is contained in:
xiongxiao
2026-03-01 01:34:59 +08:00
committed by cnb
parent 20edf1893e
commit d196b24d07

View File

@@ -307,8 +307,9 @@ export function RepoCard({ showReturn = false, repo }: RepoCardProps) {
{repo.site && ( {repo.site && (
<div <div
className="text-xs text-neutral-500 hover:text-neutral-900 hover:underline flex transition-colors" className="text-xs text-neutral-500 hover:text-neutral-900 hover:underline flex transition-colors"
onClick={() => { onClick={(e) => {
window.open(repo.site, '_blank') window.open(repo.site, '_blank')
e.stopPropagation()
}} }}
> >
<LinkIcon className="w-4 h-4 shrink-0 mr-2" /> <LinkIcon className="w-4 h-4 shrink-0 mr-2" />