From 87d39c434cd6568cb66321a566421e90913bf69d Mon Sep 17 00:00:00 2001 From: niubility000 <76441520+niubility000@users.noreply.github.com> Date: Sat, 23 Mar 2024 18:09:19 +0800 Subject: [PATCH] feat: remain in the same position when back from a subfolder --- frontend/src/components/files/ListingItem.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index f7733b87..d5fea95c 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -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 }); }, },