feat: scroll to top (#237)
This commit is contained in:
parent
cf225e2005
commit
0e7076b991
11 changed files with 48 additions and 15 deletions
9
plugins/scroll-to-top.ts
Normal file
9
plugins/scroll-to-top.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
export default defineNuxtPlugin(() => {
|
||||
return {
|
||||
provide: {
|
||||
scrollToTop: () => {
|
||||
document.body.scrollTo(0, 0)
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue