From 08b5f7edc0e2701664b8deb5b71f24e623884f35 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 11 Oct 2021 17:24:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=9C=86=E7=82=B9=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index a19bd80da..f2f7cd2b4 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -224,7 +224,7 @@ height: 8px; width: 8px; left: 0px; - top:10px + top:8px; } &>span{ padding-left: 15px; From b0d13792816b193f8060499acc2791480bcae154 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 11 Oct 2021 18:35:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=94=B9=E7=89=88=E5=90=8E=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E6=8E=A5=E5=8F=A3top=5Fcount.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderRootIndex.js | 63 ++++++++++++------------ src/forge/Newfile/UserSubmitComponent.js | 3 +- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/forge/Main/CoderRootIndex.js b/src/forge/Main/CoderRootIndex.js index b5d241968..7ff25dae1 100644 --- a/src/forge/Main/CoderRootIndex.js +++ b/src/forge/Main/CoderRootIndex.js @@ -3,7 +3,6 @@ import { Route , Switch } from 'react-router-dom'; // import Top from './DetailTop'; import Loadable from 'react-loadable'; import Loading from '../../Loading'; -import axios from 'axios'; import './Index.scss'; const FileNew = Loadable({ @@ -51,37 +50,37 @@ class CoderRootIndex extends Component{ } } - componentDidMount=()=>{ - this.Init(); - } - componentDidUpdate=(prevProps)=>{ - const { location } = this.props; - const prevlocation = prevProps && prevProps.location; - if (location !== prevlocation) { - this.Init(); - } - } + // componentDidMount=()=>{ + // this.Init(); + // } + // componentDidUpdate=(prevProps)=>{ + // const { location } = this.props; + // const prevlocation = prevProps && prevProps.location; + // if (location !== prevlocation) { + // this.Init(); + // } + // } - Init=()=>{ - const { branchName } = this.props.match.params; - const { defaultBranch } = this.props; - this.getTopCount(branchName || defaultBranch); - } + // Init=()=>{ + // const { branchName } = this.props.match.params; + // const { defaultBranch } = this.props; + // this.getTopCount(branchName || defaultBranch); + // } // 获取组件里要显示的数据 - getTopCount=(branch)=>{ - const { projectsId , owner } = this.props.match.params; - const url = `/${owner}/${projectsId}/top_counts.json`; - axios.get(url,{params:{ - ref:branch - }}).then(result=>{ - if(result){ - this.setState({ - coderCount:result.data - }) - } - }).catch(error=>{console.log(error);}) - } + // getTopCount=(branch)=>{ + // const { projectsId , owner } = this.props.match.params; + // const url = `/${owner}/${projectsId}/top_counts.json`; + // axios.get(url,{params:{ + // ref:branch + // }}).then(result=>{ + // if(result){ + // this.setState({ + // coderCount:result.data + // }) + // } + // }).catch(error=>{console.log(error);}) + // } render(){ return(
@@ -100,12 +99,12 @@ class CoderRootIndex extends Component{ > () + (props) => () } > () + () => () } > () + () => () } > {/*