From c51b7208f86f727f830654aa190a96f36a8de903 Mon Sep 17 00:00:00 2001 From: niubility000 <76441520+niubility000@users.noreply.github.com> Date: Sat, 24 Feb 2024 17:29:18 +0800 Subject: [PATCH] fix: remain in the same position of list after rename or delete Delete.vue --- frontend/src/components/prompts/Delete.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/prompts/Delete.vue b/frontend/src/components/prompts/Delete.vue index f65e69b7..e9689a36 100644 --- a/frontend/src/components/prompts/Delete.vue +++ b/frontend/src/components/prompts/Delete.vue @@ -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"); + }); }, }, };