fix: scrollToTop does not work as expected (#271)
This commit is contained in:
parent
2b46bd5a15
commit
e3ab850cc1
|
@ -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' })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue