From 08b5f7edc0e2701664b8deb5b71f24e623884f35 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 11 Oct 2021 17:24:28 +0800 Subject: [PATCH 1/5] =?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 dcb597ea3761be5d0f58e7723c991835cf2579a5 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 11 Oct 2021 17:53:30 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E6=A0=87=E7=AD=BE=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 18 ++++++++++++++---- src/forge/Main/tag/Index.scss | 6 ++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 66e6f24cf..023adb449 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -1,17 +1,17 @@ import React,{ useEffect , useState } from 'react'; import SubMenu from '../sub/SubMenu'; -import { Table , Tooltip } from 'antd'; +import { Table , Tooltip , Spin } from 'antd'; import axios from 'axios'; import { Link } from 'react-router-dom'; import { truncateCommitId } from '../../common/util'; import './Index.scss'; import Tree from '../img/tree.png' import moment from 'moment'; -import Loading from '../../../Loading'; function Tags(props) { const [ source , setSource ] = useState([]); + const [ isSpin , setIsSpin ] = useState(true); const { projectsId , owner } = props.match.params; @@ -21,6 +21,7 @@ function Tags(props) { axios.get(url).then((result) => { if (result) { setSource(result.data); + setIsSpin(false); } }).catch(error => {}) } @@ -83,7 +84,6 @@ function Tags(props) { render:(txt,item)=>{ return (
- TAR @@ -98,7 +98,17 @@ function Tags(props) { return(
-
+ { + source && source.length > 0 ? + +
+ : +
+ +
+ }
) } diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index 5ce43cf24..b012cc588 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -32,4 +32,10 @@ } } } +} +.tagSpin{ + text-align: center; + display: flex; + align-items: center; + justify-content: center; } \ No newline at end of file From 825cee4eac7c9d0b31bb790db78707fe9ea27ba8 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 11 Oct 2021 18:07:48 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2md=E6=96=87=E4=BB=B6=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tag/Index.jsx | 2 +- src/forge/Main/tag/Index.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 023adb449..48f80ea29 100644 --- a/src/forge/Main/tag/Index.jsx +++ b/src/forge/Main/tag/Index.jsx @@ -105,7 +105,7 @@ function Tags(props) { className="tagTable" dataSource={source} columns={columns} pagination={false}> : -
+
} diff --git a/src/forge/Main/tag/Index.scss b/src/forge/Main/tag/Index.scss index b012cc588..5d72ab294 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -34,6 +34,7 @@ } } .tagSpin{ + min-height: 300px; text-align: center; display: flex; align-items: center; From 8e1fb80f96b5259166972ac689150e94df6dd287 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Mon, 11 Oct 2021 18:07:55 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2md=E6=96=87=E4=BB=B6=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderRootFileDetail.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index c6c976f47..bdcfc98a7 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -27,6 +27,7 @@ class CoderRootFileDetail extends Component { } componentDidMount = () => { + window.scrollTo(0, 0); const { detail , mdFlag } = this.props; this.setState({ value: detail.content, @@ -214,7 +215,7 @@ class CoderRootFileDetail extends Component { const Option = Select.Option; return ( - +
{ md && readOnly && From b0d13792816b193f8060499acc2791480bcae154 Mon Sep 17 00:00:00 2001 From: caishi Date: Mon, 11 Oct 2021 18:35:50 +0800 Subject: [PATCH 5/5] =?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) => () } > () + () => () } > () + () => () } > {/*