From 30ea5c8191dac0c8375ce9f565cc70c2ff75b170 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Wed, 5 Aug 2026 00:04:37 -0600 Subject: [PATCH] =?UTF-8?q?fix(header):=20=E6=B7=B1=E6=B5=85=E8=89=B2?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=89=A9=E6=95=A3=E5=8A=A8=E7=94=BB=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=BB=8E=E5=B1=8F=E5=B9=95=E4=B8=AD=E5=BF=83=E6=89=A9?= =?UTF-8?q?=E6=95=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- src/shared/components/Header.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/shared/components/Header.vue b/src/shared/components/Header.vue index 5db6aa4..4e4db69 100644 --- a/src/shared/components/Header.vue +++ b/src/shared/components/Header.vue @@ -22,12 +22,10 @@ const { learnStep } = useLearnProgress() const isDark = useDark() -function toggleDark(event: MouseEvent) { - const { clientX: x, clientY: y } = event - const radius = Math.hypot( - Math.max(x, window.innerWidth - x), - Math.max(y, window.innerHeight - y), - ) +function toggleDark() { + const x = window.innerWidth / 2 + const y = window.innerHeight / 2 + const radius = Math.hypot(x, y) if (!document.startViewTransition) { isDark.value = !isDark.value return