feat(员工培训): 完善新人入职培训聊天闭环交互
This commit is contained in:
1 parent
eb0466245b
commit
3f13bb5b46
19 files changed
+2975
-12
No files matched your search
@@ -66,6 +66,17 @@ export function useChatScroll(options: UseChatScrollOptions) {
|
||||
});
|
||||
};
|
||||
|
||||
const scrollToTop = async () => {
|
||||
await nextTick();
|
||||
const el = container.value;
|
||||
if (!el) return;
|
||||
el.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'auto',
|
||||
});
|
||||
isNearBottom.value = false;
|
||||
};
|
||||
|
||||
const scrollToUserQuestion = async () => {
|
||||
if (scrollToBottomFrame !== null) {
|
||||
window.cancelAnimationFrame(scrollToBottomFrame);
|
||||
@@ -139,6 +150,7 @@ export function useChatScroll(options: UseChatScrollOptions) {
|
||||
showScrollToBottom,
|
||||
scrollToBottom,
|
||||
scrollToBottomSmooth,
|
||||
scrollToTop,
|
||||
scrollToUserQuestion,
|
||||
scheduleScrollToBottom,
|
||||
setupThinkingScrollWatch,
|
||||
|
||||
Reference in new issue
Block a user