feat: 添加了滚动的标识方法

This commit is contained in:
zoujing 2025-08-27 20:34:16 +08:00
parent 0e51fdcd69
commit a366e259da

View File

@ -20,6 +20,8 @@
scroll-y scroll-y
:scroll-with-animation="true" :scroll-with-animation="true"
class="area-msg-list" class="area-msg-list"
@scroll="handleScroll"
@scrolltolower="handleScrollToLower"
> >
<!-- welcome栏 --> <!-- welcome栏 -->
<ChatTopWelcome <ChatTopWelcome
@ -172,6 +174,9 @@ const isKeyboardShow = ref(false);
/// ///
const scrollTop = ref(99999); const scrollTop = ref(99999);
//
const isUserScrolling = ref(false);
/// ///
const chatMsgList = ref([]); const chatMsgList = ref([]);
/// ///
@ -235,13 +240,21 @@ const handleKeyboardHide = () => {
holdKeyboard.value = false; holdKeyboard.value = false;
}; };
//
const handleScroll = (e) => {
//
};
//
const handleScrollToLower = () => {};
// - // -
const scrollToBottom = () => { const scrollToBottom = () => {
nextTick(() => { nextTick(() => {
scrollTop.value = 99999; scrollTop.value = 99999;
// //
setTimeout(() => { setTimeout(() => {
scrollTop.value = scrollTop.value + 1; scrollTop.value = scrollTop.value + Math.random();
}, 10); }, 10);
}); });
}; };
@ -526,14 +539,8 @@ const initTypewriterManager = () => {
typewriterManager.setCallbacks({ typewriterManager.setCallbacks({
// //
onCharacterTyped: (displayedContent) => { onCharacterTyped: (displayedContent) => {
// //
nextTick(() => { scrollToBottom();
scrollTop.value = 99999;
//
setTimeout(() => {
scrollTop.value = 99999 + Math.random();
}, 20);
});
}, },
// //
onContentUpdate: (content) => { onContentUpdate: (content) => {