Skip to content

Commit

Permalink
feat: 添加密码框
Browse files Browse the repository at this point in the history
  • Loading branch information
JackySoft committed Dec 10, 2024
2 parents 55b6167 + beb6bdc commit a2fb596
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/editor/src/pages/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useNavigate } from 'react-router-dom';
import { login, sendEmail, regist } from '@/api/user';
import storage from '@/utils/storage';
import { usePageStore } from '@/stores/pageStore';
import { SafetyOutlined, UserOutlined } from '@ant-design/icons';
import { SafetyOutlined, UserOutlined, LockOutlined } from '@ant-design/icons';
import style from './index.module.less';
type FieldType = {
userName: string;
Expand Down Expand Up @@ -119,6 +119,12 @@ export default function Login() {
</Form.Item>
)}

{type !== 'reset' && (
<Form.Item<FieldType> style={{ marginTop: 32 }} name="userPwd" rules={[{ required: true, message: '请输入密码' }]}>
<Input.Password prefix={<LockOutlined />} autoComplete="off" allowClear placeholder="请输入密码" />
</Form.Item>
)}

<Form.Item style={{ marginTop: 40 }}>
<Button type="primary" block htmlType="submit" loading={loading2} disabled={status}>
{type === 'login' ? '登录' : '注册'}
Expand Down

0 comments on commit a2fb596

Please sign in to comment.