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
)}
-
+
{getFieldDecorator(branchByInputKey,{
rules:[{required:true,message:`请输入${branchByInputLabel}分支名称`}],
initialValue: initialValues[branchByInputKey]
@@ -347,7 +348,7 @@ function EditStore(props){
{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)}