style
This commit is contained in:
parent
20c0f76043
commit
11053da351
|
@ -189,13 +189,13 @@
|
|||
flex-wrap: wrap;
|
||||
padding-bottom: 2px;
|
||||
a{
|
||||
margin: 0px 17px 0px 0px;
|
||||
margin: 0px 17px 10px 0px;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
&:nth-child(6){
|
||||
&:nth-child(5){
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,20 +6,29 @@ import { Link } from 'react-router-dom';
|
|||
import { truncateCommitId } from '../../common/util';
|
||||
import './Index.scss';
|
||||
import Tree from '../img/tree.png'
|
||||
import Pagination from 'rc-pagination';
|
||||
|
||||
const limit = 15;
|
||||
|
||||
function Tags(props) {
|
||||
|
||||
const [ source , setSource ] = useState([]);
|
||||
const [ source , setSource ] = useState([]);
|
||||
const [ total ,setTotal ] = useState(0);
|
||||
const [ page , setPage ] = useState(1);
|
||||
|
||||
const { projectsId , owner } = props.match.params;
|
||||
|
||||
useEffect(() => {
|
||||
if (projectsId) {
|
||||
const url = `/${owner}/${projectsId}/tags.json`;
|
||||
axios.get(url).then((result) => {
|
||||
axios.get(url,{
|
||||
// params:{
|
||||
// limit
|
||||
// }
|
||||
}).then((result) => {
|
||||
if (result) {
|
||||
setSource(result.data);
|
||||
setTotal(result.data.total_count);
|
||||
}
|
||||
}).catch(error => {})
|
||||
}
|
||||
|
@ -97,6 +106,10 @@ function Tags(props) {
|
|||
<div>
|
||||
<SubMenu tab={"tags"} projectsId={projectsId} owner={owner}/>
|
||||
<Table className="tagTable" dataSource={source} columns={columns} pagination={false}></Table>
|
||||
{
|
||||
total > limit &&
|
||||
<Pagination current={page} pageSize={limit} onChange={(p)=>setPage(p)}/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue