Improve usability
This commit is contained in:
parent
b79eed01e0
commit
c6dd932a0b
3 changed files with 14 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue