From 16456d73ef32dbdbc9358dd0a9b9bcd92cdf4b5f Mon Sep 17 00:00:00 2001 From: niubility000 <76441520+niubility000@users.noreply.github.com> Date: Thu, 15 Feb 2024 21:13:49 +0800 Subject: [PATCH] Update Listing.vue --- frontend/src/views/files/Listing.vue | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/frontend/src/views/files/Listing.vue b/frontend/src/views/files/Listing.vue index c204de45..692593b6 100644 --- a/frontend/src/views/files/Listing.vue +++ b/frontend/src/views/files/Listing.vue @@ -383,17 +383,22 @@ export default { }, watch: { req: function () { - // Reset the show value - this.showLimit = 50; + if (window.sessionStorage.getItem('listFrozen') !=="true"){ + // Reset the show value + this.showLimit = 50; - // Ensures that the listing is displayed - Vue.nextTick(() => { - // How much every listing item affects the window height - this.setItemWeight(); + // Ensures that the listing is displayed + Vue.nextTick(() => { + // How much every listing item affects the window height + this.setItemWeight(); - // Fill and fit the window with listing items - this.fillWindow(true); - }); + // Fill and fit the window with listing items + this.fillWindow(true); + }); + } + if (this.req.isDir) { + window.sessionStorage.setItem('listFrozen', "false"); + } }, }, mounted: function () {