forked from Mirrors/elk
chore: do not apply timeout on pages without scroll tracking
This commit is contained in:
parent
a7414bb59e
commit
3e0b2a3e4b
1 changed files with 5 additions and 0 deletions
|
@ -20,6 +20,11 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|||
const restoreScroll = () => {
|
||||
const path = route.fullPath
|
||||
return nextTick().then(() => {
|
||||
if (route.meta && route.meta?.noScrollTrack) {
|
||||
forceScroll()
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
if (path !== route.fullPath) {
|
||||
|
|
Loading…
Reference in a new issue