import React, { useState } from 'react'; import { motion } from 'motion/react'; import { Lock, User } from 'lucide-react'; import { api } from '../lib/api'; interface LoginProps { onLogin: () => void; } export default function Login({ onLogin }: LoginProps) { const [username, setUsername] = useState('admin'); const [password, setPassword] = useState('123456'); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setLoading(true); setError(''); try { await api.login(username, password); onLogin(); } catch (err) { setError(err instanceof Error ? err.message : '登录失败'); } finally { setLoading(false); } }; return (
模型逆向系统

基于模型逆向体素化及DICOM分割标注系统

模型逆向系统

setUsername(e.target.value)} className="w-full pl-10 pr-4 py-2 bg-neutral-50 border border-neutral-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all outline-none" placeholder="请输入账号" />
setPassword(e.target.value)} className="w-full pl-10 pr-4 py-2 bg-neutral-50 border border-neutral-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all outline-none" placeholder="请输入密码" />
{error && (

{error}

)}
); }