feat: 输入框清空的问题

This commit is contained in:
zoujing 2025-08-06 14:16:31 +08:00
parent fe0a36e446
commit af9c3c7c28
2 changed files with 2 additions and 6 deletions

View File

@ -78,8 +78,6 @@ const sendMessage = () => {
//
if (!inputMessage.value.trim()) return;
emit('send', inputMessage.value)
inputMessage.value = ''
emit('update:inputMessage', inputMessage.value)
//
if (props.holdKeyboard && textareaRef.value) {

View File

@ -235,9 +235,6 @@
if (!inputText.trim()) return;
handleNoHideKeyboard()
sendMessage(inputText)
if(!isSessionActive.value) {
inputMessage.value = ''
}
//
if (holdKeyboard.value && inputAreaRef.value) {
setTimeout(() => {
@ -343,6 +340,7 @@
}
}
chatMsgList.value.push(newMsg)
inputMessage.value = '';
sendChat(message, isInstruct)
console.log("发送的新消息:",JSON.stringify(newMsg))
}
@ -466,7 +464,7 @@
console.log('请求完成');
}).catch(err => {
isSessionActive.value = false; //
console.log('error:', err)
console.log('error:', err);
});
//