From 9506742237d5b8872caacd53315df7fc48bfe385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Wed, 15 May 2024 09:56:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=B8=BB=E5=88=86=E6=94=AF?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E4=BB=8E=E5=88=86=E6=94=AF=E5=86=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Server/reposyncer/component/addTaskModal.jsx | 2 +- src/forge/Server/reposyncer/component/editStore.jsx | 7 ++++--- src/forge/Server/reposyncer/component/storeList.jsx | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/forge/Server/reposyncer/component/addTaskModal.jsx b/src/forge/Server/reposyncer/component/addTaskModal.jsx index 56857859..a8a58d58 100644 --- a/src/forge/Server/reposyncer/component/addTaskModal.jsx +++ b/src/forge/Server/reposyncer/component/addTaskModal.jsx @@ -94,7 +94,7 @@ function DeleteBox({owner, projectsId, visible, setVisible, branchList, reload, {synchronizeTips(platform)} } - {platform && first_sync_direction && branchForm(getFieldDecorator, setFieldsValue, {}, first_sync_direction, first_sync_direction === "2" ? repositoriesBranch[platform] : branchList, platform, {})} + {platform && first_sync_direction && branchForm(getFieldDecorator, setFieldsValue, getFieldsValue, {}, first_sync_direction, first_sync_direction === "2" ? repositoriesBranch[platform] : branchList, platform, {})} {showConfrimContent &&
{confirmInfo1()} diff --git a/src/forge/Server/reposyncer/component/editStore.jsx b/src/forge/Server/reposyncer/component/editStore.jsx index df6e5c04..6d482e87 100644 --- a/src/forge/Server/reposyncer/component/editStore.jsx +++ b/src/forge/Server/reposyncer/component/editStore.jsx @@ -61,11 +61,12 @@ export const synchronizeTips = (platform="Github")=>{ } // 根据同步方向显示分支form item -export const branchForm = (getFieldDecorator, setFieldsValue, initialValues, first_sync_direction = "1", branchList, platform, formItemLayout)=>{ +export const branchForm = (getFieldDecorator, setFieldsValue, getFieldsValue, initialValues, first_sync_direction = "1", branchList, platform, formItemLayout)=>{ const branchBySelectLabel = first_sync_direction === "1" ? "Gitlink" : platform; const branchBySelectKey = first_sync_direction === "1" ? "gitlink_branch_name" : "external_branch_name"; const branchByInputLabel = first_sync_direction === "1" ? platform : "Gitlink"; const branchByInputKey = first_sync_direction === "1" ? "external_branch_name" : "gitlink_branch_name"; + const branchName = getFieldsValue([branchByInputKey])[branchByInputKey] return {getFieldDecorator(branchBySelectKey,{ @@ -84,7 +85,7 @@ export const branchForm = (getFieldDecorator, setFieldsValue, initialValues, fir )} - + {synchronizeTips(platform)}
} - {branch === "2" && first_sync_direction && branchForm(getFieldDecorator, setFieldsValue, values, first_sync_direction, first_sync_direction === "2" ? externalRepoBranchList : branchList, platform, formItemLayout)} + {branch === "2" && first_sync_direction && branchForm(getFieldDecorator, setFieldsValue, getFieldsValue, values, first_sync_direction, first_sync_direction === "2" ? externalRepoBranchList : branchList, platform, formItemLayout)}