perf: 调整交互

This commit is contained in:
rd
2025-08-28 15:45:09 +08:00
parent 0c14a0caec
commit c49349257d
4 changed files with 35 additions and 23 deletions

View File

@ -30,6 +30,7 @@ export default {
const rightViewRef = ref(null);
const bubbleListRef = ref<any>(null);
const sseController = ref<any>(null);
const searchValue = ref<string>('');
const handleSubmit = (message: string) => {
if (generateLoading.value) {
@ -37,6 +38,8 @@ export default {
return;
}
searchValue.value = '';
conversationList.value.push({
role: QUESTION_ROLE,
content: message,
@ -50,7 +53,7 @@ export default {
sseController.value.abort?.();
sseController.value = null;
}
}
};
const handleCancel = () => {
if (generateLoading.value) {
@ -142,7 +145,7 @@ export default {
onUnmounted(() => {
clearSseController();
})
});
return () => (
<div class="chat-view-wrap w-full h-full flex">
@ -159,6 +162,7 @@ export default {
</div>
<div class="w-full flex flex-col justify-center items-center">
<SenderInput
v-model={searchValue.value}
ref={senderRef}
class="w-600px"
placeholder="继续追问..."