From 1ba71ff43f7c218b3f0f64bd337e8e4ef8e2accd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= Date: Mon, 15 Jun 2026 23:03:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(comment-panel):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E7=9B=AE=E6=A0=87=E5=8E=9F=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=B9=B6=E4=BC=98=E5=8C=96=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 扩展replyTarget类型新增rawContent字段用于存储原评论内容 2. 传递评论和回复的原始内容到回复处理函数 3. 在回复提示区展示被回复的原评论内容 4. 优化回复提示的排版布局,调整文字样式和间距 --- .../post-detail/uh-post-comment-panel.vue | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/post-detail/uh-post-comment-panel.vue b/src/components/post-detail/uh-post-comment-panel.vue index 73cda7e..c57b458 100644 --- a/src/components/post-detail/uh-post-comment-panel.vue +++ b/src/components/post-detail/uh-post-comment-panel.vue @@ -31,6 +31,7 @@ const replyTarget = ref<{ commentName: string replyName?: string displayName: string + rawContent: string } | null>(null) // --- 输入内容 --- @@ -141,8 +142,8 @@ function handleLoadMoreReplies(commentName: string) { } // --- 设置回复目标 --- -function handleReply(commentName: string, replyName: string | undefined, displayName: string) { - replyTarget.value = { commentName, replyName, displayName } +function handleReply(commentName: string, replyName: string | undefined, displayName: string, rawContent: string) { + replyTarget.value = { commentName, replyName, displayName, rawContent } } // --- 取消回复 --- @@ -292,7 +293,7 @@ onMounted(() => { 回复 @@ -346,7 +347,7 @@ onMounted(() => { 回复 @@ -388,11 +389,14 @@ onMounted(() => { - - - 回复 {{ replyTarget.displayName }} + + + 回复 {{ replyTarget.displayName }} + + + - +