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
5aa8261b
authored
May 21, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】AI 对话,如果删除的是选中的对话,需要重新选中
parent
da75b175
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
src/views/ai/chat/Conversation.vue
+8
-0
No files found.
src/views/ai/chat/Conversation.vue
View file @
5aa8261b
...
@@ -169,6 +169,14 @@ const getChatConversationList = async () => {
...
@@ -169,6 +169,14 @@ const getChatConversationList = async () => {
// 3、默认选中
// 3、默认选中
if
(
!
activeId
?.
value
)
{
if
(
!
activeId
?.
value
)
{
await
handleConversationClick
(
res
[
0
].
id
)
await
handleConversationClick
(
res
[
0
].
id
)
}
else
{
// tip: 删除的刚好是选中的,那么需要重新挑选一个来进行选中
const
filterConversationList
=
conversationList
.
value
.
filter
(
item
=>
{
return
item
.
id
===
activeId
.
value
})
if
(
filterConversationList
.
length
<=
0
)
{
await
handleConversationClick
(
res
[
0
].
id
)
}
}
}
// 4、没有 任何对话情况
// 4、没有 任何对话情况
if
(
conversationList
.
value
.
length
===
0
)
{
if
(
conversationList
.
value
.
length
===
0
)
{
...
...
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