6666 </TransitionContent >
6767 </div >
6868 </el-scrollbar >
69-
70- <ChatInputOperate
71- :app-id =" appId"
72- :application-details =" applicationDetails"
73- :is-mobile =" isMobile"
74- :type =" type"
75- :send-message =" sendMessage"
76- :open-chat-id =" openChatId"
77- :validate =" validate"
78- :chat-management =" ChatManagement"
79- v-model:chat-id =" chartOpenId"
80- v-model:loading =" loading"
81- v-model:show-user-input =" showUserInput"
82- v-if =" type !== 'log'"
83- >
84- <template #userInput >
85- <el-button
86- v-if =" isUserInput || isAPIInput"
87- class =" user-input-button mb-8"
88- @click =" toggleUserInput"
89- >
90- <AppIcon iconName =" app-edit" :size =" 16" class =" mr-4" ></AppIcon >
91- <span class =" ellipsis" >
92- {{ userInputTitle || $t('chat.userInput') }}
93- </span >
94- </el-button >
95- </template >
96- </ChatInputOperate >
97-
69+ <div style =" position : relative " >
70+ <!-- 置底按钮 -->
71+ <el-button v-if =" isBottom" circle class =" back-bottom-button" @click =" setScrollBottom" >
72+ <el-icon ><ArrowDownBold /></el-icon >
73+ </el-button >
74+ <ChatInputOperate
75+ :app-id =" appId"
76+ :application-details =" applicationDetails"
77+ :is-mobile =" isMobile"
78+ :type =" type"
79+ :send-message =" sendMessage"
80+ :open-chat-id =" openChatId"
81+ :validate =" validate"
82+ :chat-management =" ChatManagement"
83+ v-model:chat-id =" chartOpenId"
84+ v-model:loading =" loading"
85+ v-model:show-user-input =" showUserInput"
86+ v-if =" type !== 'log'"
87+ >
88+ <template #userInput >
89+ <el-button
90+ v-if =" isUserInput || isAPIInput"
91+ class =" user-input-button mb-8"
92+ @click =" toggleUserInput"
93+ >
94+ <AppIcon iconName =" app-edit" :size =" 16" class =" mr-4" ></AppIcon >
95+ <span class =" ellipsis" >
96+ {{ userInputTitle || $t('chat.userInput') }}
97+ </span >
98+ </el-button >
99+ </template >
100+ </ChatInputOperate >
101+ </div >
98102 <Control ></Control >
99103 </template >
100104 </div >
@@ -603,10 +607,12 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean, other_para
603607const scrollTop = ref (0 )
604608
605609const scorll = ref (true )
610+ const isBottom = ref (false )
606611
607612const getMaxHeight = () => {
608613 return dialogScrollbar .value ! .scrollHeight
609614}
615+
610616/**
611617 * 滚动滚动条到最上面
612618 * @param $event
@@ -621,6 +627,8 @@ const handleScrollTop = ($event: any) => {
621627 } else {
622628 scorll .value = false
623629 }
630+ isBottom .value =
631+ scrollTop .value + scrollDiv .value .wrapRef .offsetHeight < dialogScrollbar .value ! .scrollHeight
624632 emit (' scroll' , { ... $event , dialogScrollbar: dialogScrollbar .value , scrollDiv: scrollDiv .value })
625633}
626634/**
0 commit comments