async scrolling vue 3 code example
Example: vue router Async Scrolling
scrollBehavior (to, from, savedPosition) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(savedPosition || { x: 0, y: 0 })
}, 500)
})
}
scrollBehavior (to, from, savedPosition) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(savedPosition || { x: 0, y: 0 })
}, 500)
})
}