feat: active outline link scroll to page center

pull/4634/head
btea 6 months ago
parent d07298120b
commit f7fde3a468

@ -170,6 +170,10 @@ export function useActiveAnchor(
activeLink.classList.add('active')
marker.value.style.top = activeLink.offsetTop + 39 + 'px'
marker.value.style.opacity = '1'
activeLink.scrollIntoView({
block: 'center',
inline: 'nearest'
})
} else {
marker.value.style.top = '33px'
marker.value.style.opacity = '0'

Loading…
Cancel
Save