perf: 调整交互
This commit is contained in:
@ -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="继续追问..."
|
||||
|
||||
Reference in New Issue
Block a user