diff --git a/frontend/src/components/localchat/AiChatLeft.vue b/frontend/src/components/localchat/AiChatLeft.vue index c3f1fcd..f530b55 100644 --- a/frontend/src/components/localchat/AiChatLeft.vue +++ b/frontend/src/components/localchat/AiChatLeft.vue @@ -4,7 +4,21 @@ import { Search } from "@element-plus/icons-vue"; // import { t } from "@/i18n"; // import { notifyInfo,notifySuccess } from "@/util/msg.ts"; const chatStore = useAiChatStore(); - +const handleSearch = async () => { + if (chatStore.searchInput != "") { + const list = await chatStore.getChatList() + const res = list.filter((item: any) => { + if (item.title.includes(chatStore.searchInput)) { + return item; + } + }) + if(res.length > 0){ + chatStore.chatList = res + } + }else{ + await chatStore.getChatList() + } +};