hookehuyr

fix(StudyDetailPage): 调整滚动逻辑中的偏移量

在滚动逻辑中增加30像素的偏移量,以确保标签切换更加准确
...@@ -320,7 +320,7 @@ const handleScroll = () => { ...@@ -320,7 +320,7 @@ const handleScroll = () => {
320 if (!introElement || !commentElement) return; 320 if (!introElement || !commentElement) return;
321 321
322 const scrollTop = window.scrollY; 322 const scrollTop = window.scrollY;
323 - const commentOffset = commentElement.offsetTop - parseInt(topWrapperHeight.value); 323 + const commentOffset = commentElement.offsetTop - parseInt(topWrapperHeight.value) - 30; // 30是一个偏移量
324 324
325 // 根据滚动位置更新activeTab 325 // 根据滚动位置更新activeTab
326 if (scrollTop >= commentOffset) { 326 if (scrollTop >= commentOffset) {
......