修改评论区显示处理

master
于肖磊 2025-09-19 18:30:14 +08:00
parent 48170b2892
commit 737fe51838
1 changed files with 28 additions and 25 deletions

View File

@ -50,17 +50,17 @@
<!-- 评论内容区域 -->
<scroll-view class="comment-list" scroll-y show-scrollbar="false" @scroll="handle_comment_scroll">
<view class="comment-scroll">
<view class="comment-item flex-row align-s gap-10" v-for="(comment_item, index) in active_comments" :key="index">
<commentInfoComponent :propsComment="comment_item" :propsId="comment_item.id" @comment_reply="comment_reply" @comment_like="comment_like">
<view class="comment-item flex-col" v-for="(comment_item, index) in active_comments" :key="index">
<commentInfoComponent class="wh-auto ht-auto" :propsComment="comment_item" :propsId="comment_item.id" @comment_reply="comment_reply" @comment_like="comment_like"></commentInfoComponent>
<!-- 子评论 -->
<view class="sub-comment flex-col jc-c" slot="sub-comment">
<view class="sub-comment flex-col jc-c">
<view v-if="!comment_item.show_sub_comment">
<commentMoreComponent :propsId="comment_item.id" :propsText="'—— 展开' + (comment_item.subComments ? comment_item.subComments.length || 0 : 0) + '条回复'" @comment_more_event="open_sub_comment"></commentMoreComponent>
</view>
<template v-else>
<view v-if="comment_item.subComments && comment_item.subComments.length > 0" class="sub-comment-list flex-col jc-c">
<view class="sub-comment-item flex-row align-s gap-10" v-for="(sub_comment_item, sub_comment_index) in comment_item.subComments" :key="sub_comment_index">
<commentInfoComponent :propsComment="sub_comment_item" :propsId="sub_comment_item.id" @comment_reply="sub_comment_reply" @comment_like="sub_comment_like"></commentInfoComponent>
<commentInfoComponent class="wh-auto ht-auto" :propsComment="sub_comment_item" :propsId="sub_comment_item.id" @comment_reply="sub_comment_reply" @comment_like="sub_comment_like"></commentInfoComponent>
</view>
</view>
<template v-if="comment_item.show_sub_comment_loading">
@ -74,7 +74,6 @@
</view>
</template>
</view>
</commentInfoComponent>
</view>
</view>
</scroll-view>
@ -631,6 +630,7 @@
.sub-comment {
margin-top: 22rpx;
margin-left: 100rpx;
}
.sub-comment-list {
@ -645,13 +645,16 @@
.comment-input {
flex: 1;
font-size: 28rpx;
height: 50rpx;
padding: 16rpx;
box-sizing: content-box;
}
.comment-input-content {
flex: 1;
border: 2rpx solid #eee;
border-radius: 8rpx;
padding: 16rpx;
padding-right: 16rpx;
font-size: 28rpx;
}
</style>