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

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

View File

@ -45,6 +45,7 @@ export default {
submit: async function () {
buttons.loading("delete");
window.sessionStorage.setItem('modified', "true");
try {
if (!this.isListing) {
await api.remove(this.$route.path);
@ -74,6 +75,9 @@ export default {
this.$showError(e);
if (this.isListing) this.$store.commit("setReload", true);
}
Vue.nextTick(() => {
window.sessionStorage.setItem('modified', "false");
});
},
},
};