Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymous committed Feb 22, 2024
1 parent bb0504c commit 9524ce9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
24 changes: 21 additions & 3 deletions src/components/RightContent/ChangePasswordForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { changePassword } from '@/services/user';
import { requiredRules } from '@/utils/rules';
import MyModalForm from '@/components/MyModalForm';
import t from '@/utils/i18n';
import {LockOutlined} from "@ant-design/icons";
import styles from "@/pages/User/index.less";

export default () => {

Expand All @@ -20,13 +22,29 @@ export default () => {
return (
<MyModalForm
title={t('change.password')}
labelWidth={80}
labelWidth={90}
request={requestHandler}
onSuccess={successHandler}
initialValues={{}}
>
<ProFormText.Password name="oldPassword" label={t('old.password')} rules={requiredRules()} />
<ProFormText.Password name="newPassword" label={t('new.password')} rules={requiredRules()} />
<ProFormText.Password
name="oldPassword"
label={t('old.password')}
rules={requiredRules()}
fieldProps={{
size: 'large',
autoComplete: 'new-password',
}}
/>
<ProFormText.Password
name="newPassword"
label={t('new.password')}
rules={requiredRules()}
fieldProps={{
size: 'large',
autoComplete: 'new-password',
}}
/>
</MyModalForm>
);
};
2 changes: 1 addition & 1 deletion src/locales/zh-CN/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default {
'login.remember': '30天内自动登录',
'change.password': '修改密码',
'logout': '退出登录',
'old.password': '原始密码',
'old.password': '原密码',
'new.password': '新密码',
'bind.user': '绑定账号',

Expand Down

0 comments on commit 9524ce9

Please sign in to comment.