fix: remain in the same position of list after rename or delete Update4 Listing.vue

This commit is contained in:
niubility000 2024-02-25 00:25:45 +08:00 committed by GitHub
parent 7ef0bb0e1d
commit a136c0b5d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -383,7 +383,7 @@ export default {
},
watch: {
req: function () {
if (window.sessionStorage.getItem('listFrozen') !=="true"){
if (window.sessionStorage.getItem("listFrozen") !=="true" && window.sessionStorage.getItem("modified") !=="true"){
// Reset the show value
this.showLimit = 50;
@ -397,7 +397,8 @@ export default {
});
}
if (this.req.isDir) {
window.sessionStorage.setItem('listFrozen', "false");
window.sessionStorage.setItem(listFrozen, "false");
window.sessionStorage.setItem("modified", "false");
}
},
},