From bf71f697215823b9766aa064857cb2b0f76b3b86 Mon Sep 17 00:00:00 2001 From: DebugIsFalse <511418503@qq.com> Date: Fri, 17 May 2024 10:13:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0scrollTo=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/search/[id].vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pages/search/[id].vue b/pages/search/[id].vue index 8027d1b..cb4ceb2 100644 --- a/pages/search/[id].vue +++ b/pages/search/[id].vue @@ -242,6 +242,9 @@ const handleFormFetchData = (fetchData) => { if (Object.keys(message).length === 0) return; const { meta, choices } = message; const index = editIndex.value; + nextTick(() => { + scrollToView(); + }) if (meta.type === 'answer') { Object.assign(data.value[index], { ansLoading: true, @@ -261,9 +264,6 @@ const handleFormFetchData = (fetchData) => { let source = choices[0].message.content; storeSource = source.split('\n'); } - nextTick(() => { - scrollToView(); - }) } const handleUpdateSource = () => { const index = editIndex.value; @@ -274,7 +274,7 @@ const handleUpdateSource = () => { storeSource = storeSource.map((item) => { return { repo: state.repo, - link: `${baseUrl}/blob/${state.branch}/${item.label}`, + link: `${baseUrl}/blob/${state.branch}/${item}`, label: item } }) @@ -301,7 +301,6 @@ const handleStopGenerate = () => { asking.value = false; } const handleError = (event) => { - console.log(`error`, event) handleStopGenerate(); } const generateFetchData = (query) => { -- GitLab