This commit is contained in:
2020-04-06 00:04:03 +00:00
parent 4d92e0da20
commit b3e4f7b8c6
2 changed files with 282 additions and 22 deletions

View File

@@ -34,8 +34,10 @@ const scrollBehavior = function(to, from, savedPosition) {
return false;
}
// eslint-disable-next-line
return new Promise((resolve) => {
// check if any matched route config has meta that requires scrolling to top
// eslint-disable-next-line
if (to.matched.some((m) => m.meta.scrollToTop)) {
// coords will be used if no selector is provided,
// or if the selector didn't match any element.