修改显示逻辑处理

master
于肖磊 2026-02-13 10:42:21 +08:00
parent eec8e82f31
commit 220af55f4b
1 changed files with 8 additions and 4 deletions

View File

@ -94,7 +94,7 @@
<view class="close-btn" @tap="close_comment_modal"></view>
</view>
<!-- 评论内容区域 -->
<scroll-view class="comment-list" scroll-y show-scrollbar="false" @scrolltolower="handle_comment_to_lower_scroll" @scroll="handle_comment_scroll">
<scroll-view class="comment-list" scroll-y :scroll-top="comment_scroll_top" show-scrollbar="false" scroll-with-animation @scrolltolower="handle_comment_to_lower_scroll" @scroll="handle_comment_scroll">
<view class="comment-scroll">
<template v-if="active_comments.length > 0">
<view class="comment-item flex-col" v-for="(comment_item, index) in active_comments" :key="index">
@ -283,6 +283,7 @@
current_main_index: 0, //
current_sub_index: 0, //
report_comment_id: '', // id
comment_scroll_top: 0,
};
},
computed: {
@ -1016,6 +1017,10 @@
item.comments_count++;
}
})
this.setData({
video_data_list: this.video_data_list,
comment_scroll_top: 0 + Math.random() //
})
} else {
this.active_comments.forEach(item => {
if (item.id == new_video_comments_id) {
@ -1027,7 +1032,6 @@
// ,
this.setData({
active_comments: this.active_comments,
video_data_list: this.video_data_list,
form_images_list: [],
comment_input_value: '',
comments_data: {},
@ -1391,8 +1395,8 @@
comment.sub_comments = filteredSubComments;
filteredComments.push(comment);
}
//
comment.comments_count = filteredSubComments.length;
//
} else {
//
filteredComments.push(comment);
@ -1404,7 +1408,7 @@
item.comments_count = filteredComments.length;
}
})
// active_comments
//
this.setData({
active_comments: filteredComments,
video_data_list: this.video_data_list