From 5a2247707549027dafa1c688a4198b1d7ad90d93 Mon Sep 17 00:00:00 2001 From: empty Date: Fri, 9 Jan 2026 01:15:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=8A=9F=E8=83=BD=E5=8F=8A=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=87=8D=E5=86=99=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增部分替换视图模式,支持选择性替换原文句子 - 过滤 AI 返回的 标签内容 - 为 applySelectedChanges 添加边界检查防止返回空结果 Co-Authored-By: Claude Opus 4.5 --- src/components/ComparePanel.vue | 238 +++++++++++++++++++++++++++++++- src/utils/textDiff.js | 22 +++ 2 files changed, 254 insertions(+), 6 deletions(-) diff --git a/src/components/ComparePanel.vue b/src/components/ComparePanel.vue index b0a6944..92d119c 100644 --- a/src/components/ComparePanel.vue +++ b/src/components/ComparePanel.vue @@ -405,6 +405,10 @@ @click="rewriteViewMode = 'review'; currentReviewIdx = 0" :class="['text-xs px-2 py-1 rounded transition', rewriteViewMode === 'review' ? 'bg-indigo-600 text-white' : 'text-slate-400 hover:text-white']" >逐句审核 + @@ -556,12 +560,59 @@ 没有需要审核的修改 + + +
+
+ +
+
+ 📄 原文(点击选中要被替换的句子) + 已选 {{ partialLeftSelected.size }} 句 +
+
+ +
+
+ +
+
+ ✨ 重写后(点击选中用于替换的句子) + 已选 {{ partialRightSelected.size }} 句 +
+
+ +
+
+
+

在左边选中要被替换的句子,在右边选中用于替换的内容,点击"应用选中"完成替换

+
- -
+ +
+ +
+ + + + +
@@ -579,12 +649,20 @@ @click="resetRewriteModal" class="px-4 py-2 text-sm bg-slate-700 text-slate-300 rounded-lg hover:bg-slate-600" >取消 + + +