Update Listing.vue

This commit is contained in:
niubility000 2024-02-15 21:13:49 +08:00 committed by GitHub
parent b302d3c0b3
commit 16456d73ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 () {