fixed: #313 use index [ ] instead of splice function to prevent removal

This commit is contained in:
Cindy Chang
2024-07-09 15:08:55 +08:00
parent a2703bef6e
commit 74bc22b736
3 changed files with 15 additions and 7 deletions

View File

@@ -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: {} };
},
/**