From 70cbde0d11ade27a9910cddb926c286170422105 Mon Sep 17 00:00:00 2001 From: yangzhe Date: Fri, 28 Nov 2025 16:20:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(home):=20=E4=BF=AE=E5=A4=8D=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E5=AF=B9=E8=AF=9D=E6=97=B6=E7=9A=84=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E5=92=8C=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/index/index.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; }