feat: remain in the same position when back from a subfolder

This commit is contained in:
niubility000 2024-03-23 18:09:19 +08:00 committed by GitHub
parent 08458da31c
commit 87d39c434c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -247,6 +247,10 @@ export default {
this.addSelected(this.index);
},
open: function () {
window.sessionStorage.setItem(
this.$route.path,
JSON.stringify([document.documentElement.scrollTop, this.index])
);
this.$router.push({ path: this.url });
},
},