const upScores = res.upScoresList[`item${item.id}`] || '-'
upScoresList是从后端返回的数据,不满足条件时返回的有可能为undefined,前端应该怎么处理这个空判断啊? 目前我是添加了一个'-'。
const upScores = res.upScoresList[`item${item.id}`] || '-'
upScoresList是从后端返回的数据,不满足条件时返回的有可能为undefined,前端应该怎么处理这个空判断啊? 目前我是添加了一个'-'。