代码库二级页面标签加载优化
This commit is contained in:
parent
0a81bc6e6e
commit
112aacb6a1
|
@ -11,7 +11,7 @@ import moment from 'moment';
|
||||||
|
|
||||||
function Tags(props) {
|
function Tags(props) {
|
||||||
|
|
||||||
const [ source , setSource ] = useState(undefined);
|
const [ source , setSource ] = useState([]);
|
||||||
const [ isSpin , setIsSpin ] = useState(true);
|
const [ isSpin , setIsSpin ] = useState(true);
|
||||||
|
|
||||||
const { projectsId , owner } = props.match.params;
|
const { projectsId , owner } = props.match.params;
|
||||||
|
@ -104,19 +104,18 @@ function Tags(props) {
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<SubMenu tab={"tags"} projectsId={projectsId} owner={owner}/>
|
<SubMenu tab={"tags"} projectsId={projectsId} owner={owner}/>
|
||||||
|
{
|
||||||
|
source && source.length > 0 ?
|
||||||
<div className="tagSpin">
|
<div className="tagSpin">
|
||||||
<Spin spinning={isSpin}>
|
<Spin spinning={isSpin}>
|
||||||
{
|
|
||||||
source && source.length > 0 &&
|
|
||||||
<Table
|
<Table
|
||||||
className="tagTable"
|
className="tagTable"
|
||||||
dataSource={source} columns={columns} pagination={false}></Table>
|
dataSource={source} columns={columns} pagination={false}></Table>
|
||||||
}
|
|
||||||
{
|
|
||||||
source && source.length === 0 && <Nonedata _html={'暂无数据~'}/>
|
|
||||||
}
|
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
|
:
|
||||||
|
<Nonedata _html={'暂无数据~'}/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue