dev_forge
caicai8 5 years ago
parent 43e9c90439
commit d9e89e6fb7

@ -25,7 +25,7 @@ class CoderRootBranch extends Component {
return(
<li>
<div>
<Link to={`/projects/${projectsId}/coder/commit?branch=${item.name}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link>
<Link to={`/projects/${projectsId}/coder?branch=${item.name}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link>
{/*<span className="color-blue font-15">{item.name}</span>*/}
<p className="f-wrap-alignCenter">
<span className="mr5 color-blue">{item.last_commit && item.last_commit.id}</span>

@ -19,21 +19,11 @@ class CoderRootCommit extends Component{
}
componentDidMount=()=>{
console.log(this.props);
let { search } = this.props.history.location;
let branchName = undefined;
if(search && search.indexOf("branch")>-1){
branchName = search.split("=")[1];
console.log(branchName);
this.setState({
branch:branchName
})
}
const { branch , page , limit } = this.state;
this.setState({
isSpin:true
})
this.getCommitList( branchName || branch , page , limit );
this.getCommitList( branch , page , limit );
}
getCommitList=(branch , page , limit)=>{

@ -42,7 +42,16 @@ class CoderRootDirectory extends Component{
}
componentDidMount=()=>{
this.getProjectRoot();
let { search } = this.props.history.location;
let branchName = undefined;
if(search && search.indexOf("branch")>-1){
branchName = search.split("=")[1];
this.setState({
branch:branchName
})
}
const { branch } = this.state;
this.getProjectRoot(branchName || branch);
}
// 获取根目录

Loading…
Cancel
Save