mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-12-23 14:30:12 +08:00
弹窗组件open外置并使用三元运算
This commit is contained in:
@@ -40,11 +40,12 @@ export const ChangePasswordModel: React.FC<PropInterface> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{open ? (
|
||||||
<Modal
|
<Modal
|
||||||
title="修改密码"
|
title="修改密码"
|
||||||
centered
|
centered
|
||||||
forceRender
|
forceRender
|
||||||
open={open}
|
open={true}
|
||||||
width={416}
|
width={416}
|
||||||
onOk={() => form.submit()}
|
onOk={() => form.submit()}
|
||||||
onCancel={() => onCancel()}
|
onCancel={() => onCancel()}
|
||||||
@@ -97,6 +98,7 @@ export const ChangePasswordModel: React.FC<PropInterface> = ({
|
|||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -75,11 +75,12 @@ export const UserInfoModel: React.FC<PropInterface> = ({ open, onCancel }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{open ? (
|
||||||
<Modal
|
<Modal
|
||||||
title="个人信息"
|
title="个人信息"
|
||||||
centered
|
centered
|
||||||
forceRender
|
forceRender
|
||||||
open={open}
|
open={true}
|
||||||
width={416}
|
width={416}
|
||||||
onCancel={() => onCancel()}
|
onCancel={() => onCancel()}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
@@ -129,6 +130,7 @@ export const UserInfoModel: React.FC<PropInterface> = ({ open, onCancel }) => {
|
|||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
) : null}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user