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

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

View File

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