forked from Gitlink/forgeplus-react
Merge remote-tracking branch 'upstream/feature_reposyncer' into gitlink_ssr_head
This commit is contained in:
commit
3f55fcbf36
|
|
@ -16,9 +16,9 @@ function RecordList(props){
|
|||
const [loading, setLoading] = useState(false);
|
||||
const [data, setData] = useState({});
|
||||
// table
|
||||
const pageSize = 10;
|
||||
const [current, setCurrent] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [pageSize, setPageSize] = useState(10);
|
||||
const [expandedRowKeys, setExpandedRowKeys] = useState([]);
|
||||
|
||||
useEffect(()=>{
|
||||
|
|
@ -74,13 +74,6 @@ function RecordList(props){
|
|||
setExpandedRowKeys(Array.from(keys));
|
||||
}
|
||||
|
||||
// 改变pagesize
|
||||
function onShowSizeChange(current, pageSize){
|
||||
window.scrollTo(0, 0);
|
||||
setCurrent(1);
|
||||
setPageSize(pageSize);
|
||||
}
|
||||
|
||||
// 切换页数
|
||||
function changePage(page, pageSize){
|
||||
window.scrollTo(0, 0);
|
||||
|
|
@ -107,8 +100,7 @@ function RecordList(props){
|
|||
rowKey={'id'}
|
||||
expandedRowKeys={expandedRowKeys}
|
||||
onExpand={onExpand}
|
||||
pagination={false}
|
||||
// pagination={{current: current, pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}}
|
||||
pagination={{current: current, pageSize: pageSize, total: total, hideOnSinglePage: true, onChange: changePage}}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ function StoreList(props){
|
|||
</span> },
|
||||
{ title: 'GitLink分支', dataIndex: 'gitlink_branch_name', className:"recordColumns"},
|
||||
{ title: '最后一次同步时间', dataIndex: 'sync_time', className:"primaryColor recordColumns"},
|
||||
{ title: '同步状态', dataIndex: 'sync_status', className:"recordColumns", render: (text)=>sync_status(text)},
|
||||
{ title: '最后一次同步状态', dataIndex: 'sync_status', className:"recordColumns", render: (text)=>sync_status(text)},
|
||||
{ title: '操作', dataIndex: 'enable', align: 'center', className:"primaryColor recordColumns", render: (text, item)=>{
|
||||
const branch = item[platform === 'GitHub' ? 'github_branch': 'gitee_branch']
|
||||
return <div>
|
||||
|
|
@ -143,7 +143,7 @@ function StoreList(props){
|
|||
}else{
|
||||
setBranchRnable(item);
|
||||
}
|
||||
}}>{text ? "停止" : "开始"}</a>
|
||||
}}>{text ? "中止同步" : "启动同步"}</a>
|
||||
</div>
|
||||
}},
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue