From b063afb2a1edbd1b42c3f1edaf9071b7fcf2d30d Mon Sep 17 00:00:00 2001 From: empty Date: Mon, 12 Jan 2026 03:25:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=AE=8C=E6=88=90=E5=85=A8?= =?UTF-8?q?=E5=B1=80=20emoji=20=E5=88=B0=20SVG=20=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - IconLibrary 新增 6 个图标: star, lightbulb, pin, clipboard, microphone, bookmark - 迁移 12 个组件中的 emoji 为 IconLibrary 组件 - 更新 paradigms.js 中的 icon 字段为图标名称 - 修复深度模式开关点击无效的问题 (改用 Vue 动态类绑定) Co-Authored-By: Claude Opus 4.5 --- src/components/AnalysisPanel.vue | 15 ++--- src/components/ComparePanel.vue | 77 ++++++++++++++--------- src/components/DiffAnnotationPanel.vue | 17 +++-- src/components/DocumentSelectorModal.vue | 13 +++- src/components/DocumentVersionPanel.vue | 15 +++-- src/components/MainContent.vue | 14 ++--- src/components/MaterialSelectorModal.vue | 3 +- src/components/ParadigmSelectorModal.vue | 15 +++-- src/components/ParadigmWriterPanel.vue | 32 ++++++---- src/components/RequirementParserPanel.vue | 15 +++-- src/components/SettingsPanel.vue | 6 +- src/components/WriterPanel.vue | 20 +++--- src/components/icons/IconLibrary.vue | 26 ++++++++ src/config/paradigms.js | 12 ++-- 14 files changed, 182 insertions(+), 98 deletions(-) diff --git a/src/components/AnalysisPanel.vue b/src/components/AnalysisPanel.vue index a88e493..946ab04 100644 --- a/src/components/AnalysisPanel.vue +++ b/src/components/AnalysisPanel.vue @@ -60,7 +60,8 @@ >

- {{ paradigm.icon }} {{ paradigm.name }} + + {{ paradigm.name }} NEW 自定义 @@ -202,7 +203,7 @@ const activeTab = ref('paradigms') // 'paradigms' or 'tools' // 编辑表单 const editForm = reactive({ - icon: '📝', + icon: 'edit', name: '', description: '', tagsInput: '', @@ -211,8 +212,8 @@ const editForm = reactive({ specializedPrompt: '' }) -// 图标选项 (保留 emoji 用于用户自定义范式图标选择器,TODO: 后续优化为 IconLibrary 选择器) -const iconOptions = ['📝', '💻', '📊', '🚀', '📚', '🏛️', '🔥', '🏢', '💡', '🎯', '📋', '✨'] +// 图标选项 (使用 IconLibrary 图标名称) +const iconOptions = ['edit', 'document', 'chart', 'sparkles', 'folder', 'article', 'star', 'lightbulb', 'clipboard', 'bookmark'] // 颜色选项 const colorOptions = [ @@ -259,7 +260,7 @@ const openAddModal = () => { // 重置表单 const form = appStore.paradigmEditState.editForm - form.icon = '📝' + form.icon = 'edit' form.name = '' form.description = '' form.tagsInput = '' @@ -293,7 +294,7 @@ const openEditModal = (paradigm) => { // 填充表单数据 const form = appStore.paradigmEditState.editForm - form.icon = paradigm.icon || '📝' + form.icon = paradigm.icon || 'edit' form.name = paradigm.name || '' form.description = paradigm.description || '' form.tagsInput = (paradigm.tags || []).join(', ') @@ -310,7 +311,7 @@ const closeEditModal = () => { // 重置表单 const resetEditForm = () => { - editForm.icon = '📝' + editForm.icon = 'edit' editForm.name = '' editForm.description = '' editForm.tagsInput = '' diff --git a/src/components/ComparePanel.vue b/src/components/ComparePanel.vue index 215d598..f318945 100644 --- a/src/components/ComparePanel.vue +++ b/src/components/ComparePanel.vue @@ -4,7 +4,7 @@

- 🔍 对照检查 + 对照检查

选中左右两侧对应段落进行检查
@@ -13,7 +13,9 @@
- 📚 当前写作范式: + + 当前写作范式: + {{ activeParadigmName }}
@@ -61,7 +63,7 @@
- +
@@ -80,7 +82,7 @@

- 📋 要求原文 + 要求原文

{{ leftParagraphs.length }} 段 @@ -95,11 +97,11 @@ : 'bg-slate-700 text-slate-400 cursor-not-allowed'" > - 💾 + {{ isLeftSaving ? '保存中...' : (hasLeftContentChanged ? '保存版本' : '已保存') }} - - 📄 {{ leftSourceDocTitle }} + + {{ leftSourceDocTitle }}
@@ -132,7 +134,9 @@
- 📝 +
+ +

请在下方粘贴写作要求的原文

(如:红头文件、通知要求等)

@@ -151,7 +155,8 @@
- {{ selectedLeftIdxs.includes(idx) ? '✓' : (idx + 1) }} + + {{ idx + 1 }}

{{ para }}

@@ -186,7 +191,7 @@

- ✍️ 写作内容 + 写作内容

{{ rightParagraphs.length }} 段 @@ -201,11 +206,11 @@ : 'bg-slate-700 text-slate-400 cursor-not-allowed'" > - 💾 + {{ isSaving ? '保存中...' : (hasContentChanged ? '保存版本' : '已保存') }} - - 📄 {{ rightSourceDocTitle }} + + {{ rightSourceDocTitle }}
@@ -228,7 +233,9 @@
- 📄 +
+ +

请在下方输入写作内容

@@ -246,7 +253,8 @@
- {{ selectedRightIdxs.includes(idx) ? '✓' : (idx + 1) }} + + {{ idx + 1 }}

{{ para }}

@@ -287,7 +295,9 @@ checkResults[idx].status === 'warning' ? 'bg-yellow-900/30 text-yellow-400' : 'bg-red-900/30 text-red-400' ]"> - {{ checkResults[idx].status === 'pass' ? '✅' : checkResults[idx].status === 'warning' ? '⚠️' : '❌' }} + + + {{ checkResults[idx].message }}
@@ -316,7 +326,9 @@ ]">
- {{ lastCheckResult.overall === 'pass' ? '✅' : lastCheckResult.overall === 'warning' ? '⚠️' : '❌' }} + + +

- 💡 改进建议 + 改进建议

- 🔄 + {{ rewritingSuggestionIdx === idx ? '重写中...' : '一键重写' }}
@@ -384,7 +396,7 @@ 识别中... - 🧠 智能识别 + 智能识别
@@ -438,18 +450,20 @@

- 🔄 AI 重写预览 + AI 重写预览

+ >
- 📋 根据建议: + + 根据建议: + {{ currentSuggestion }}
@@ -512,7 +526,9 @@
-
📄 原文(点击选中需要替换的部分)
+
+ 原文(点击选中需要替换的部分) +
- ✏️ +
+ +

在下方输入修改后的内容

或从文稿库选择

@@ -192,6 +196,7 @@ import { ref, computed, watch, onMounted, onUnmounted } from 'vue' import { useAppStore } from '../stores/app' import { computePreciseDiff, getPreciseDiffStats } from '../utils/preciseDiff.js' +import IconLibrary from './icons/IconLibrary.vue' import { Document, Packer, Paragraph, TextRun } from 'docx' import { saveAs } from 'file-saver' import DocumentSelectorModal from './DocumentSelectorModal.vue' diff --git a/src/components/DocumentSelectorModal.vue b/src/components/DocumentSelectorModal.vue index 623c242..f2472d8 100644 --- a/src/components/DocumentSelectorModal.vue +++ b/src/components/DocumentSelectorModal.vue @@ -3,8 +3,12 @@
-

📂 选择文稿

- +

+ 选择文稿 +

+
@@ -25,7 +29,9 @@
- 📄 +
+ +

暂无文稿

@@ -76,6 +82,7 @@