From bbad969d12960414900932441fa695d4b5f54826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Thu, 9 May 2024 13:59:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Server/reposyncer/component/storeList.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forge/Server/reposyncer/component/storeList.jsx b/src/forge/Server/reposyncer/component/storeList.jsx index 5e1a69e4c..13e101ee3 100644 --- a/src/forge/Server/reposyncer/component/storeList.jsx +++ b/src/forge/Server/reposyncer/component/storeList.jsx @@ -130,7 +130,7 @@ function StoreList(props){ }, { 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
@@ -143,7 +143,7 @@ function StoreList(props){ }else{ setBranchRnable(item); } - }}>{text ? "停止" : "开始"} + }}>{text ? "中止同步" : "启动同步"}
}}, ] From 500f062569cc8ff13ffcfcad71b94ef80e959cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Thu, 9 May 2024 13:59:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Server/reposyncer/component/recordList.jsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/forge/Server/reposyncer/component/recordList.jsx b/src/forge/Server/reposyncer/component/recordList.jsx index 1ea7ae78d..801ca93d2 100644 --- a/src/forge/Server/reposyncer/component/recordList.jsx +++ b/src/forge/Server/reposyncer/component/recordList.jsx @@ -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}} /> }