js 数组遍历拼接人名
2021-11-19 本文已影响0人
Spidd
{
dot.get(detail, 'role_type_list', []).length > 0
? dot.get(detail, 'role_type_list', []).reduce((acc, cur, idx) => {
if (idx === 0) return RoleType.description(cur);
return `${acc}、${RoleType.description(cur)}`;
}, '')
: '--'
}