Skip to content

Commit 5502afc

Browse files
style: Assistant chat list
1 parent bb448bf commit 5502afc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

frontend/src/views/chat/index.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
</el-button>
3535
</template>
3636
<ChatListContainer
37+
ref="floatPopoverRef"
3738
v-model:chat-list="chatList"
3839
v-model:current-chat-id="currentChatId"
3940
v-model:current-chat="currentChat"
@@ -339,12 +340,13 @@ import icon_start_outlined from '@/assets/svg/icon_start_outlined.svg'
339340
import logo_fold from '@/assets/LOGO-fold.svg'
340341
import logo from '@/assets/LOGO.svg'
341342
import icon_send_filled from '@/assets/svg/icon_send_filled.svg'
342-
343343
import { useAssistantStore } from '@/stores/assistant'
344+
import { onClickOutside } from '@vueuse/core'
344345
345346
const props = defineProps<{
346347
startChatDsId?: number
347348
}>()
349+
const floatPopoverRef = ref()
348350
const floatPopoverVisible = ref(false)
349351
const assistantStore = useAssistantStore()
350352
const defaultFloatPopoverStyle = ref({
@@ -779,6 +781,11 @@ const assistantPrepareInit = () => {
779781
inset: '0px auto auto 0px',
780782
})
781783
goEmpty()
784+
onClickOutside(floatPopoverRef, () => {
785+
if (floatPopoverVisible.value) {
786+
floatPopoverVisible.value = false
787+
}
788+
})
782789
}
783790
defineExpose({
784791
createNewChat,

0 commit comments

Comments
 (0)