From 91226fa97693b4b64005d01609e8520b5f10d211 Mon Sep 17 00:00:00 2001 From: fish Date: Sun, 26 Apr 2026 14:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E5=BD=BB=E5=BA=95?= =?UTF-8?q?=E7=A6=81=E6=AD=A2=E9=A1=B5=E9=9D=A2=E6=BB=91=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- frontend/src/pages/LoginPage.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/LoginPage.tsx b/frontend/src/pages/LoginPage.tsx index 90e4a59..fc2f9c5 100644 --- a/frontend/src/pages/LoginPage.tsx +++ b/frontend/src/pages/LoginPage.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react' +import { useState, useEffect } from 'react' import { useNavigate } from 'react-router-dom' import { Card, Form, Input, Button, Tabs, message } from 'antd' import { UserOutlined, LockOutlined, MailOutlined, MoonOutlined, SunOutlined } from '@ant-design/icons' @@ -17,6 +17,22 @@ export default function LoginPage() { const toggleTheme = useThemeStore((s) => s.toggle) const navigate = useNavigate() + useEffect(() => { + const htmlOverflow = document.documentElement.style.overflow + const bodyOverflow = document.body.style.overflow + const bodyTouchAction = document.body.style.touchAction + + document.documentElement.style.overflow = 'hidden' + document.body.style.overflow = 'hidden' + document.body.style.touchAction = 'none' + + return () => { + document.documentElement.style.overflow = htmlOverflow + document.body.style.overflow = bodyOverflow + document.body.style.touchAction = bodyTouchAction + } + }, []) + async function handleSubmit(values: LoginAccountPayload | LoginEmailPayload) { setLoading(true) try {