fix:修复个人档案性别字段保存后在我的页面不显示的问题(中英文格式兼容)

This commit is contained in:
2026-06-15 12:13:49 +08:00
parent 42543ff8a6
commit 2c69da46e5
+3 -2
View File
@@ -165,8 +165,9 @@ const harmonyPercent = computed(() => {
})
const genderText = computed(() => {
const map = { male: '男', female: '女', other: '其他' }
return map[profile.value.gender] || null
// 兼容中文值(编辑页保存格式)和英文 key
const map = { male: '男', female: '女', other: '其他', '男': '男', '女': '女', '不透露': '不透露' }
return map[profile.value.gender] || profile.value.gender || null
})
const age = computed(() => {