From 82d700cdf8028cf8e1cf26c0e19d29fe21093a94 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 16 Mar 2024 13:58:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=88=86=E6=94=AF=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tree/Index.jsx | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx index 0faf9fd36..8b6a1b473 100644 --- a/src/forge/Main/tree/Index.jsx +++ b/src/forge/Main/tree/Index.jsx @@ -3,7 +3,7 @@ import CopyTool from '../../Component/CopyTool'; import { truncateCommitId } from '../../common/util'; import { Link } from 'react-router-dom'; import { getImageUrl , turnbar } from 'educoder'; -import { Button, Dropdown , Input, Menu , message, Modal, Select, Spin, Table, Tooltip , Radio } from 'antd'; +import { Button, Dropdown , Input, Menu , message, Modal, Select, Spin, Table, Tooltip , Radio , Popover } from 'antd'; import Modals from '../../Component/PublicModal/Index'; import './Index.scss'; @@ -34,7 +34,7 @@ function Index(props) { const { projectsId , owner } = props.match.params; const { isManager , isDeveloper , projectDetail , defaultBranch, getDetail } = props; useEffect(()=>{ - getList(chooseStatus); + getList(); },[name, reload, pageSize, current,chooseStatus]) useEffect(()=>{ @@ -131,9 +131,13 @@ function Index(props) { width: "300px", className: "branchActionColumn", render: (txt, item,key) => { - console.log("-----:",item.is_deleted); return ( - item.is_deleted ?
: + item.is_deleted ? +
+ 将基于 Commits{truncateCommitId(item.commit_id)}创建分支}> + + +
:
{ (isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) && @@ -166,7 +170,7 @@ function Index(props) { }) } - function getList(state) { + function getList() { const url = `/v1/${owner}/${projectsId}/branches.json`; Axios.get(url,{ params:{ @@ -303,7 +307,13 @@ function Index(props) { className='branchListTable' dataSource={list} columns={columns} - pagination={{current: current, pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}} + pagination={{current: current, + pageSize: pageSize, + total: total, + showSizeChanger: true, + onShowSizeChange:onShowSizeChange, + showQuickJumper: true, onChange: changePage,hideOnSinglePage:true + }} > {/* { @@ -386,7 +396,7 @@ function Index(props) { >
-

确定删除{visible.name}分支?

+

删除分支,本操作将会关闭已开启的Pull Request