forked from Gitlink/forgeplus-react
This commit is contained in:
parent
982db1460b
commit
c3dd72c4af
|
@ -11,8 +11,6 @@ import CoderRootFileDetail from './CoderRootFileDetail';
|
|||
import { truncateCommitId } from '../common/util';
|
||||
import RenderHtml from '../../components/render-html';
|
||||
|
||||
import Time from '../Utils/Time';
|
||||
|
||||
import axios from 'axios';
|
||||
/**
|
||||
* address:http和SSH,http_url(对应git地址)
|
||||
|
@ -280,7 +278,6 @@ class CoderRootDirectory extends Component{
|
|||
const { branchLastCommit , http_url , isManager , isDeveloper } = this.props;
|
||||
const { projectsId } = this.props.match.params;
|
||||
|
||||
console.log(rootList);
|
||||
const columns = [
|
||||
{
|
||||
dataIndex: 'name',
|
||||
|
@ -295,7 +292,7 @@ class CoderRootDirectory extends Component{
|
|||
width:"60%",
|
||||
render:(text,item)=>
|
||||
(
|
||||
item.commit && item.commit.message ? <span>{item.commit.message}</span> :""
|
||||
item.commit && item.commit.message ? <span className="task-hide" style={{display:'block',maxWidth:"670px"}}>{item.commit.message}</span> :""
|
||||
)
|
||||
},{
|
||||
dataIndex:"commit",
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import React , { useState, useEffect } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { AutoComplete } from 'antd';
|
||||
|
||||
import axios from 'axios';
|
||||
import './version.css';
|
||||
|
||||
export default ()=>{
|
||||
|
||||
export default (projectDetail)=>{
|
||||
const [ tagList , setTagList ] = useState(undefined);
|
||||
|
||||
const SelectDiv = styled.div`
|
||||
display:flex;
|
||||
align-item:center;
|
||||
|
@ -17,9 +18,19 @@ export default ()=>{
|
|||
}
|
||||
`;
|
||||
|
||||
useEffect(()=>{
|
||||
|
||||
})
|
||||
const repo_id = projectDetail && projectDetail.repo_id;
|
||||
useEffect(() => {
|
||||
if (repo_id) {
|
||||
const url = `/repositories/${repo_id}/tags.json`;
|
||||
axios.get(url).then((result) => {
|
||||
if (result) {
|
||||
setTagList(result.data);
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
}, [repo_id]);
|
||||
return(
|
||||
<div className="main df">
|
||||
<div className="versionForm">
|
||||
|
@ -30,7 +41,7 @@ export default ()=>{
|
|||
<i className="iconfont icon-biaoqian3 font-14 color-grey-8"></i>
|
||||
<AutoComplete
|
||||
placeholder="标记一个版本"
|
||||
|
||||
dataSource={tagList}
|
||||
></AutoComplete>
|
||||
<i className="iconfont icon-jiantou9 color-grey-8 font-14 ml5"></i>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue