Skip to content

Commit

Permalink
fix: scrollspy issue (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdrtsky committed Jun 1, 2021
1 parent 135c548 commit c3d9a25
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/defaultTheme/components/organisms/PageToc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,13 @@ export default defineComponent({
const { activeHeadings, visibleHeadings, updateHeadings } = useScrollspy()
onMounted(() =>
updateHeadings([
...document.querySelectorAll('.docus-content h1'),
...document.querySelectorAll('.docus-content h2'),
...document.querySelectorAll('.docus-content h3')
])
setTimeout(() => {
updateHeadings([
...document.querySelectorAll('.docus-content h1'),
...document.querySelectorAll('.docus-content h2'),
...document.querySelectorAll('.docus-content h3')
])
}, 200)
)
const isActiveParent = link => {
Expand Down

1 comment on commit c3d9a25

@vercel
Copy link

@vercel vercel bot commented on c3d9a25 Jun 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.