From 2c02c67e9e2e0b83205fe2b43daf14a56c72c186 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Tue, 28 Apr 2026 15:54:36 +0800 Subject: [PATCH] feat(web): login ui --- web/src/views/Login/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/views/Login/index.tsx b/web/src/views/Login/index.tsx index af2ec022..b25c1f4b 100644 --- a/web/src/views/Login/index.tsx +++ b/web/src/views/Login/index.tsx @@ -37,8 +37,10 @@ const inputClassName = "login-input rb:rounded-[8px]! rb:p-[12px]! rb:h-[44px]! const { clearUserInfo, updateLoginInfo, getUserInfo } = useUser(); const { language } = useI18n() const [loading, setLoading] = useState(false); - const [canLogin, setCanLogin] = useState(false); const [form] = Form.useForm(); + const emailVal = Form.useWatch('email', form); + const passwordVal = Form.useWatch('password', form); + const canLogin = !!(emailVal && passwordVal); const { message } = App.useApp(); useEffect(() => { @@ -99,7 +101,6 @@ const inputClassName = "login-input rb:rounded-[8px]! rb:p-[12px]! rb:h-[44px]!
setCanLogin(!!(all.email && all.password))} >