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
d8dcc911
authored
May 17, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】AI 对话增加置顶,和取消置顶
parent
1c8bdc7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/views/ai/chat/Conversation.vue
+14
-3
No files found.
src/views/ai/chat/Conversation.vue
View file @
d8dcc911
...
...
@@ -42,8 +42,9 @@
</div>
<!-- TODO @fan:缺一个【置顶】按钮,效果改成 hover 上去展示 -->
<div
class=
"button-wrapper"
>
<el-button
link
>
<el-icon
title=
"置顶"
><Top
/></el-icon>
<el-button
link
@
click=
"handlerTop(conversation)"
>
<el-icon
title=
"置顶"
v-if=
"!conversation.pinned"
><Top
/></el-icon>
<el-icon
title=
"置顶"
v-if=
"conversation.pinned"
><Bottom
/></el-icon>
</el-button>
<el-button
link
@
click=
"updateConversationTitle(conversation)"
>
<el-icon
title=
"编辑"
>
...
...
@@ -89,7 +90,7 @@
import
{
ChatConversationApi
,
ChatConversationVO
}
from
'@/api/ai/chat/conversation'
import
{
ref
}
from
"vue"
;
import
Role
from
"@/views/ai/chat/role/index.vue"
;
import
{
Top
}
from
"@element-plus/icons-vue"
;
import
{
Bottom
,
Top
}
from
"@element-plus/icons-vue"
;
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -259,6 +260,16 @@ const deleteChatConversation = async (conversation: ChatConversationVO) => {
}
}
/**
* 对话置顶
*/
const
handlerTop
=
async
(
conversation
:
ChatConversationVO
)
=>
{
// 更新对话置顶
conversation
.
pinned
=
!
conversation
.
pinned
await
ChatConversationApi
.
updateChatConversationMy
(
conversation
)
// 刷新对话
await
getChatConversationList
()
}
// ============ 角色仓库
...
...
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