修复页面滚动条不重置的问题 (#158)

This commit is contained in:
Kerwin Bryant 2022-05-27 14:04:48 +08:00 committed by GitHub
parent f7e50cd10a
commit 474cd2b6ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,7 @@ export default defineComponent({
() => route.path, () => route.path,
() => { () => {
appendNewRoute(); appendNewRoute();
document.querySelector(`.${prefix}-layout`).scrollTo({ top: 0, behavior: 'smooth' });
}, },
); );