|
@@ -43,7 +43,6 @@ const handleUpdate = async (fields: PasswordChange) => {
|
|
|
};
|
|
|
|
|
|
|
|
|
-
|
|
|
const TableList: React.FC<{}> = () => {
|
|
|
const [success, setSuccess] = useState<InputState>(InputState.default);
|
|
|
|
|
@@ -59,9 +58,9 @@ const TableList: React.FC<{}> = () => {
|
|
|
if (res.success) {
|
|
|
setSuccess(InputState.success);
|
|
|
return true;
|
|
|
- } else {
|
|
|
- setSuccess(InputState.error);
|
|
|
}
|
|
|
+ setSuccess(InputState.error);
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -81,7 +80,7 @@ const TableList: React.FC<{}> = () => {
|
|
|
const res = await service.updateAccountName(value);
|
|
|
if (res.success) {
|
|
|
message.success('修改成功');
|
|
|
- history.go(0);
|
|
|
+ window.history.go(0);
|
|
|
} else {
|
|
|
message.error('修改失败!');
|
|
|
}
|
|
@@ -110,7 +109,7 @@ const TableList: React.FC<{}> = () => {
|
|
|
validateStatus={success}
|
|
|
rules={[{required: true, message: '请输入用户名!'}]}
|
|
|
>
|
|
|
- <Input />
|
|
|
+ <Input/>
|
|
|
</Form.Item>
|
|
|
|
|
|
<Form.Item {...tailLayout}>
|
|
@@ -156,7 +155,20 @@ const TableList: React.FC<{}> = () => {
|
|
|
</Form.Item>
|
|
|
</Form>
|
|
|
</Card>
|
|
|
-
|
|
|
+ <Card title="刷新页面" style={{width: '100%'}}>
|
|
|
+ <Form
|
|
|
+ {...layout}
|
|
|
+ name="basic"
|
|
|
+ >
|
|
|
+ <Form.Item {...tailLayout}>
|
|
|
+ <Button type="primary" htmlType="button" onClick={()=>{
|
|
|
+ window.location.reload();
|
|
|
+ }}>
|
|
|
+ 刷新页面
|
|
|
+ </Button>
|
|
|
+ </Form.Item>
|
|
|
+ </Form>
|
|
|
+ </Card>
|
|
|
</PageHeaderWrapper>
|
|
|
);
|
|
|
};
|