const getStatus = (status: any) => {
let obj:any = {
'1':'通过',
'-1':'驳回',
'0':'待审核'
}
return obj[status]
};
常规都是进行if或者switch判断进行数据处理 这边利用对象的属性进行render
前端项目实战145-利用对象属性来转换数据
阅读 115
2022-11-12
const getStatus = (status: any) => {
let obj:any = {
'1':'通过',
'-1':'驳回',
'0':'待审核'
}
return obj[status]
};
常规都是进行if或者switch判断进行数据处理 这边利用对象的属性进行render
相关推荐
精彩评论(0)