From 1ea7127311047540bafc0a8c2ba72ea77181d6ca Mon Sep 17 00:00:00 2001 From: DebugIsFalse <511418503@qq.com> Date: Thu, 23 May 2024 11:45:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20scroll=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/search/[id].vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pages/search/[id].vue b/pages/search/[id].vue index 1ec51bf..6dfafff 100644 --- a/pages/search/[id].vue +++ b/pages/search/[id].vue @@ -74,9 +74,8 @@ function handleUpdateQuery(query) { // 是否停止自动滚动到底部 const isAutoToBottom = ref(true) watch(() => { - // console.log(`directions.top:`, directions.top) if (directions.top) { - isAutoToBottom.value = true + isAutoToBottom.value = false } }) const scrollToView = () => { @@ -143,9 +142,9 @@ const handleFormFetchData = (fetchData) => { if (Object.keys(message).length === 0) return const { meta, choices } = message const index = editIndex.value - if (isAutoToBottom.value) { + nextTick(() => { scrollToView() - } + }) // 处理报错信息 if (!meta) { handleStopGenerate() -- GitLab