user/Info.js: fix submit button availability when validateStatus is false (#225)

* user/Info.js: fix submit button available state.

Info.js: 修复前端密码验证失败,提交按钮依然可用的问题

* user/Info.js: fix `help` placeholder
This commit is contained in:
Q01 2022-02-27 13:14:41 +08:00 committed by GitHub
parent d7470c324d
commit e0477f201c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,13 +194,13 @@ class Info extends Component {
}, },
]} ]}
validateStatus={this.state.validateStatus} validateStatus={this.state.validateStatus}
help={this.state.errorMsg || ''} help={this.state.errorMsg || ' '}
> >
<Input type='password' placeholder="请和上面输入新的密码保持一致" <Input type='password' placeholder="请和上面输入新的密码保持一致"
onChange={(value) => this.onNewPassword2Change(value)} style={{width: 240}}/> onChange={(value) => this.onNewPassword2Change(value)} style={{width: 240}}/>
</Form.Item> </Form.Item>
<Form.Item {...formTailLayout}> <Form.Item {...formTailLayout}>
<Button type="primary" htmlType="submit"> <Button disabled={this.state.errorMsg || !this.state.validateStatus} type="primary" htmlType="submit">
提交 提交
</Button> </Button>
</Form.Item> </Form.Item>