diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx index 172038b2..87260cdd 100644 --- a/src/forge/Merge/Files.jsx +++ b/src/forge/Merge/Files.jsx @@ -1,7 +1,7 @@ -import React ,{useEffect,useRef,useState } from 'react'; +import React ,{useEffect,useState } from 'react'; import { truncateCommitId } from '../common/util'; import { AlignCenter , FlexAJ } from '../Component/layout'; -import { Button, Tooltip,Progress, Popover, Anchor } from 'antd'; +import { Tooltip,Progress } from 'antd'; import './merge.css'; import './Index.scss'; @@ -16,6 +16,10 @@ function Files({ data,history,owner,projectsId , parentsSha }){ } },[data]); + useEffect(()=>{ + document.addEventListener('click',()=>{setIsOpen(false)}) + }) + function showDown(flag,index,isBin){ if(!isBin){ var lists = files.concat(); @@ -63,7 +67,7 @@ function Files({ data,history,owner,projectsId , parentsSha }){ ) return( -