'use client'; import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" import { Card, CardContent } from "@/components/ui/card" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { KeyRound, Phone, Mail } from "lucide-react" import { useState } from "react" import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp" import { InputOTP, InputOTPGroup, InputOTPSlot } from "./ui/input-otp"; function LoginHeader() { return ( <>

欢迎回来

登陆到您的账户

) } function RegisterHeader() { return ( <>

欢迎注册

注册您的账号

) } function PasswordMode() { return ( <>
忘记密码?
) } function PhoneMode() { return ( <>
) } function EmailMode() { return ( <>
) } function RegisterMode() { return ( <>
) } export function LoginForm({ className, ...props }: React.ComponentProps<"div">) { const [loginMode, setLoginMode] = useState<'password' | 'phone' | 'email' | 'register'>('password'); return (
{loginMode === 'password' ? : null} {loginMode === 'phone' ? : null} {loginMode === 'email' ? : null} {loginMode === 'register' ? : null} { loginMode !== 'register' && ( <>
或者使用
) } { loginMode === 'register' ? ( <> ) : ( <>
还没有账号?{" "} setLoginMode('register')}> 注册
) }
Image
登录即表示您同意我们的{" "} 服务条款 {" "} 和{" "} 隐私政策
) }