【解决todo】Chat 对话默认选中第一个

pull/453/head
cherishsince 2024-05-24 10:39:12 +08:00
parent bebf1e7ae3
commit 8fb54dbb7c
1 changed files with 7 additions and 2 deletions

View File

@ -378,12 +378,17 @@ watch(activeId, async (newValue, oldValue) => {
defineExpose({createConversation})
onMounted(async () => {
//
await getChatConversationList()
//
if (props.activeId != null) {
activeConversationId.value = props.activeId
} else {
//
if (conversationList.value.length) {
activeConversationId.value = conversationList.value[0].id
}
}
//
await getChatConversationList()
})
</script>