scroll behavior

This commit is contained in:
lesion 2022-05-06 23:01:17 +02:00
parent 13e5427f3c
commit 8981740620
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -1,10 +1,6 @@
/** /**
* https://nuxtjs.org/docs/configuration-glossary/configuration-router/#scrollbehavior * https://nuxtjs.org/docs/configuration-glossary/configuration-router/#scrollbehavior
* always scrollToTop but on index page
*/ */
export default function (to, _from, savedPosition) { export default function (to, _from, savedPosition) {
if (to.name === 'index') {
return savedPosition
}
return { x: 0, y: 0 } return { x: 0, y: 0 }
} }