Improve usability

This commit is contained in:
syuilo
2020-11-07 12:30:16 +09:00
parent b79eed01e0
commit c6dd932a0b
3 changed files with 14 additions and 5 deletions

View File

@ -121,7 +121,11 @@ export default defineComponent({
return this.window();
}
this.$router.push(this.to);
if (this.$router.currentRoute.value.path === this.to) {
window.scroll({ top: 0, behavior: 'smooth' });
} else {
this.$router.push(this.to);
}
}
}
}