forked from Mirrors/elk
chore: expose only required methods
This commit is contained in:
parent
5acd2224df
commit
f3a8778ede
1 changed files with 4 additions and 4 deletions
|
@ -43,7 +43,8 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||||
if (scrollPosition)
|
if (scrollPosition)
|
||||||
window.scrollTo(0, scrollPosition)
|
window.scrollTo(0, scrollPosition)
|
||||||
|
|
||||||
// required for custom routes: first call will reject
|
// required for custom routes: first call will be rejected
|
||||||
|
// we need to enable scroll tracking again, it is disabled
|
||||||
if (!track.value) {
|
if (!track.value) {
|
||||||
nextTick().then(() => {
|
nextTick().then(() => {
|
||||||
track.value = true
|
track.value = true
|
||||||
|
@ -82,12 +83,11 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
provide: {
|
provide: {
|
||||||
trackScroll: reactive({
|
trackScroll: {
|
||||||
forceScrollToTop,
|
forceScrollToTop,
|
||||||
restoreScroll,
|
|
||||||
registerCustomRoute,
|
registerCustomRoute,
|
||||||
restoreCustomPageScroll,
|
restoreCustomPageScroll,
|
||||||
}),
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue