From 1e4bb463a347d7bd0978dcf505ad26f033c90a17 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 11 Sep 2024 08:39:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E5=A4=9A=E6=AC=A1=E8=BD=AC=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Merge/CreateMerge.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forge/Merge/CreateMerge.js b/src/forge/Merge/CreateMerge.js index aadebd24..9f83a55f 100644 --- a/src/forge/Merge/CreateMerge.js +++ b/src/forge/Merge/CreateMerge.js @@ -275,8 +275,8 @@ class CreateMerge extends Component { let _url = `/${mergeOwner}/${projectId}/compare/`; // type为pull时,pullBranch取value,否则取原有值 // type为pull时,mergeBranch取原有值,否则取value - let _pullBranch = type === 'pull' ? value : pullBranch; - let _mergeBranch = type === 'pull' ? mergeBranch : value; + let _pullBranch = type === 'pull' ? value : returnbar(pullBranch); + let _mergeBranch = type === 'pull' ? returnbar(mergeBranch) : value; if (pullOwner === mergeOwner) { // 如果仓库相同, compare/目标分支...源分支 _url += `${turnbar(_mergeBranch)}...${turnbar(_pullBranch)}`; From c3ab059ccb2366a591dab62680e6cc828af93c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Thu, 12 Sep 2024 09:39:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C=E4=BB=A5=E5=8F=8A=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=90=9C=E7=B4=A2=E5=86=85=E5=AE=B9=E5=88=B0=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/search/ItemList.jsx | 3 ++- src/modules/search/index.jsx | 9 ++++----- src/modules/search/index.scss | 12 +++++++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/modules/search/ItemList.jsx b/src/modules/search/ItemList.jsx index 58415fcd..80716f6d 100644 --- a/src/modules/search/ItemList.jsx +++ b/src/modules/search/ItemList.jsx @@ -2,6 +2,7 @@ import React from 'react'; import './index.scss'; import dianzan from './image/dianzan.png'; import fork from './image/fork.png'; +import RenderHtml from '../../components/render-html'; export default (props) => { const { list } = props; @@ -25,7 +26,7 @@ export default (props) => {

} -

+ {item.content && }
{item.updateTime}
) diff --git a/src/modules/search/index.jsx b/src/modules/search/index.jsx index d6b23ca7..dbe224d3 100644 --- a/src/modules/search/index.jsx +++ b/src/modules/search/index.jsx @@ -64,6 +64,7 @@ const GlobalSearch = ({ location, showNotification, history, mygetHelmetapi }) = setTerm(val); setPage(1); setForcesearch(!forcesearch); + history.push(`/search?value=${val}`); } function searchDataList() { @@ -178,8 +179,6 @@ const GlobalSearch = ({ location, showNotification, history, mygetHelmetapi }) = size="large" onSearch={searchFun} className={{ 'global-search': true, "required-search": !searchValue }} - value={searchValue} - onChange={(e) => { setSearchValue(e.target.value) }} ref={(el) => setRef(el)} /> {!searchValue && 请输入搜索关键字} @@ -208,7 +207,7 @@ const GlobalSearch = ({ location, showNotification, history, mygetHelmetapi }) = 创建时间{iconSwitch(orderBy === "createTimeDesc" ? "desc" : orderBy === "createTimeAsc" ? "asc" :"")} -

{`找到${totalType1}条结果`}

+

{`找到${totalType1}条结果`}

@@ -228,7 +227,7 @@ const GlobalSearch = ({ location, showNotification, history, mygetHelmetapi }) =
-

{`找到${totalType2}条结果`}

+

{`找到${totalType2}条结果`}

@@ -285,7 +284,7 @@ const GlobalSearch = ({ location, showNotification, history, mygetHelmetapi }) =
-

{`找到${totalType5}条结果`}

+

{`找到${totalType5}条结果`}

diff --git a/src/modules/search/index.scss b/src/modules/search/index.scss index 0671b9ee..955b37e5 100644 --- a/src/modules/search/index.scss +++ b/src/modules/search/index.scss @@ -48,7 +48,7 @@ .search-content { width: 1200px; margin: 1.5vw auto; - p{ + .search-item-title{ margin-bottom: .75em !important; } } @@ -85,12 +85,18 @@ &:hover{ color: #466aff; } - span{ + .highlightByGitlinkSearch{ color: #466aff; } } .search-item-content{ - span{ + -webkit-line-clamp: 5; + color: rgba(0, 0, 0, 0.65); + font-size: 14px; + a{ + color: rgba(0, 0, 0, 0.65); + } + .highlightByGitlinkSearch{ color: #466aff; } }