Skip to content

Commit

Permalink
fix: 内置目录导航失效(#41
Browse files Browse the repository at this point in the history
  • Loading branch information
imzbf committed Jan 28, 2022
1 parent 4dede6d commit 46da4ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MdEditor/layouts/Catalog/CatalogLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const CatalogLink = defineComponent({
if (targetHeadEle) {
const scrollLength = targetHeadEle.offsetTop;

previewEle?.scrollTo({
previewEle?.parentElement?.scrollTo({
top: scrollLength,
behavior: 'smooth'
});
Expand Down

0 comments on commit 46da4ac

Please sign in to comment.