mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-18 02:14:32 +08:00
修复弹出数据不重置
This commit is contained in:
Vendored
+2
-8
@@ -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: '请输入新的环境变量名称' }]}
|
||||
|
||||
Vendored
+3
-3
@@ -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]}`, {
|
||||
|
||||
Vendored
+2
-9
@@ -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="名称"
|
||||
|
||||
Reference in New Issue
Block a user