fix: 修复创建资产时删除一个账号会全部删除的问题

This commit is contained in:
Bai
2023-02-14 14:56:19 +08:00
committed by Jiangjie.Bai
parent 8b29be3f72
commit 64f521ba00

View File

@@ -92,8 +92,15 @@ export default {
},
methods: {
removeAccount(account) {
console.log('>>>>>>', account, this.accounts)
this.accounts = this.accounts.filter((item) => {
return item.id !== account.id
if (account.id && item.id) {
return item.id !== account.id
} else if (account.username && item.username) {
return item.username !== account.username
} else {
return account.name !== item.name
}
})
},
onEditClick(account) {