【解决todo】Ai Chat 增加回到顶部
This commit is contained in:
parent
e3bc50e4fc
commit
15e7a260bf
@ -25,7 +25,7 @@
|
|||||||
<el-button>
|
<el-button>
|
||||||
<Icon icon="ep:download"/>
|
<Icon icon="ep:download"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button>
|
<el-button @click="handlerGoTop">
|
||||||
<Icon icon="ep:arrow-up"/>
|
<Icon icon="ep:arrow-up"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -36,7 +36,10 @@
|
|||||||
<div >
|
<div >
|
||||||
<div class="message-container" >
|
<div class="message-container" >
|
||||||
<MessageLoading v-if="listLoading" />
|
<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"/>
|
<ChatEmpty v-if="!listLoading && list.length === 0" @on-prompt="doSend"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -444,11 +447,22 @@ const getConversation = async (id: string | null) => {
|
|||||||
|
|
||||||
// ============ message ===========
|
// ============ message ===========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除 message
|
||||||
|
*/
|
||||||
const handlerMessageDelete = async () => {
|
const handlerMessageDelete = async () => {
|
||||||
// 刷新 message
|
// 刷新 message
|
||||||
await getMessageList()
|
await getMessageList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回到顶部
|
||||||
|
*/
|
||||||
|
const handlerGoTop = async () => {
|
||||||
|
await messageRef.value.handlerGoTop()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// 设置当前对话 TODO 角色仓库过来的,自带 conversationId 需要选中
|
// 设置当前对话 TODO 角色仓库过来的,自带 conversationId 需要选中
|
||||||
|
Loading…
Reference in New Issue
Block a user