Skip to content

Commit 474cd2b

Browse files
authored
修复页面滚动条不重置的问题 (#158)
1 parent f7e50cd commit 474cd2b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/layouts/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export default defineComponent({
9595
() => route.path,
9696
() => {
9797
appendNewRoute();
98+
document.querySelector(`.${prefix}-layout`).scrollTo({ top: 0, behavior: 'smooth' });
9899
},
99100
);
100101

0 commit comments

Comments
 (0)