temp
This commit is contained in:
@@ -26,7 +26,10 @@ class AddUser extends React.Component<AddUserProps, AddUserState> {
|
||||
|
||||
handleOk = () => {
|
||||
this.formRef.current?.submit();
|
||||
this.props.onSuccess();
|
||||
};
|
||||
|
||||
handleCancel = () => {
|
||||
this.switchShow();
|
||||
};
|
||||
|
||||
switchShow = () => {
|
||||
@@ -39,13 +42,20 @@ class AddUser extends React.Component<AddUserProps, AddUserState> {
|
||||
trailwayAddUser(values).then((resp: any) => {
|
||||
if (resp.code == 200) {
|
||||
this.switchShow();
|
||||
this.props.onSuccess();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Modal title="增加用户" visible={this.state.isShow} onOk={this.handleOk}>
|
||||
<Modal
|
||||
title="增加用户"
|
||||
visible={this.state.isShow}
|
||||
onOk={this.handleOk}
|
||||
onCancel={this.handleCancel}
|
||||
closable={false}
|
||||
>
|
||||
<Form ref={this.formRef} onFinish={this.handleFinish}>
|
||||
<FormItem name="username">
|
||||
<Input placeholder="账户" />
|
||||
|
||||
Reference in New Issue
Block a user