diff --git a/pages/home/index/index.vue b/pages/home/index/index.vue index 178005b..cf38f46 100644 --- a/pages/home/index/index.vue +++ b/pages/home/index/index.vue @@ -492,7 +492,8 @@ export default { scrollToBottom() { // 如果正在加载更多,不执行滚动 - if (this.isLoadingMore) return; + // 新建对话时不执行滚动 + if (this.isLoadingMore || !this.currentConversationId) return; // 使用nextTick确保DOM已更新 this.$nextTick(() => { @@ -791,8 +792,8 @@ export default { onScrollToUpper() { console.log("触发上拉刷新"); - // 如果已经没有更多数据或正在切换对话,不再触发上拉刷新 - if (this.noMoreData || this.isSwitchingConversation) { + // 如果已经没有更多数据或正在切换对话或当前对话为空(新建对话),不再触发上拉刷新 + if (this.noMoreData || this.isSwitchingConversation || !this.currentConversationId) { return; }