From edae4927cb533efe0d50e81abd684fd7f3c2c8d3 Mon Sep 17 00:00:00 2001 From: DebugIsFalse <511418503@qq.com> Date: Tue, 21 May 2024 11:09:32 +0800 Subject: [PATCH] Update [id].vue --- pages/search/[id].vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/search/[id].vue b/pages/search/[id].vue index 8af8423..3ef0fd2 100644 --- a/pages/search/[id].vue +++ b/pages/search/[id].vue @@ -177,10 +177,11 @@ const isAutoToBottom = ref(true) let markedWindowScrollTop = 0 const handleScroll = () => { // 在asking操作的时候生效 - if (!asking.value) return + if (!asking.value || !isAutoToBottom.value) return const offsetValue = 5; const top = window.scrollY; - if (top + offsetValue < markedWindowScrollTop) { + // console.log(`top + offsetValue:`, top, markedWindowScrollTop, top < markedWindowScrollTop) + if (top < markedWindowScrollTop) { isAutoToBottom.value = false } else { markedWindowScrollTop = top @@ -191,7 +192,6 @@ const scrollToView = () => { const $target = document.querySelector('#scrollElement') if (!$target) return; const height = $target.clientHeight - console.log(`height:`, height) y.value = height } const isEditTitle = ref(false) @@ -353,7 +353,7 @@ const fetchLinkedQuestion = (query) => { repo_path: gitPath, c_id: id, messages, - rephrase_question: true + // rephrase_question: true } }).then((res) => { if (res && res.data && res.data.items) { @@ -375,7 +375,7 @@ const generateFetchData = (query) => { c_id: id, stream: true, messages, - rephrase_question: true + // rephrase_question: true }, onmessage: handleMessage, onerror: handleError, -- GitLab