From 71937ebd58a4caddbc8a9567e27f9446e811c9b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Thu, 31 Aug 2023 16:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=88=86=E6=94=AF=E5=A1=AB?= =?UTF-8?q?=E5=85=85=E9=BB=98=E8=AE=A4=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tree/Index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx index b9897d4a..ae3117a8 100644 --- a/src/forge/Main/tree/Index.jsx +++ b/src/forge/Main/tree/Index.jsx @@ -45,7 +45,6 @@ function Index(props) { const {branches, total_count} = result.data; setTotal(total_count) setList(branches); - setNewFormBranchName(branches[0].name); } setIsSpin(false); }).catch(error=>{setIsSpin(false);}) @@ -56,6 +55,7 @@ function Index(props) { const { author, name} = projectDetail; document.title = `所有分支-${author.name}/${name}`; } + setNewFormBranchName(projectDetail && projectDetail.default_branch); }, [projectDetail]) @@ -387,7 +387,7 @@ function Index(props) {
{newBranchError}
分支起点
- {setNewFormBranchName(value)}} getPopupContainer={triggerNode => triggerNode.parentNode}> {branchList && branchList.map((item, index)=>{ return {item.name} })}