fix: 修复消息页面有时候消息过长的问题

This commit is contained in:
tim
2025-08-03 16:45:38 +08:00
parent ff09df03e3
commit 67910317e8

View File

@@ -118,15 +118,18 @@
<template v-else-if="item.type === 'USER_ACTIVITY' && item.parentComment">
<NotificationContainer :item="item" :markRead="markRead">
你关注的
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/users/${item.comment.author.id}`">
<router-link class="notif-content-text" @click="markRead(item.id)"
:to="`/users/${item.comment.author.id}`">
{{ item.comment.author.username }}
</router-link>
对评论
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/posts/${item.post.id}#comment-${item.parentComment.id}`">
<router-link class="notif-content-text" @click="markRead(item.id)"
:to="`/posts/${item.post.id}#comment-${item.parentComment.id}`">
{{ stripMarkdownLength(item.parentComment.content, 100) }}
</router-link>
回复了
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/posts/${item.post.id}#comment-${item.comment.id}`">
<router-link class="notif-content-text" @click="markRead(item.id)"
:to="`/posts/${item.post.id}#comment-${item.comment.id}`">
{{ stripMarkdownLength(item.comment.content, 100) }}
</router-link>
</NotificationContainer>
@@ -134,15 +137,17 @@
<template v-else-if="item.type === 'USER_ACTIVITY'">
<NotificationContainer :item="item" :markRead="markRead">
你关注的
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/users/${item.comment.author.id}`">
<router-link class="notif-content-text" @click="markRead(item.id)"
:to="`/users/${item.comment.author.id}`">
{{ item.comment.author.username }}
</router-link>
在文章
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/posts/${item.post.id}`">
{{ stripMarkdownLength(item.post.title, 100) }}
{{ stripMarkdownLength(item.post.title, 100) }}
</router-link>
下面评论了
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/posts/${item.post.id}#comment-${item.comment.id}`">
<router-link class="notif-content-text" @click="markRead(item.id)"
:to="`/posts/${item.post.id}#comment-${item.comment.id}`">
{{ stripMarkdownLength(item.comment.content, 100) }}
</router-link>
</NotificationContainer>
@@ -153,7 +158,8 @@
{{ item.fromUser.username }}
</router-link>
在评论中提到了你
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/posts/${item.post.id}#comment-${item.comment.id}`">
<router-link class="notif-content-text" @click="markRead(item.id)"
:to="`/posts/${item.post.id}#comment-${item.comment.id}`">
{{ stripMarkdownLength(item.comment.content, 100) }}
</router-link>
</NotificationContainer>
@@ -707,6 +713,7 @@ export default {
font-weight: bold;
color: var(--primary-color) !important;
text-decoration: none !important;
word-break: break-all;
}
.optional-buttons {
@@ -767,5 +774,9 @@ export default {
.has_read_button {
display: none;
}
.message-page {
overflow-x: hidden;
}
}
</style>