fix create ab in my peer

This commit is contained in:
lejianwen
2024-12-06 10:59:55 +08:00
parent 529e67095a
commit c571aaa3ab
3 changed files with 38 additions and 53 deletions
+2 -14
View File
@@ -311,22 +311,10 @@
platformList: ABPlatformList,
formVisible: ABFormVisible,
formData: ABFormData,
fromPeer,
} = useABRepositories()
const toAddressBook = (peer) => {
ABFormData.id = peer.id
ABFormData.username = peer.username
ABFormData.hostname = peer.hostname
//匹配os
if (peer.os.indexOf('windows') !== -1) {
ABFormData.platform = ABPlatformList.find(item => item.label === 'Windows').value
} else if (peer.os.indexOf('linux') !== -1) {
ABFormData.platform = ABPlatformList.find(item => item.label === 'Linux').value
} else if (peer.os.indexOf('android') !== -1) {
ABFormData.platform = ABPlatformList.find(item => item.label === 'Android').value
} else if (peer.os.indexOf('mac') !== -1) {
ABFormData.platform = ABPlatformList.find(item => item.label === 'Mac OS').value
}
ABFormData.uuid = peer.uuid
fromPeer(peer)
ABFormVisible.value = true
}