From 7acc2fcb1b50437b7df5c1bcf59e654ca836d7f6 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Fri, 17 May 2024 22:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91AI=20?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E5=A2=9E=E5=8A=A0=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/chat/Conversation.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/ai/chat/Conversation.vue b/src/views/ai/chat/Conversation.vue index 3ea2539e..8a790385 100644 --- a/src/views/ai/chat/Conversation.vue +++ b/src/views/ai/chat/Conversation.vue @@ -106,17 +106,16 @@ const emits = defineEmits(['onConversationClick', 'onConversationClear', 'onConv /** * 对话 - 搜索 */ -const searchConversation = (e) => { +const searchConversation = async (e) => { // 恢复数据 if (!searchName.value.trim().length) { - conversationMap.value = conversationTimeGroup(conversationList.value) + conversationMap.value = await conversationTimeGroup(conversationList.value) } else { // 过滤 const filterValues = conversationList.value.filter(item => { - console.log('ss', item.title.indexOf(searchName.value)) - return item.title.indexOf(searchName.value) !== -1 + return item.title.includes(searchName.value.trim()) }) - conversationMap.value = conversationTimeGroup(filterValues) + conversationMap.value = await conversationTimeGroup(filterValues) } } @@ -196,6 +195,7 @@ const conversationTimeGroup = async (list: ChatConversationVO[]) => { groupMap['三十天前'].push(conversation) } } + console.log('----groupMap', groupMap) return groupMap }