fix:修复个人档案性别字段保存后在我的页面不显示的问题(中英文格式兼容)
This commit is contained in:
@@ -165,8 +165,9 @@ const harmonyPercent = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const genderText = computed(() => {
|
const genderText = computed(() => {
|
||||||
const map = { male: '男', female: '女', other: '其他' }
|
// 兼容中文值(编辑页保存格式)和英文 key
|
||||||
return map[profile.value.gender] || null
|
const map = { male: '男', female: '女', other: '其他', '男': '男', '女': '女', '不透露': '不透露' }
|
||||||
|
return map[profile.value.gender] || profile.value.gender || null
|
||||||
})
|
})
|
||||||
|
|
||||||
const age = computed(() => {
|
const age = computed(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user