From 292ab9ec7525cef4344f68a8bccf83d303a2e4c3 Mon Sep 17 00:00:00 2001
From: Yume <2839681263@qq.com>
Date: Tue, 24 Jun 2025 10:37:33 +0800
Subject: [PATCH] feat(UI): expand the click range of CodeContent
---
moon/apps/web/components/CodeView/BlobView/CodeContent.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/moon/apps/web/components/CodeView/BlobView/CodeContent.tsx b/moon/apps/web/components/CodeView/BlobView/CodeContent.tsx
index 983cf9582..af5290839 100644
--- a/moon/apps/web/components/CodeView/BlobView/CodeContent.tsx
+++ b/moon/apps/web/components/CodeView/BlobView/CodeContent.tsx
@@ -187,6 +187,7 @@ const CodeContent = ({ fileContent, path }: { fileContent: string, path?: string
backgroundColor: selectedLine === i ? '#f0f7ff' : 'transparent'
}}
className='flex h-6 items-center'
+ onClick={() => handleLineClick(i)}
>
{selectedLine === i ?
@@ -211,7 +212,7 @@ const CodeContent = ({ fileContent, path }: { fileContent: string, path?: string
null
}
- handleLineClick(i)}>
+
{i + 1}
{line.map((token, key) => (