完善论坛模块 评论css展示
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
export interface TrangleAgentApiForumV1ForumPostsViewRes {
|
||||
/** 发帖用户名称 */
|
||||
name?: string;
|
||||
/** 帖子ID */
|
||||
id?: number;
|
||||
/** 所属版块ID */
|
||||
|
||||
@@ -5,6 +5,8 @@ export interface TrangleAgentInternalModelForumPostViewParams {
|
||||
boardId?: number;
|
||||
/** 发帖用户ID */
|
||||
userId?: number;
|
||||
/** 发帖用户名称 */
|
||||
name?: string;
|
||||
/** 帖子标题 */
|
||||
title?: string;
|
||||
/** 帖子正文 */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="page-header">
|
||||
<div class="header-content">
|
||||
<div class="title-section">
|
||||
<h1 class="page-title">通讯频道 // FORUM</h1>
|
||||
<h1 class="page-title">冷冻酸奶茶水间</h1>
|
||||
<p class="page-subtitle">内部情报交换与讨论终端</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
@@ -22,10 +22,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 帖子列表 -->
|
||||
<div class="forum-content">
|
||||
<div class="post-list-container" v-loading="loading">
|
||||
<a-empty v-if="!loading && posts.length === 0" description="暂无情报记录" />
|
||||
|
||||
<!-- 帖子卡片 -->
|
||||
<div
|
||||
v-for="post in posts"
|
||||
:key="post.id"
|
||||
@@ -34,8 +35,11 @@
|
||||
>
|
||||
<div class="post-header">
|
||||
<div class="post-title">{{ post.title }}</div>
|
||||
<div class="post-author">
|
||||
<UserOutlined />
|
||||
<span class="author-name">{{ post.name || '匿名用户' }}</span>
|
||||
</div>
|
||||
<div class="post-meta">
|
||||
<span class="meta-item"><UserOutlined /> ID: {{ post.userId }}</span>
|
||||
<span class="meta-item"><ClockCircleOutlined /> {{ formatTime(post.createdAt) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -51,7 +55,7 @@
|
||||
<div class="status-tag" :class="post.status">{{ post.status || 'NORMAL' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 分页器 -->
|
||||
<div class="pagination-wrapper" v-if="total > 0">
|
||||
<a-pagination
|
||||
v-model:current="pagination.page"
|
||||
@@ -101,7 +105,6 @@
|
||||
<div v-if="currentPost" class="post-detail">
|
||||
<h2 class="detail-title">{{ currentPost.title }}</h2>
|
||||
<div class="detail-meta">
|
||||
<span>发布者ID: {{ currentPost.userId }}</span>
|
||||
<span>{{ formatTime(currentPost.createdAt) }}</span>
|
||||
</div>
|
||||
|
||||
@@ -115,7 +118,6 @@
|
||||
<a-empty v-if="comments.length === 0" description="暂无评论" />
|
||||
<div v-for="comment in comments" :key="comment.id" class="comment-item">
|
||||
<div class="comment-header">
|
||||
<span class="comment-user">ID: {{ comment.userId }}</span>
|
||||
<span class="comment-time">{{ formatTime(comment.createdAt) }}</span>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
@@ -419,8 +421,7 @@ onMounted(async () => {
|
||||
|
||||
.post-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
@@ -428,6 +429,35 @@ onMounted(async () => {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #e2e8f0;
|
||||
flex: 1;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.post-author {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
color: #94a3b8;
|
||||
font-size: 13px;
|
||||
margin-right: 16px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
padding: 4px 10px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.post-author:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.author-name {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
|
||||
Reference in New Issue
Block a user