fix: 修复部分用户platformId 为空的情况

This commit is contained in:
digua
2026-01-08 22:24:17 +08:00
committed by digua
parent 51547fdd5e
commit 70e76e21d9
@@ -37,10 +37,13 @@ const UNSET_VALUE = '__UNSET__'
const memberOptions = computed(() => {
return [
{ label: t('unset'), value: UNSET_VALUE },
...props.members.map((m) => ({
label: `${getDisplayName(m)} (${m.platformId})`,
value: m.platformId,
})),
...props.members
// 过滤掉 platformId 为空的成员(USelect 不允许空字符串作为 value)
.filter((m) => m.platformId && m.platformId.trim() !== '')
.map((m) => ({
label: `${getDisplayName(m)} (${m.platformId})`,
value: m.platformId,
})),
]
})