From 87bce04d7cdf5ca427757071e7cc3b0847b64dfc Mon Sep 17 00:00:00 2001
From: gerson <1405270578@qq.com>
Date: 星期一, 01 七月 2024 11:37:25 +0800
Subject: [PATCH] question 传 id

---
 src/views/project/ch/home/component/waterRight/top.vue |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/views/project/ch/home/component/waterRight/top.vue b/src/views/project/ch/home/component/waterRight/top.vue
index 3d34ff4..1a911ce 100644
--- a/src/views/project/ch/home/component/waterRight/top.vue
+++ b/src/views/project/ch/home/component/waterRight/top.vue
@@ -31,13 +31,18 @@
 import { GetLLMList, SetLLM } from '/@/api/ai/chat';
 import PlayBar from '/@/components/chat/components/playBar/PlayBar.vue';
 import router from '/@/router';
-import { activeChatRoom, activeLLMId } from '/@/stores/chatRoom';
+import { activeChatRoom, activeLLMId, activeSectionAId } from '/@/stores/chatRoom';
 import emitter from '/@/utils/mitt';
+import { ElMessage } from 'element-plus';
 const emits = defineEmits(['sendClick']);
 const inputValue = ref('');
 
 const sendClick = () => {
 	if (!inputValue.value) return;
+	if (!activeSectionAId.value) {
+		ElMessage.warning('璇烽�夋嫨搴旂敤鍦烘櫙');
+		return;
+	}
 	activeChatRoom.value.title = inputValue.value;
 	router.push({
 		name: 'AskAnswer',
@@ -106,8 +111,8 @@
 onMounted(() => {
 	getLLMList();
 	emitter.on('updateChatInput', (value) => {
-			inputValue.value = value;
-		});
+		inputValue.value = value;
+	});
 });
 </script>
 <style scoped lang="scss">

--
Gitblit v1.9.3