Browse Source

修复一下滚动

hxl
hongxilin 2 months ago
parent
commit
67d2d3cee7
  1. 15
      src/views/homePage.vue

15
src/views/homePage.vue

@ -224,11 +224,13 @@ watch(
watch( watch(
activeTab, activeTab,
async () => { async () => {
// console.log('activeTab', activeTab.value)
isScrolling.value = false; //
setTimeout(() => {
throttledSmoothScrollToBottom();
}, 100)
console.log('activeTab变化了', activeTab.value)
if (activeTab.value === 'AIchat') {
isScrolling.value = false; //
setTimeout(() => {
throttledSmoothScrollToBottom();
}, 100)
}
// setTimeout(throttledSmoothScrollToBottom, 100); // setTimeout(throttledSmoothScrollToBottom, 100);
}, },
{ deep: true, immediate: true } { deep: true, immediate: true }
@ -436,8 +438,11 @@ onMounted(async () => {
!isPhone && !isPhone &&
localStorage.setItem('localToken', decodeURIComponent(String(getQueryVariable('token')))) localStorage.setItem('localToken', decodeURIComponent(String(getQueryVariable('token'))))
setHeight(document.getElementById("testId")); // setHeight(document.getElementById("testId")); //
//
await chatStore.getUserCount(); await chatStore.getUserCount();
//
throttledSmoothScrollToBottom(); throttledSmoothScrollToBottom();
//
throttledHeightListener(); throttledHeightListener();
// //

Loading…
Cancel
Save