Skip to content

Commit

Permalink
compiler: Fix rolling anomalies
Browse files Browse the repository at this point in the history
  • Loading branch information
ys-zhifu committed Dec 17, 2024
1 parent f352981 commit 29a265c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vdoing/components/RightMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ export default {
$route() {
this.headers = getNewHeaders(this.$page.headers);
this.getHashText();
// 滚动到指定位置
this.scrollToHash();
},
},
methods: {
Expand All @@ -100,6 +98,8 @@ export default {
if (!this.hashText && this.headers) {
this.hashText = this.headers[0]?.slug;
}
// 滚动到指定位置
this.scrollToHash();
},
scrollToHash() {
const element = document.getElementById(`${this.hashText}-slug`);
Expand Down

0 comments on commit 29a265c

Please sign in to comment.