From 12b8a11f17447a5617041271f0e24c4314fa755e Mon Sep 17 00:00:00 2001 From: Nixevol Date: Fri, 15 May 2026 16:11:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=B9=E9=BD=90=E6=96=B0=E7=89=88?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=97=A7=E7=89=88=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/project_context.md | 8 + frontend/src/AppShell.vue | 135 ++- frontend/src/components/DatabasePanel.vue | 112 +- frontend/src/components/FileWorkflow.vue | 6 +- frontend/src/components/HistoryPanel.vue | 150 ++- frontend/src/components/ScriptPanel.vue | 127 +- frontend/src/components/SettingsPanel.vue | 151 +-- frontend/src/composables/pageHeader.ts | 41 + frontend/src/router.ts | 2 +- frontend/src/styles.css | 1314 +++++++++++++-------- 10 files changed, 1286 insertions(+), 760 deletions(-) create mode 100644 frontend/src/composables/pageHeader.ts diff --git a/docs/project_context.md b/docs/project_context.md index 5ce12a5..8ed5dce 100644 --- a/docs/project_context.md +++ b/docs/project_context.md @@ -1,5 +1,13 @@ # 项目上下文记录 +## 2026-05-15:对齐新版前端主体布局并修复全局拖拽默认行为 + +- 新版 Vue 前端主体内容继续按旧版 `frontend_old/` 的工作区布局对齐:上传页保留旧版上传区尺寸和文件列表结构,数据库页恢复左侧表列表 + 右侧数据区,设置页恢复左右列,脚本页恢复编辑器容器和底部状态栏。 +- `frontend/src/composables/pageHeader.ts` 新增页面顶部副标题和动作注册机制;各页面把原本散落在页面内部的主要动作注册到 `AppShell` 顶栏,避免每个页面重复实现标题栏。 +- `AppShell.vue` 在捕获阶段统一拦截带 `Files` 的 `dragover/drop` 默认行为,修复文件拖到新版页面空白处时浏览器打开文件或弹出下载的问题;真正的文件处理仍由上传区自己的 `drop` 事件完成。 +- 上传区 `FileWorkflow.vue` 明确使用 `.prevent.stop` 处理拖拽事件,并继续支持文件和目录拖拽;目录读取使用 `webkitGetAsEntry()` 递归遍历,文件路径按相对路径去重。 +- 已执行 `npm run build`,构建通过,仅有 Monaco/Vite 大 chunk 体积警告;已用 headless Chrome 验证新版 `/upload` 上传区位于 `x=252,y=88,width=1156,height=220`,拖到页面空白处不会跳转,拖到上传区会加入 `drag-test.csv`。 + ## 2026-05-15:恢复新版数据库页左右工作区布局 - `frontend/src/components/DatabasePanel.vue` 已从纵向卡片堆叠改回旧版主体布局:左侧固定 240px 数据表列表,右侧为表数据面板,左下角显示数据库版本和快速导入状态。 diff --git a/frontend/src/AppShell.vue b/frontend/src/AppShell.vue index ffe6d0f..4f1bd53 100644 --- a/frontend/src/AppShell.vue +++ b/frontend/src/AppShell.vue @@ -4,12 +4,13 @@
-
CR
+
📊
CapacityReport
- -
-
{{ currentTitle }}
+ + +
+

{{ currentTitle }}

+ {{ pageSubtitle }}
- - 已登录 - +
+ + + + + - +
@@ -49,7 +81,7 @@ diff --git a/frontend/src/components/DatabasePanel.vue b/frontend/src/components/DatabasePanel.vue index f709432..45a5153 100644 --- a/frontend/src/components/DatabasePanel.vue +++ b/frontend/src/components/DatabasePanel.vue @@ -2,13 +2,6 @@