From 11a73494c05543965acb09fe7b2ed337269b5f70 Mon Sep 17 00:00:00 2001 From: Jokul Date: Tue, 7 Jul 2026 20:26:47 +0800 Subject: [PATCH] feat: multi-tab support in MainArea - Refactor MainArea: tabs array + activeTabId (was single activeTab) - Open/close tabs dynamically, status tab not closable - Tab opener buttons (keys/cli/slowlog/memory) in top-right - Right-click context menu: close/closeOthers/closeRight/closeLeft - Mouse wheel cycling through tabs - Scrollable tab bar with hidden scrollbar - i18n keys for tab context menu (zh-CN + en) --- ROADMAP.md | 2 +- src/components/MainArea.vue | 328 ++++++++++++++++++++++++++++++------ src/i18n/locales/en.ts | 6 + src/i18n/locales/zh-CN.ts | 6 + 4 files changed, 289 insertions(+), 53 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 2463a83..9272285 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -16,7 +16,7 @@ - [x] **内存分析** — `MEMORY USAGE` 扫描所有 key,虚拟化列表,按大小排序,暂停/恢复,大小过滤 - [x] **命令日志** — 记录每次命令的耗时/连接/时间,最多 5000 条,只写模式过滤 - [x] **自动更新** — electron-updater 集成,启动检查,下载进度,发行说明 -- [ ] **多标签页** — 单连接支持同时打开 Status/Keys/CLI/SlowLog/内存分析/批量删除 多个标签 +- [x] **多标签页** — 单连接支持同时打开 Status/Keys/CLI/SlowLog/内存分析/批量删除 多个标签 - [ ] **多连接并行** — 同时打开多个连接,各自独立标签页 - [ ] **Monaco 编辑器** — 替换 StringEditor 的 textarea,支持 JSON 折叠/展开/语法高亮 - [ ] **Redis 命令自动补全** — CLI 输入时智能提示(基于 commands.js 命令数据库) diff --git a/src/components/MainArea.vue b/src/components/MainArea.vue index 3c395ab..f1cc823 100644 --- a/src/components/MainArea.vue +++ b/src/components/MainArea.vue @@ -1,6 +1,6 @@