diff --git a/plugins/scroll-to-top.ts b/plugins/scroll-to-top.ts index 943acc7d..448d2420 100644 --- a/plugins/scroll-to-top.ts +++ b/plugins/scroll-to-top.ts @@ -2,7 +2,7 @@ export default defineNuxtPlugin(() => { return { provide: { scrollToTop: () => { - document.body.scrollTo(0, 0) + window.scrollTo({ top: 0, left: 0, behavior: 'smooth' }) }, }, }