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 && diff --git a/src/forge/Main/tag/Index.jsx b/src/forge/Main/tag/Index.jsx index 66e6f24cf..48f80ea29 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..5d72ab294 100644 --- a/src/forge/Main/tag/Index.scss +++ b/src/forge/Main/tag/Index.scss @@ -32,4 +32,11 @@ } } } +} +.tagSpin{ + min-height: 300px; + text-align: center; + display: flex; + align-items: center; + justify-content: center; } \ No newline at end of file