From 3bb81c707e6496596b6272546a3ebdc5762b7468 Mon Sep 17 00:00:00 2001 From: ChenZhaoYu <790348264@qq.com> Date: Thu, 23 Feb 2023 11:04:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=96=E6=B6=88=E5=9B=9E=E7=AD=94?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chat/index.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index eeaa92b..5a1212b 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -217,6 +217,13 @@ function handleEnter(event: KeyboardEvent) { } } +function handleStop() { + if (loading.value) { + controller.abort() + loading.value = false + } +} + const buttonDisabled = computed(() => { return loading.value || !prompt.value || prompt.value.trim() === '' }) @@ -267,6 +274,14 @@ onUnmounted(() => { :loading="item.loading" @regenerate="onRegenerate(index)" /> +