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] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A0=87=E7=AD=BE=E5=8A=A0=E8=BD=BD=E4=BC=98?= =?UTF-8?q?=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