From b1d005642940d1375d6d4415379bb8614d4d7a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=88=9C=E5=B2=B3?= <1277952981@qq.com> Date: Wed, 22 Mar 2023 17:54:29 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=87=8D=E7=BD=AE=E5=9B=9E=E7=AD=94?= =?UTF-8?q?=E6=97=B6=E6=BB=9A=E5=8A=A8=E5=AE=9A=E4=BD=8D=E8=87=B3=E8=AF=A5?= =?UTF-8?q?=E5=9B=9E=E7=AD=94=20(#781)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 重置回答时滚动定位至该回答 * perf: format code --------- Co-authored-by: ChenZhaoYu <790348264@qq.com> --- src/views/chat/components/Message/index.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/chat/components/Message/index.vue b/src/views/chat/components/Message/index.vue index d625a8a..239ec25 100644 --- a/src/views/chat/components/Message/index.vue +++ b/src/views/chat/components/Message/index.vue @@ -31,6 +31,8 @@ const textRef = ref() const asRawText = ref(props.inversion) +const messageRef = ref() + const options = computed(() => { const common = [ { @@ -70,12 +72,17 @@ function handleSelect(key: 'copyText' | 'delete' | 'toggleRenderType') { } function handleRegenerate() { + messageRef.value?.scrollIntoView() emit('regenerate') }