- 暂时移除未使用的变量
- 配置项目依赖
- 组织项目基础结构
- 完成auth页面书写
Change-Id: I132c32f131111121619eb69240ece0a39e295c36
diff --git a/src/feature/auth/Login.tsx b/src/feature/auth/Login.tsx
new file mode 100644
index 0000000..14bf6c8
--- /dev/null
+++ b/src/feature/auth/Login.tsx
@@ -0,0 +1,50 @@
+
+import { LockOutlined, MailOutlined } from '@ant-design/icons';
+import { Button, Checkbox, Form, Input, Flex } from 'antd';
+import { NavLink } from 'react-router';
+function Login() {
+ const onFinish = (values: unknown) => {
+ console.log('Received values of form: ', values);
+ };
+
+ return (
+ <Form
+ name="login"
+ initialValues={{ remember: true }}
+ style={{ maxWidth: 360 }}
+ onFinish={onFinish}
+ >
+ <h2>登录</h2>
+ <Form.Item
+ name="email"
+ rules={[{ required: true, message: '请输入你的账号(注册邮箱)!' }, { type: 'email', message: '请输入正确的邮箱' }]}
+ >
+ <Input prefix={<MailOutlined />} placeholder="账号(注册邮箱)" />
+ </Form.Item>
+ <Form.Item
+ name="password"
+ rules={[{ required: true, message: '请输入你的密码!' }]}
+ >
+ <Input prefix={<LockOutlined />} type="password" placeholder="密码" />
+ </Form.Item>
+ <Form.Item>
+ <Flex justify="space-between" align="center">
+ <Form.Item name="remember" valuePropName="checked" noStyle>
+ <Checkbox>自动登录</Checkbox>
+ </Form.Item>
+ <NavLink to='/forget'> 忘记密码 </NavLink>
+
+ </Flex>
+ </Form.Item>
+
+ <Form.Item>
+ <Button block type="primary" htmlType="submit">
+ 登录
+ </Button>
+ 或 <NavLink to='/register'>注册</NavLink>
+ </Form.Item>
+ </Form>
+ );
+};
+
+export default Login;
\ No newline at end of file