Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8fb54dbb
authored
May 24, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【解决todo】Chat 对话默认选中第一个
parent
bebf1e7a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/views/ai/chat/Conversation.vue
+7
-2
No files found.
src/views/ai/chat/Conversation.vue
View file @
8fb54dbb
...
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment