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
15e7a260
authored
May 21, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【解决todo】Ai Chat 增加回到顶部
parent
e3bc50e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
src/views/ai/chat/index.vue
+16
-2
No files found.
src/views/ai/chat/index.vue
View file @
15e7a260
...
...
@@ -25,7 +25,7 @@
<el-button>
<Icon
icon=
"ep:download"
/>
</el-button>
<el-button>
<el-button
@
click=
"handlerGoTop"
>
<Icon
icon=
"ep:arrow-up"
/>
</el-button>
</div>
...
...
@@ -36,7 +36,10 @@
<div
>
<div
class=
"message-container"
>
<MessageLoading
v-if=
"listLoading"
/>
<Message
v-if=
"!listLoading && list.length > 0"
ref=
"messageRef"
:list=
"list"
@
on-delete-success=
"handlerMessageDelete"
/>
<Message
v-if=
"!listLoading && list.length > 0"
ref=
"messageRef"
:list=
"list"
@
on-delete-success=
"handlerMessageDelete"
/>
<ChatEmpty
v-if=
"!listLoading && list.length === 0"
@
on-prompt=
"doSend"
/>
</div>
</div>
...
...
@@ -444,11 +447,22 @@ const getConversation = async (id: string | null) => {
// ============ message ===========
/**
* 删除 message
*/
const
handlerMessageDelete
=
async
()
=>
{
// 刷新 message
await
getMessageList
()
}
/**
* 回到顶部
*/
const
handlerGoTop
=
async
()
=>
{
await
messageRef
.
value
.
handlerGoTop
()
}
/** 初始化 **/
onMounted
(
async
()
=>
{
// 设置当前对话 TODO 角色仓库过来的,自带 conversationId 需要选中
...
...
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