diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index 1896f4846..6b9062c06 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -447,7 +447,6 @@ class NewHeader extends Component { content={} visible={visible} onVisibleChange={this.handleVisibleChange} - visible = 'true' > diff --git a/src/forge/Head/NoticeContent.jsx b/src/forge/Head/NoticeContent.jsx index f4aab1093..0ff7f785f 100644 --- a/src/forge/Head/NoticeContent.jsx +++ b/src/forge/Head/NoticeContent.jsx @@ -163,18 +163,15 @@ function NoticeContent({ visible, showNotification, resetUserInfo, current_user: > { noticeUnreadList.map(item => { - console.log(item.content); - console.log(item.content.length); - let contentStr = item.content.endsWith("") && item.content.length >= 50 && item.content.replace("", "").substr(0, 40) + "..."; return (
{ readItem(item) }}> -
30 && item.content.length <= 34 ? '65px' : "" }}> +
- = 48 ? item.content.substr(0, 48) + "..." : item.content }}> + {item.time_ago}
@@ -196,12 +193,12 @@ function NoticeContent({ visible, showNotification, resetUserInfo, current_user: {atUnreadList.map(item => { return (
{ readItem(item) }}> -
30 && item.content.length <= 42 ? '65px' : "" }}> +
- = 50 ? item.content.substr(0, 50) + "...@我" : item.content }}> + {item.time_ago}
diff --git a/src/forge/Head/header.scss b/src/forge/Head/header.scss index 66a045b23..5c332b43a 100644 --- a/src/forge/Head/header.scss +++ b/src/forge/Head/header.scss @@ -228,12 +228,20 @@ color:#333333; & .content-span{ - width: 255px; - max-height: 42px; word-break: break-all; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; /* 这里是超出几行省略 */ overflow: hidden; - // white-space: nowrap; - // text-overflow: ellipsis; + } + + & .atme-cont-span{ + width: 275px; + } + + & .notice-cont-span{ + width: 255px; } .timeSpan{