From fad42414dcccad416b8fe76d3ee8ef42c95a8230 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Mon, 21 Jun 2021 17:52:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BF=A1=E6=81=AF=E7=9A=84=E6=98=BE=E7=A4=BA=E5=92=8C?= =?UTF-8?q?=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderDepot.jsx | 8 ++++++-- src/forge/Main/Index.scss | 28 ++++++++++++++++------------ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 7aaab83d8..d2b63d875 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -107,6 +107,7 @@ function CoderDepot(props){ setMainFlag(true); setReadOnly(true); setReadme(result.data.readme); + setHide(true); } setTimeout(function(){setIsSpin(false);},500); }).catch(error=>{setIsSpin(false);}) @@ -118,7 +119,7 @@ function CoderDepot(props){ let ele = document.getElementById("ptxt"); if(ele){ let h = ele.offsetHeight; - if( h > 18 ) setHideBtn(true) + if( h > 18 ) setHideBtn(true); } } },[projectDetail,lastCommit]) @@ -149,6 +150,7 @@ function CoderDepot(props){ setLastCommitAuthor(c && c.committer); setMainFlag(false); setReadOnly(true); + setHide(true); } setTimeout(function(){setIsSpin(false);},500) }).catch(error=>{setIsSpin(false);}) @@ -332,7 +334,9 @@ function CoderDepot(props){ lastCommit &&
-
{lastCommit && lastCommit.message}
+
+
{lastCommit && lastCommit.message}
+
{ hideBtn && changeHide(hide)}> } {lastCommit && lastCommit.time_from_now} diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index 368d6c2db..3e50ddfba 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -200,35 +200,39 @@ .listtablehead{ display: flex; justify-content: space-between; - align-items: center; + align-items: flex-start; border-bottom: 1px solid #d9d9d9; padding:7px 20px; border-radius: 4px 4px 0px 0px; background-color: #FAFBFC; .ellipsistxt{ + margin-top: 6px; #ptxt{ margin-bottom: 0px; + word-break: break-all; + overflow: unset; + white-space:pre-wrap; /* css3.0 */ + white-space:-moz-pre-wrap; /* Firefox */ + white-space:-pre-wrap; /* Opera 4-6 */ + white-space:-o-pre-wrap; /* Opera 7 */ + word-wrap:break-word; } margin-left: 13px; line-height:18px; flex:1; width: 0; color: #666; - &>p{ - word-break:break-all; - } - &.hide{ + &.hidetxt{ height: 18px; overflow: hidden; position: relative; padding-right:8px; - } - &.hide::after{ - position: absolute; - right: 0px; - bottom: 0px; - content:"..."; - + &::after{ + position: absolute; + right: 0px; + bottom: 0px; + content:"..."; + } } } .ellipsis{