From ce2698f245c4e49f11d72122f067d113e5bfa7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Wed, 4 Feb 2026 12:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=B1=BB=E5=9E=8B=E9=85=8D=E7=BD=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E7=A7=BB=E9=99=A4=E9=87=8D=E5=A4=8D=E7=A1=AC?= =?UTF-8?q?=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增: - constants.js 添加 CONFIG 数组(json、xml、yaml、toml、ini、cfg、conf、props、env 等) - fileTypeHelpers.js 添加 isConfigFile() 函数 优化: - 移除 6 处重复的文件类型硬编码 - 统一使用 FILE_EXTENSIONS.CONFIG - 移除 3 处重复的 isOfficeFile() 定义 修改文件: - web/src/utils/constants.js - web/src/utils/fileTypeHelpers.js - web/src/components/FileSystem/composables/useFileEdit.ts - web/src/components/FileSystem/composables/useFilePreview.ts - web/src/components/FileSystem/components/ContextMenu.vue - web/src/composables/useFilePreview.js --- .../FileSystem/components/ContextMenu.vue | 10 +----- .../FileSystem/composables/useFileEdit.ts | 2 +- .../FileSystem/composables/useFilePreview.ts | 8 ++++- web/src/composables/useFilePreview.js | 11 +------ web/src/utils/constants.js | 32 +++++++++++++++---- web/src/utils/fileTypeHelpers.js | 15 +++++++-- 6 files changed, 48 insertions(+), 30 deletions(-) diff --git a/web/src/components/FileSystem/components/ContextMenu.vue b/web/src/components/FileSystem/components/ContextMenu.vue index 141b73c..1014fff 100644 --- a/web/src/components/FileSystem/components/ContextMenu.vue +++ b/web/src/components/FileSystem/components/ContextMenu.vue @@ -47,6 +47,7 @@