fix: remain in the same position of list after rename or delete2 Rename.vue

This commit is contained in:
niubility000 2024-02-24 17:57:58 +08:00 committed by GitHub
parent c51b7208f8
commit fe5ff35380
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,8 +87,8 @@ export default {
newLink =
url.removeLastDir(oldLink) + "/" + encodeURIComponent(this.name);
window.sessionStorage.setItem('modified', "true");
window.sessionStorage.setItem("modified", "true");
try {
await api.move([{ from: oldLink, to: newLink }]);
if (!this.isListing) {
@ -101,8 +101,8 @@ export default {
this.$showError(e);
}
Vue.nextTick(() => {
window.sessionStorage.setItem('modified', "false");
nextTick(() => {
window.sessionStorage.setItem("modified", "false");
});
this.$store.commit("closeHovers");
},