- {item.name} + {item.name} {item.trend_type}
} diff --git a/src/forge/Branch/Select.jsx b/src/forge/Branch/Select.jsx index 073658d93..ff3dd829e 100644 --- a/src/forge/Branch/Select.jsx +++ b/src/forge/Branch/Select.jsx @@ -1,32 +1,61 @@ -import React , { useState , useEffect } from 'react'; -import { Popover , Dropdown , Input , Spin } from 'antd'; +import React , { useState , useEffect , useRef } from 'react'; +import { Dropdown} from 'antd'; import './branch.scss'; -import { getBranch , getTag } from '../GetData/getData'; import SelectOverlay from './SelectOverlay'; - +import { findDOMNode } from 'react-dom'; export default (({ projectsId , branch , owner , changeBranch , branchList , tagflag = true })=>{ const [ showValue , setShowValue ] = useState(branch); + const [ visible , setVisible ] = useState(false); + + const refFa = useRef(null); + const refBox = useRef(null); + + useEffect(() => { + document.addEventListener('click', clickMe , false); + }, []) + + const clickMe = ({ target }) => { + // 查找父组件 + const faComponent = findDOMNode(refFa.current); + const boxComponent = findDOMNode(refBox.current); + + if (faComponent && boxComponent) { + const isChild = faComponent.contains(target); + const isBox = boxComponent.contains(target); + if(!isChild && !isBox){ + setVisible(false); + } + } + } useEffect(()=>{ setShowValue(branch); },[branch]) + function ChangeB(params) { + setVisible(false); + changeBranch(params); + } + const menu = ( -暂无{inputValue}{nav === 0 ?"分支":"标签"}~
}{system_notification && system_notification.subject}
+{system_notification && system_notification.sub_subject}
+ {/*Gitlink运营团队
+2021年10月xx日
+- {item.name} +
+ {/* 如果是点击最新则发行版列表页只展示最新的一个 */} + {item.name} 最新
{item.created_at}
@@ -27,7 +27,8 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType} }) :{lastCommit.message}+
- {item.last_commit && truncateCommitId(item.last_commit.sha)} - {item.last_commit && item.last_commit.message} - 最后更新于{item.last_commit && item.last_commit.time_from_now} -
-分支列表
-
- {
- item.id ?
-
- {item.image_url?:""}
-
- :
-
- {item.image_url?
:""}
-
-
- }
-
-
+
- {flag && platform && ( -
{commit.message}- } - +
{item.branch_type === "default" ? "默认分支" : item.branch_type==="protected"?"保护分支":"其它分支"}
+ { + item.list && item.list.length>0 && ++ + +
+ +标签命名建议
++ 通常的做法是在版本名称前加上字母 v 前缀, v1.0 或者 v2.3.4。 +
++ 如果标签不适合在生产环境下使用,请在版本名称后添加预发行版本。例如:v0.2-alpha + 或者 v5.9-beta.3。 +
+语义化版本
++ 如果你是第一次发布版本,我们强烈建议你阅读语义化版本。 +
+附件大小说明
++ 单个附件不能超过 100M(GVP 项目200M),每个仓库总附件不可超过 + 1G(推荐项目不可超过 5G;GVP 项目不可超过 + 20G)。附件总容量统计包括仓库附件和发行版附件。 +
++ {/* 发行版附件下载 */} + {item.attachments && item.attachments.map((item)=>{ + return(下载 {item.title}) + })} + {/* 发行版下载包 */} + 下载 {item.tag_name}.TAR.gz + 下载 {item.tag_name}.ZIP +
+
{item.name}
@@ -110,7 +110,7 @@ class MergeItem extends Component {
如下文件有代码冲突:
+ {i} {i}
@@ -558,19 +560,19 @@ class MessageCount extends Component {
取消
- 示例:https://github.com/facebook/reack.git欢迎使用合并请求!
拖动文件或点击此处上传
+拖动文件或点击此处上传
标签命名建议
-- 通常的做法是在版本名称前加上字母 v 前缀, v1.0 或者 v2.3.4。 -
-- 如果标签不适合在生产环境下使用,请在版本名称后添加预发行版本。例如:v0.2-alpha - 或者 v5.9-beta.3。 -
-语义化版本
-- 如果你是第一次发布版本,我们强烈建议你阅读语义化版本。 -
-附件大小说明
-- 单个附件不能超过 100M(GVP 项目200M),每个仓库总附件不可超过 - 1G(推荐项目不可超过 5G;GVP 项目不可超过 - 20G)。附件总容量统计包括仓库附件和发行版附件。 -
-