1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-19 15:29:59 +00:00

fix: scrollToTop does not work as expected (#271)

This commit is contained in:
Ayaka Rizumu 2022-12-01 20:33:07 +08:00 committed by GitHub
parent 2b46bd5a15
commit e3ab850cc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@ export default defineNuxtPlugin(() => {
return { return {
provide: { provide: {
scrollToTop: () => { scrollToTop: () => {
document.body.scrollTo(0, 0) window.scrollTo({ top: 0, left: 0, behavior: 'smooth' })
}, },
}, },
} }