Answers for "vue scrollbehavior typescript"

0

vuejs scrollBehavior

const router = createRouter({
  scrollBehavior(to, from, savedPosition) {
    // always scroll to top
    return { top: 0 }
  },
})
Posted by: Guest on June-11-2021
0

vue scrollbehavior typescript

scrollBehavior (to, from, savedPosition) {
  if (to.hash) {
    return {
      selector: to.hash,
      behavior: 'smooth',
    }
  }
}
Posted by: Guest on March-30-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language