mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
修复弹出数据不重置
This commit is contained in:
parent
9f5c8fa70a
commit
0a6c7e3719
|
@ -60,6 +60,16 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:hover,
|
||||
input:-webkit-autofill:focus,
|
||||
input:-webkit-autofill:active {
|
||||
transition-delay: 99999s;
|
||||
transition: color 99999s ease-out, background-color 99999s ease-out;
|
||||
-webkit-transition-delay: 99999s;
|
||||
-webkit-transition: color 99999s ease-out, background-color 99999s ease-out;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.ant-pro-grid-content.wide {
|
||||
.ant-pro-page-container-children-content {
|
||||
|
|
|
@ -36,12 +36,8 @@ const CronModal = ({
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (cron) {
|
||||
form.setFieldsValue(cron);
|
||||
} else {
|
||||
form.resetFields();
|
||||
}
|
||||
}, [cron]);
|
||||
form.resetFields();
|
||||
}, [cron, visible]);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
|
@ -60,9 +56,13 @@ const CronModal = ({
|
|||
}}
|
||||
onCancel={() => handleCancel()}
|
||||
confirmLoading={loading}
|
||||
destroyOnClose
|
||||
>
|
||||
<Form form={form} layout="vertical" name="form_in_modal" preserve={false}>
|
||||
<Form
|
||||
form={form}
|
||||
layout="vertical"
|
||||
name="form_in_modal"
|
||||
initialValues={cron}
|
||||
>
|
||||
<Form.Item name="name" label="名称">
|
||||
<Input placeholder="请输入任务名称" />
|
||||
</Form.Item>
|
||||
|
|
10
src/pages/env/editNameModal.tsx
vendored
10
src/pages/env/editNameModal.tsx
vendored
|
@ -34,7 +34,7 @@ const EditNameModal = ({
|
|||
|
||||
useEffect(() => {
|
||||
form.resetFields();
|
||||
}, [ids]);
|
||||
}, [ids, visible]);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
|
@ -53,14 +53,8 @@ const EditNameModal = ({
|
|||
}}
|
||||
onCancel={() => handleCancel()}
|
||||
confirmLoading={loading}
|
||||
destroyOnClose
|
||||
>
|
||||
<Form
|
||||
form={form}
|
||||
layout="vertical"
|
||||
name="edit_name_modal"
|
||||
preserve={false}
|
||||
>
|
||||
<Form form={form} layout="vertical" name="edit_name_modal">
|
||||
<Form.Item
|
||||
name="name"
|
||||
rules={[{ required: true, message: '请输入新的环境变量名称' }]}
|
||||
|
|
6
src/pages/env/index.tsx
vendored
6
src/pages/env/index.tsx
vendored
|
@ -274,7 +274,7 @@ const Env = () => {
|
|||
title: '确认删除',
|
||||
content: (
|
||||
<>
|
||||
确认删除Env{' '}
|
||||
确认删除变量{' '}
|
||||
<Text style={{ wordBreak: 'break-all' }} type="warning">
|
||||
{record.value}
|
||||
</Text>{' '}
|
||||
|
@ -365,7 +365,7 @@ const Env = () => {
|
|||
const delEnvs = () => {
|
||||
Modal.confirm({
|
||||
title: '确认删除',
|
||||
content: <>确认删除选中的Env吗</>,
|
||||
content: <>确认删除选中的变量吗</>,
|
||||
onOk() {
|
||||
request
|
||||
.delete(`${config.apiPrefix}envs`, { data: selectedRowIds })
|
||||
|
@ -388,7 +388,7 @@ const Env = () => {
|
|||
const operateEnvs = (operationStatus: number) => {
|
||||
Modal.confirm({
|
||||
title: `确认${OperationName[operationStatus]}`,
|
||||
content: <>确认{OperationName[operationStatus]}选中的Env吗</>,
|
||||
content: <>确认{OperationName[operationStatus]}选中的变量吗</>,
|
||||
onOk() {
|
||||
request
|
||||
.put(`${config.apiPrefix}envs/${OperationPath[operationStatus]}`, {
|
||||
|
|
11
src/pages/env/modal.tsx
vendored
11
src/pages/env/modal.tsx
vendored
|
@ -33,7 +33,7 @@ const EnvModal = ({
|
|||
|
||||
useEffect(() => {
|
||||
form.resetFields();
|
||||
}, [env]);
|
||||
}, [env, visible]);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
|
@ -52,15 +52,8 @@ const EnvModal = ({
|
|||
}}
|
||||
onCancel={() => handleCancel()}
|
||||
confirmLoading={loading}
|
||||
destroyOnClose
|
||||
>
|
||||
<Form
|
||||
form={form}
|
||||
layout="vertical"
|
||||
name="env_modal"
|
||||
preserve={false}
|
||||
initialValues={env}
|
||||
>
|
||||
<Form form={form} layout="vertical" name="env_modal" initialValues={env}>
|
||||
<Form.Item
|
||||
name="name"
|
||||
label="名称"
|
||||
|
|
Loading…
Reference in New Issue
Block a user