import AvatarUploader from "@web/src/components/common/uploader/AvatarUploader"; import DepartmentSelect from "@web/src/components/models/department/department-select"; import { Form, Input, Button, Select } from "antd"; import { motion } from "framer-motion"; import { useState } from "react"; export interface RegisterFormData { deptId: string; domainId: string; username: string; showname: string; officerId: string; password: string; repeatPass: string; rank: string; office: string; email: string; phoneNumber: string; } interface RegisterFormProps { onSubmit: (data: RegisterFormData) => void; isLoading: boolean; } export const RegisterForm = ({ onSubmit, isLoading }: RegisterFormProps) => { const [form] = Form.useForm(); const [domainId, setDomainId] = useState(); return (
{ setDomainId(value as string); }} domain={true} />
({ validator(_, value) { if ( !value || getFieldValue("password") === value ) { return Promise.resolve(); } return Promise.reject( new Error("两次输入的密码不一致") ); }, }), ]}>
); };