This commit is contained in:
caishi 2021-03-30 11:50:25 +08:00
parent 6a4fe4d277
commit 2c83221376
3 changed files with 12 additions and 6 deletions

View File

@ -1,6 +1,6 @@
import React , { useEffect , useState } from 'react';
import { WhiteBack , Box , LongWidth , ShortWidth , Gap , AlignCenter , FlexAJ } from '../Component/layout';
import { Dropdown , Menu , Divider , Spin } from 'antd';
import { Dropdown , Menu , Divider , Spin, Button } from 'antd';
import { getImageUrl } from "educoder";
import { Link } from 'react-router-dom';
import CloneAddress from '../Branch/CloneAddress';
@ -290,8 +290,14 @@ function CoderDepot(props){
<a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/pulls/new`)} >+ 合并请求</a>
<a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务</a>
</div>
{ type === "dir" && <Dropdown.Button overlay={fileMenu} className="mr20">文件</Dropdown.Button>}
<Dropdown.Button overlay={downloadMenu} type={'primary'}>下载</Dropdown.Button>
{ type === "dir" &&
<Dropdown overlay={fileMenu} className="mr20">
<Button type="default">文件 <i className="iconfont icon-sanjiaoxing-down ml3 font-14 color-grey-9"></i></Button>
</Dropdown>
}
<Dropdown overlay={downloadMenu} placement="bottomRight">
<Button type={'primary'}>下载 <i className="iconfont icon-sanjiaoxing-down ml3 font-14 color-white"></i></Button>
</Dropdown>
</AlignCenter>
</FlexAJ>
{

View File

@ -83,10 +83,10 @@
}
.addOptionBtn{
height: 32px;
line-height: 32px;
line-height: 30px;
display: flex;
border:1px solid #d9d9d9;
border-radius: 4px;
border-radius: 2px;
a{
padding:0px 13px;
color: rgba(0, 0, 0, 0.65);

View File

@ -11,7 +11,7 @@ function Collaborator(props){
const [ newGroupId , setNewGroupId] = useState(undefined);
const {projectsId ,owner} = props.match.params;
const author = props.projectDetail && props.projectDetail.author;
const author = props && props.projectDetail && props.projectDetail.author;
function getID(id){
setNewId(id);