mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-12 19:30:48 +08:00
修复创建脚本可能失败
This commit is contained in:
@@ -7,10 +7,8 @@ import config from '@/utils/config';
|
||||
const AppModal = ({
|
||||
app,
|
||||
handleCancel,
|
||||
visible,
|
||||
}: {
|
||||
app?: any;
|
||||
visible: boolean;
|
||||
handleCancel: (needUpdate?: boolean) => void;
|
||||
}) => {
|
||||
const [form] = Form.useForm();
|
||||
@@ -41,14 +39,10 @@ const AppModal = ({
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
form.resetFields();
|
||||
}, [app, visible]);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title={app ? intl.get('编辑应用') : intl.get('创建应用')}
|
||||
open={visible}
|
||||
open={true}
|
||||
forceRender
|
||||
centered
|
||||
maskClosable={false}
|
||||
|
||||
@@ -363,11 +363,9 @@ const Setting = () => {
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<AppModal
|
||||
visible={isModalVisible}
|
||||
handleCancel={handleCancel}
|
||||
app={editedApp}
|
||||
/>
|
||||
{isModalVisible && (
|
||||
<AppModal handleCancel={handleCancel} app={editedApp} />
|
||||
)}
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user