From 1622a4d80dd86d0fde35af6908937f9be670fee3 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 17 十二月 2024 10:13:00 +0800
Subject: [PATCH] 停止生成

---
 src/components/chat/components/playBar/PlayBar.vue |   24 ++++++++++++++++++++----
 src/theme/app.scss                                 |   10 ++++++++++
 2 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/src/components/chat/components/playBar/PlayBar.vue b/src/components/chat/components/playBar/PlayBar.vue
index 77c605e..673813b 100644
--- a/src/components/chat/components/playBar/PlayBar.vue
+++ b/src/components/chat/components/playBar/PlayBar.vue
@@ -104,9 +104,12 @@
 						v-if="inputValue"
 					>
 					</el-button>
-					<el-button class="cursor-pointer" link >
-						<el-tooltip v-if="isTalking" placement="top" content="鍋滄鐢熸垚">
-							<div class="size-[36px] rounded-full flex-center border-2 border-solid border-black text-black" @click="emits('stopGenClick')">
+					<el-button class="cursor-pointer" link>
+						<el-tooltip placement="top" content="鍋滄鐢熸垚" v-if="isTalking">
+							<div
+								class="size-[28px] stop-breathe rounded-full flex-center border-2 border-solid border-black text-black"
+								@click="emits('stopGenClick')"
+							>
 								<span class="ywifont ywicon-jieshu"></span>
 							</div>
 						</el-tooltip>
@@ -149,7 +152,7 @@
 import VoicePage from './voicePage/VoicePage.vue';
 import { getMetricsNames, querySimilarityHistory } from '/@/api/ai/chat';
 import { activeGroupType, groupTypeList, groupTypeMapIcon } from '/@/stores/chatRoom';
-const emits = defineEmits(['sendClick', 'showUpChatClick', 'showDownChatClick','stopGenClick']);
+const emits = defineEmits(['sendClick', 'showUpChatClick', 'showDownChatClick', 'stopGenClick']);
 const props = defineProps({
 	isTalking: Boolean,
 	isHome: Boolean,
@@ -634,4 +637,17 @@
 		}
 	}
 }
+
+.stop-breathe {
+	@keyframes breathe {
+		0%,
+		100% {
+			transform: scale(1);
+		}
+		50% {
+			transform: scale(1.35);
+		}
+	}
+	animation: breathe 3s infinite ease-in-out;
+}
 </style>
diff --git a/src/theme/app.scss b/src/theme/app.scss
index 40b0b2b..3840c9a 100644
--- a/src/theme/app.scss
+++ b/src/theme/app.scss
@@ -397,3 +397,13 @@
 		padding-left: #{$i}px !important;
 	}
 }
+
+
+.pos-x-center {
+	left: 50%;
+	transform: translateX(-50%);
+}
+.pos-y-center {
+	top: 50%;
+	transform: translateY(-50%);
+}
\ No newline at end of file

--
Gitblit v1.9.3