import styles from "./index.less"; import React, { useState } from "react"; import { Form, Input, Tooltip, Cascader, Select, Row, Col, Checkbox, Button, AutoComplete, } from "antd"; import { QuestionCircleOutlined } from "@ant-design/icons"; const { Option } = Select; const AutoCompleteOption = AutoComplete.Option; const residences = [ { value: "zhejiang", label: "Zhejiang", children: [ { value: "hangzhou", label: "Hangzhou", children: [ { value: "xihu", label: "West Lake", }, ], }, ], }, { value: "jiangsu", label: "Jiangsu", children: [ { value: "nanjing", label: "Nanjing", children: [ { value: "zhonghuamen", label: "Zhong Hua Men", }, ], }, ], }, ]; const formItemLayout = { labelCol: { xs: { span: 24 }, sm: { span: 8 }, }, wrapperCol: { xs: { span: 24 }, sm: { span: 16 }, }, }; const tailFormItemLayout = { wrapperCol: { xs: { span: 24, offset: 0, }, sm: { span: 16, offset: 8, }, }, }; const RegistrationForm = () => { const [form] = Form.useForm(); const onFinish = (values) => { console.log("Received values of form: ", values); }; const prefixSelector = ( ); const [autoCompleteResult, setAutoCompleteResult] = useState([]); const onWebsiteChange = (value) => { if (!value) { setAutoCompleteResult([]); } else { setAutoCompleteResult( [".com", ".org", ".net"].map((domain) => `${value}${domain}`) ); } }; const websiteOptions = autoCompleteResult.map((website) => ({ label: website, value: website, })); return (
({ validator(rule, value) { if (!value || getFieldValue("password") === value) { return Promise.resolve(); } return Promise.reject( "The two passwords that you entered do not match!" ); }, }), ]} > Nickname  } rules={[ { required: true, message: "Please input your nickname!", whitespace: true, }, ]} > I have read the agreement
); }; export default () => (
);