diff --git a/pages/chat/chatPage.vue b/pages/chat/chatPage.vue index 2e61710..c24f41d 100644 --- a/pages/chat/chatPage.vue +++ b/pages/chat/chatPage.vue @@ -149,9 +149,7 @@ if (!text || text.trim() === '') return; // 判断是否是思考内容 - const isThinking = text.includes('') || - (this.messages[this.messages.length - 1]?.type === 'thinking'); - + const isThinking = text.includes('') ||(this.messages[this.messages.length - 1]?.type === 'thinking'); if (isThinking) { this.handleThinkingContent(text); } else { @@ -209,7 +207,7 @@ if (this.messages.length > 0) { const lastMsg = this.messages[this.messages.length - 1]; lastMsg.isComplete = true; - + lastMsg.isTyping=false // 如果最后一条是思考消息,我们不需要额外处理 if (lastMsg.type === 'thinking') { return; @@ -267,7 +265,7 @@ success: () => { console.log('消息发送成功'); // 添加机器人正在输入的提示 - this.addMessage('bot', '思考中...', true); + this.addMessage('bot', '思考中...','thinking',true); }, fail: (err) => { console.error('消息发送失败', err); @@ -374,6 +372,7 @@ .message-text { font-size: 14px; line-height: 1.4; + color: #333333; } .chat-input {