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 restoreScroll = () => {
|
||||||
const path = route.fullPath
|
const path = route.fullPath
|
||||||
return nextTick().then(() => {
|
return nextTick().then(() => {
|
||||||
|
if (route.meta && route.meta?.noScrollTrack) {
|
||||||
|
forceScroll()
|
||||||
|
return Promise.resolve()
|
||||||
|
}
|
||||||
|
|
||||||
return new Promise<void>((resolve, reject) => {
|
return new Promise<void>((resolve, reject) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (path !== route.fullPath) {
|
if (path !== route.fullPath) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue