From 7553b0da8055539d86fc6e754e6562f610c11f18 Mon Sep 17 00:00:00 2001 From: fawney19 Date: Fri, 19 Dec 2025 18:41:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E4=BA=A4=E4=BA=92=E5=92=8CESC=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 自动刷新改为按钮切换模式,移除独立Switch开关 - 自动刷新间隔从30s改为10s - ESC关闭弹窗后blur焦点,避免样式残留 --- frontend/src/composables/useEscapeKey.ts | 5 +++ .../usage/components/UsageRecordsTable.vue | 33 +++++++++---------- frontend/src/views/shared/Usage.vue | 2 +- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/frontend/src/composables/useEscapeKey.ts b/frontend/src/composables/useEscapeKey.ts index acb4094..4d85c65 100644 --- a/frontend/src/composables/useEscapeKey.ts +++ b/frontend/src/composables/useEscapeKey.ts @@ -45,6 +45,11 @@ export function useEscapeKey( // 执行回调 callback() + // 移除当前元素的焦点,避免残留样式 + if (document.activeElement instanceof HTMLElement) { + document.activeElement.blur() + } + // 如果只监听一次,则移除监听器 if (once) { removeEventListener() diff --git a/frontend/src/features/usage/components/UsageRecordsTable.vue b/frontend/src/features/usage/components/UsageRecordsTable.vue index b6d2a73..dc28d17 100644 --- a/frontend/src/features/usage/components/UsageRecordsTable.vue +++ b/frontend/src/features/usage/components/UsageRecordsTable.vue @@ -136,23 +136,20 @@