mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +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) {
|
@media (max-width: 768px) {
|
||||||
.ant-pro-grid-content.wide {
|
.ant-pro-grid-content.wide {
|
||||||
.ant-pro-page-container-children-content {
|
.ant-pro-page-container-children-content {
|
||||||
|
|
|
@ -36,12 +36,8 @@ const CronModal = ({
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (cron) {
|
form.resetFields();
|
||||||
form.setFieldsValue(cron);
|
}, [cron, visible]);
|
||||||
} else {
|
|
||||||
form.resetFields();
|
|
||||||
}
|
|
||||||
}, [cron]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
@ -60,9 +56,13 @@ const CronModal = ({
|
||||||
}}
|
}}
|
||||||
onCancel={() => handleCancel()}
|
onCancel={() => handleCancel()}
|
||||||
confirmLoading={loading}
|
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="名称">
|
<Form.Item name="name" label="名称">
|
||||||
<Input placeholder="请输入任务名称" />
|
<Input placeholder="请输入任务名称" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
10
src/pages/env/editNameModal.tsx
vendored
10
src/pages/env/editNameModal.tsx
vendored
|
@ -34,7 +34,7 @@ const EditNameModal = ({
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
}, [ids]);
|
}, [ids, visible]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
@ -53,14 +53,8 @@ const EditNameModal = ({
|
||||||
}}
|
}}
|
||||||
onCancel={() => handleCancel()}
|
onCancel={() => handleCancel()}
|
||||||
confirmLoading={loading}
|
confirmLoading={loading}
|
||||||
destroyOnClose
|
|
||||||
>
|
>
|
||||||
<Form
|
<Form form={form} layout="vertical" name="edit_name_modal">
|
||||||
form={form}
|
|
||||||
layout="vertical"
|
|
||||||
name="edit_name_modal"
|
|
||||||
preserve={false}
|
|
||||||
>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="name"
|
name="name"
|
||||||
rules={[{ required: true, message: '请输入新的环境变量名称' }]}
|
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: '确认删除',
|
title: '确认删除',
|
||||||
content: (
|
content: (
|
||||||
<>
|
<>
|
||||||
确认删除Env{' '}
|
确认删除变量{' '}
|
||||||
<Text style={{ wordBreak: 'break-all' }} type="warning">
|
<Text style={{ wordBreak: 'break-all' }} type="warning">
|
||||||
{record.value}
|
{record.value}
|
||||||
</Text>{' '}
|
</Text>{' '}
|
||||||
|
@ -365,7 +365,7 @@ const Env = () => {
|
||||||
const delEnvs = () => {
|
const delEnvs = () => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '确认删除',
|
title: '确认删除',
|
||||||
content: <>确认删除选中的Env吗</>,
|
content: <>确认删除选中的变量吗</>,
|
||||||
onOk() {
|
onOk() {
|
||||||
request
|
request
|
||||||
.delete(`${config.apiPrefix}envs`, { data: selectedRowIds })
|
.delete(`${config.apiPrefix}envs`, { data: selectedRowIds })
|
||||||
|
@ -388,7 +388,7 @@ const Env = () => {
|
||||||
const operateEnvs = (operationStatus: number) => {
|
const operateEnvs = (operationStatus: number) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: `确认${OperationName[operationStatus]}`,
|
title: `确认${OperationName[operationStatus]}`,
|
||||||
content: <>确认{OperationName[operationStatus]}选中的Env吗</>,
|
content: <>确认{OperationName[operationStatus]}选中的变量吗</>,
|
||||||
onOk() {
|
onOk() {
|
||||||
request
|
request
|
||||||
.put(`${config.apiPrefix}envs/${OperationPath[operationStatus]}`, {
|
.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(() => {
|
useEffect(() => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
}, [env]);
|
}, [env, visible]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
@ -52,15 +52,8 @@ const EnvModal = ({
|
||||||
}}
|
}}
|
||||||
onCancel={() => handleCancel()}
|
onCancel={() => handleCancel()}
|
||||||
confirmLoading={loading}
|
confirmLoading={loading}
|
||||||
destroyOnClose
|
|
||||||
>
|
>
|
||||||
<Form
|
<Form form={form} layout="vertical" name="env_modal" initialValues={env}>
|
||||||
form={form}
|
|
||||||
layout="vertical"
|
|
||||||
name="env_modal"
|
|
||||||
preserve={false}
|
|
||||||
initialValues={env}
|
|
||||||
>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="name"
|
name="name"
|
||||||
label="名称"
|
label="名称"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user