|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import React , { Component } from 'react';
|
|
|
|
|
import { Dropdown , Icon , Menu , Table } from 'antd';
|
|
|
|
|
import {Link} from 'react-router-dom';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
// 点击按钮复制功能
|
|
|
|
|
function jsCopy(){
|
|
|
|
@ -12,7 +13,8 @@ class CoderRootDirectory extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
|
super(props);
|
|
|
|
|
this.state={
|
|
|
|
|
address:"http"
|
|
|
|
|
address:"http",
|
|
|
|
|
ref:"master"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -22,6 +24,26 @@ class CoderRootDirectory extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount=()=>{
|
|
|
|
|
this.getProjectRoot();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getProjectRoot=(ref)=>{
|
|
|
|
|
const { login } = this.props.current_user;
|
|
|
|
|
const { projectsId } = this.props.match.params;
|
|
|
|
|
|
|
|
|
|
const url = `/${login}/${projectsId}/entries.json`;
|
|
|
|
|
axios.get((url),{
|
|
|
|
|
params:{
|
|
|
|
|
ref
|
|
|
|
|
}
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
const menu = (
|
|
|
|
|
<Menu>
|
|
|
|
@ -84,7 +106,7 @@ class CoderRootDirectory extends Component{
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const { address } = this.state;
|
|
|
|
|
const { address , ref } = this.state;
|
|
|
|
|
return(
|
|
|
|
|
<div className="main">
|
|
|
|
|
<p className="branch-wrapper">
|
|
|
|
@ -97,7 +119,7 @@ class CoderRootDirectory extends Component{
|
|
|
|
|
<span className="color-grey-9 mr3"><i className="iconfont icon-fenzhi font-20 color-grey-6 mr3"></i>分支:</span>
|
|
|
|
|
<Dropdown overlay={menu} trigger={['click']} placement="bottomRight">
|
|
|
|
|
<a className="ant-dropdown-link">
|
|
|
|
|
master <Icon type="down" />
|
|
|
|
|
{ref} <Icon type="down" />
|
|
|
|
|
</a>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</div>
|
|
|
|
|