From cdadbc19f17e3e79c4d90edbf6a5f1afe82c25ca Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Thu, 28 May 2026 12:50:57 +0800 Subject: [PATCH] fix: replace reka-ui context menu with lightweight custom component to fix editor lag The reka-ui ContextMenu component caused significant performance degradation when multiple editor tabs were cached via KeepAlive, due to its heavy state machine, provide/inject chain, and document-level event listeners accumulating across cached instances. Replaced with a minimal CustomContextMenu that renders via Teleport without any DOM wrapping or reka-ui dependency, eliminating the lag while preserving the same visual appearance and functionality. --- .../src/components/editor/QueryEditor.vue | 56 +++++---- .../src/components/ui/CustomContextMenu.vue | 118 ++++++++++++++++++ 2 files changed, 150 insertions(+), 24 deletions(-) create mode 100644 apps/desktop/src/components/ui/CustomContextMenu.vue diff --git a/apps/desktop/src/components/editor/QueryEditor.vue b/apps/desktop/src/components/editor/QueryEditor.vue index 4e60c9552..215d2a01b 100644 --- a/apps/desktop/src/components/editor/QueryEditor.vue +++ b/apps/desktop/src/components/editor/QueryEditor.vue @@ -1,17 +1,12 @@ + +