From 74bc22b736cfae82e64d456274a4aafa1df35fd1 Mon Sep 17 00:00:00 2001 From: Cindy Chang Date: Tue, 9 Jul 2024 15:08:55 +0800 Subject: [PATCH] fixed: #313 use index [ ] instead of splice function to prevent removal --- src/stores/acctMgmt.ts | 1 + .../AccountAdmin/AccountAdmin.vue | 17 +++++++++++------ .../ModalAccountEditCreate.vue | 4 +++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/stores/acctMgmt.ts b/src/stores/acctMgmt.ts index 7331130..77ca21b 100644 --- a/src/stores/acctMgmt.ts +++ b/src/stores/acctMgmt.ts @@ -60,6 +60,7 @@ export default defineStore('acctMgmtStore', { */ setCurrentViewingUser(username: string) { const userFind:User|undefined = this.allUserAccoutList.find(user => user.username === username); + console.log('userFind', userFind); this.currentViewingUser = userFind ? userFind : { username: '', detail: {} }; }, /** diff --git a/src/views/AccountManagement/AccountAdmin/AccountAdmin.vue b/src/views/AccountManagement/AccountAdmin/AccountAdmin.vue index afc9c08..7e01c55 100644 --- a/src/views/AccountManagement/AccountAdmin/AccountAdmin.vue +++ b/src/views/AccountManagement/AccountAdmin/AccountAdmin.vue @@ -79,7 +79,7 @@