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 && (
<div
className="text-xs text-neutral-500 hover:text-neutral-900 hover:underline flex transition-colors"
onClick={() => {
onClick={(e) => {
window.open(repo.site, '_blank')
e.stopPropagation()
}}
>
<LinkIcon className="w-4 h-4 shrink-0 mr-2" />