From 4f959f83192605f164e725091b909f1f48550daf Mon Sep 17 00:00:00 2001 From: niubility000 <76441520+niubility000@users.noreply.github.com> Date: Fri, 15 Mar 2024 11:17:58 +0800 Subject: [PATCH] feat: remain in the same position of the list when back from a sub folder --- frontend/src/components/files/ListingItem.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index 0bdc3d79..9e4395b4 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -247,7 +247,10 @@ export default { this.addSelected(this.index); }, open: function () { - window.sessionStorage.setItem(this.$route.path, JSON.stringify([document.documentElement.scrollTop, this.index])); + window.sessionStorage.setItem( + this.$route.path, + JSON.stringify([document.documentElement.scrollTop, this.index]) + ); this.$router.push({ path: this.url }); }, },