提交详情页体验优化

This commit is contained in:
谢思 2021-10-11 11:28:41 +08:00
parent c73b1c9e29
commit d7ab95eccc
1 changed files with 7 additions and 3 deletions

View File

@ -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(
<div>
<div onClick={(e)=>{e.nativeEvent.stopImmediatePropagation()}}>
<AlignCenter className="color-grey-9" style={{position:'relative'}}>
<div onClick={()=>{setIsOpen(!isOpen)}}>
<i className={`iconfont mr5 ${isOpen? "font-18 icon-sanjiaoxing-down":"font-16 icon-triangle"}`}></i>